Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Side by Side Diff: Lib/idlelib/EditorWindow.py

Issue 17532: IDLE: Always include "Options" menu on MacOSX
Patch Set: Created 6 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/idlelib/Bindings.py ('k') | Lib/idlelib/PyShell.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import imp 1 import imp
2 import importlib 2 import importlib
3 import os 3 import os
4 import re 4 import re
5 import string 5 import string
6 import sys 6 import sys
7 from tkinter import * 7 from tkinter import *
8 import tkinter.simpledialog as tkSimpleDialog 8 import tkinter.simpledialog as tkSimpleDialog
9 import tkinter.messagebox as tkMessageBox 9 import tkinter.messagebox as tkMessageBox
10 import traceback 10 import traceback
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 ("file", "_File"), 427 ("file", "_File"),
428 ("edit", "_Edit"), 428 ("edit", "_Edit"),
429 ("format", "F_ormat"), 429 ("format", "F_ormat"),
430 ("run", "_Run"), 430 ("run", "_Run"),
431 ("options", "_Options"), 431 ("options", "_Options"),
432 ("windows", "_Windows"), 432 ("windows", "_Windows"),
433 ("help", "_Help"), 433 ("help", "_Help"),
434 ] 434 ]
435 435
436 if macosxSupport.runningAsOSXApp(): 436 if macosxSupport.runningAsOSXApp():
437 del menu_specs[-3]
438 menu_specs[-2] = ("windows", "_Window") 437 menu_specs[-2] = ("windows", "_Window")
439 438
440 439
441 def createmenubar(self): 440 def createmenubar(self):
442 mbar = self.menubar 441 mbar = self.menubar
443 self.menudict = menudict = {} 442 self.menudict = menudict = {}
444 for name, label in self.menu_specs: 443 for name, label in self.menu_specs:
445 underline, label = prepstr(label) 444 underline, label = prepstr(label)
446 menudict[name] = menu = Menu(mbar, name=name) 445 menudict[name] = menu = Menu(mbar, name=name)
447 mbar.add_cascade(label=label, menu=menu, underline=underline) 446 mbar.add_cascade(label=label, menu=menu, underline=underline)
448 if macosxSupport.isCarbonAquaTk(self.root): 447 if macosxSupport.isCarbonAquaTk(self.root):
449 # Insert the application menu 448 # Insert the application menu
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 else: 1693 else:
1695 filename = None 1694 filename = None
1696 edit = EditorWindow(root=root, filename=filename) 1695 edit = EditorWindow(root=root, filename=filename)
1697 edit.set_close_hook(root.quit) 1696 edit.set_close_hook(root.quit)
1698 edit.text.bind("<<close-all-windows>>", edit.close_event) 1697 edit.text.bind("<<close-all-windows>>", edit.close_event)
1699 root.mainloop() 1698 root.mainloop()
1700 root.destroy() 1699 root.destroy()
1701 1700
1702 if __name__ == '__main__': 1701 if __name__ == '__main__':
1703 test() 1702 test()
OLDNEW
« no previous file with comments | « Lib/idlelib/Bindings.py ('k') | Lib/idlelib/PyShell.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+