GIF89a; EcchiShell v1.0
//usr/lib64/lib64/python2.7/idlelib/

0: menu.delete(0, end) WindowList.add_windows_to_menu(menu) WindowList.register_callback(postwindowsmenu) def about_dialog(event=None): from idlelib import aboutDialog aboutDialog.AboutDialog(root, 'About IDLE') def config_dialog(event=None): from idlelib import configDialog root.instance_dict = flist.inversedict configDialog.ConfigDialog(root, 'Settings') def help_dialog(event=None): from idlelib import textView fn = path.join(path.abspath(path.dirname(__file__)), 'help.txt') textView.view_file(root, 'Help', fn) root.bind('<>', about_dialog) root.bind('<>', config_dialog) root.createcommand('::tk::mac::ShowPreferences', config_dialog) if flist: root.bind('<>', flist.close_all_callback) # The binding above doesn't reliably work on all versions of Tk # on MacOSX. Adding command definition below does seem to do the # right thing for now. root.createcommand('exit', flist.close_all_callback) if isCarbonAquaTk(root): # for Carbon AquaTk, replace the default Tk apple menu menudict['application'] = menu = Menu(menubar, name='apple') menubar.add_cascade(label='IDLE', menu=menu) Bindings.menudefs.insert(0, ('application', [ ('About IDLE', '<>'), None, ])) tkversion = root.tk.eval('info patchlevel') if tuple(map(int, tkversion.split('.'))) < (8, 4, 14): # for earlier AquaTk versions, supply a Preferences menu item Bindings.menudefs[0][1].append( ('_Preferences....', '<>'), ) else: # assume Cocoa AquaTk # replace default About dialog with About IDLE one root.createcommand('tkAboutDialog', about_dialog) # replace default "Help" item in Help menu root.createcommand('::tk::mac::ShowHelp', help_dialog) # remove redundant "IDLE Help" from menu del Bindings.menudefs[-1][1][0] def setupApp(root, flist): """ Perform setup for the OSX application bundle. """ if not runningAsOSXApp(): return hideTkConsole(root) overrideRootMenu(root, flist) addOpenEventSupport(root, flist)