PEATDB/PEATApp.py
def createMenuBar(self):
        """Create the menu bar for the application. """
        self.menu=Menu(self.main)
        self.file_menu={ '01Remote Project':{'cmd':self.connectDialog},
                         '02User Setup':{'cmd':self.loginSetup},
                         '03Open local Project':{'cmd':self.openLocal},
                         '04New Project':{'cmd':self.newDB},
                         '05Close Project':{'cmd':self.closeDB},
                         '06Save Changes':{'cmd':self.saveDB},
                         '07Save a Copy As':{'cmd':self.saveAs},
                         '08Create Project on Server':{'cmd':self.createDBonServerDialog},
                         '09Undo Current Changes':{'cmd':self.undo},
                         '10Undo Previous Commits':{'cmd':self.showUndoLog},
                         '11Quit':{'cmd':self.quit}}
        self.file_menu=self.create_pulldown(self.menu,self.file_menu)
        self.menu.add_cascade(label='Project',menu=self.file_menu['var'])
        self.addPrevProjects(self.file_menu['var'])

        self.rec_menu={ '01Add Protein':{'cmd':self.addRecordDialog},
                        '02Delete Protein':{'cmd':self.deleteRecord},
                        '03Add Column':{'cmd':self.addColumnDialog},
                        '04Delete Column':{'cmd':self.deleteColumn},
                        '05Show/Hide Columns':{'cmd':self.hideFieldsDialog},
                        '06Add/Change PDB File':{'cmd':self.addPDBFile},
                        '07Add Mutant':{'cmd':self.addMutantDialog},
                        '08sep':'',
                        '09Find in table':{'cmd':self.createSearchBar},
                        '10Filter Records':{'cmd':self.showFilteringBar},
                        '11Advanced Search':{'cmd':self.advancedSearch}}
        self.rec_menu=self.create_pulldown(self.menu,self.rec_menu)
        self.menu.add_cascade(label='Records',menu=self.rec_menu['var'])

        self.IO_menu={'01Import from Text/CSV':{'cmd':self.importCSV},
                      #'02Import Mutants':{'cmd':self.importMutants},
                      #'02Export to csv file':{'cmd':self.exportCSV},
                      '03Add External/Binary files':{'cmd':self.importFileset},
                      '04Export Binary Files':{'cmd':self.exportExtFiles}}
        self.IO_menu=self.create_pulldown(self.menu,self.IO_menu)
        self.menu.add_cascade(label='Import/Export',menu=self.IO_menu['var'])

        self.view_menu={ '01Show Change Log':{'cmd':self.showUndoLog},
                         '02Show Changed Items':{'cmd':self.showChanged},
                         '03Show Binary files in Web Page':{'cmd':self.showExtFiles},
                         '04New Table View':{'cmd':self.createTableView}}
        self.view_menu=self.create_pulldown(self.menu,self.view_menu)
        self.view_menu['var'].add_checkbutton(label="Use Page View", variable=self.pageviewvar,
                                       command=self.pageView)
        self.menu.add_cascade(label='View',menu=self.view_menu['var'])

        self.settings_menu={ '01General':{'cmd':self.showSettings},
                             '02Project Info':{'cmd':self.editDBInfo},
                             '03Check Available Projects':{'cmd':self.checkServerPriviledges},
                             '04Table Prefs':{'cmd':self.showtablePrefs},
                             '05sep':'',
                             '06Inspect DB Meta':{'cmd':self.inspectDBMeta},
                             '07Pack Database':{'cmd':self.packDB},
                             '08Testing':{'cmd':self.testsDialog}, }
        self.settings_menu=self.create_pulldown(self.menu,self.settings_menu)
        self.menu.add_cascade(label='Settings',menu=self.settings_menu['var'])

        self.tools_menu={'01Compare Records':{'cmd':self.startComparator},
                     '02Set Reference Protein':{'cmd':self.setRefProtein},
                     '03Remodel Mutant Structures':{'cmd':self.remodelPEATModels},
                     '04Fetch PDB':{'cmd':self.fetchPDB},
                     '05Update Mutation Codes':{'cmd':self.updateMutations},
                     '06Update Mutant Sequences':{'cmd':self.updateAASequences}}
        self.tools_menu=self.create_pulldown(self.menu,self.tools_menu)
        self.menu.add_cascade(label='Tools',menu=self.tools_menu['var'])

        self.labbookmenu = Menu(self.tools_menu['var'], tearoff=1)
        self.tools_menu['var'].add_cascade(label='Labbooks', menu=self.labbookmenu)

        self.Pluginmenu={'01Update Plugins':{'cmd':self.updatePlugins},
                         '02sep':'',}
        self.Pluginmenu=self.create_pulldown(self.menu,self.Pluginmenu)
        self.menu.add_cascade(label='Plugins',menu=self.Pluginmenu['var'])

        self.curr_menu={'01Close All':{'cmd':self.closeAll},
                        '02sep':'',}
        self.curr_menu=self.create_pulldown(self.menu,self.curr_menu)
        self.menu.add_cascade(label='Current',menu=self.curr_menu['var'])

        self.help_menu=Menu(self.menu,tearoff=0)
        self.help_menu.add_command(label='Online documentation',command=self.onlineDocumentation)
        self.help_menu.add_command(label='Report Bug',command=self.gotoBugzilla)
        self.help_menu.add_command(label="About PEATDB",command=self.aboutPEAT)
        self.menu.add_cascade(label='Help',menu=self.help_menu)

        self.main.config(menu=self.menu)
        self.toggleMenus('disabled')
        return
Create the menu bar for the application. 
Create the menu bar for the application.
Create the menu bar for the application .
def createMenuBar(self):
        self.menu=Menu(self.main)
        self.file_menu={ '01Remote Project':{'cmd':self.connectDialog},
                         '02User Setup':{'cmd':self.loginSetup},
                         '03Open local Project':{'cmd':self.openLocal},
                         '04New Project':{'cmd':self.newDB},
                         '05Close Project':{'cmd':self.closeDB},
                         '06Save Changes':{'cmd':self.saveDB},
                         '07Save a Copy As':{'cmd':self.saveAs},
                         '08Create Project on Server':{'cmd':self.createDBonServerDialog},
                         '09Undo Current Changes':{'cmd':self.undo},
                         '10Undo Previous Commits':{'cmd':self.showUndoLog},
                         '11Quit':{'cmd':self.quit}}
        self.file_menu=self.create_pulldown(self.menu,self.file_menu)
        self.menu.add_cascade(label='Project',menu=self.file_menu['var'])
        self.addPrevProjects(self.file_menu['var'])
        self.rec_menu={ '01Add Protein':{'cmd':self.addRecordDialog},
                        '02Delete Protein':{'cmd':self.deleteRecord},
                        '03Add Column':{'cmd':self.addColumnDialog},
                        '04Delete Column':{'cmd':self.deleteColumn},
                        '05Show/Hide Columns':{'cmd':self.hideFieldsDialog},
                        '06Add/Change PDB File':{'cmd':self.addPDBFile},
                        '07Add Mutant':{'cmd':self.addMutantDialog},
                        '08sep':'',
                        '09Find in table':{'cmd':self.createSearchBar},
                        '10Filter Records':{'cmd':self.showFilteringBar},
                        '11Advanced Search':{'cmd':self.advancedSearch}}
        self.rec_menu=self.create_pulldown(self.menu,self.rec_menu)
        self.menu.add_cascade(label='Records',menu=self.rec_menu['var'])
        self.IO_menu={'01Import from Text/CSV':{'cmd':self.importCSV},
                      '03Add External/Binary files':{'cmd':self.importFileset},
                      '04Export Binary Files':{'cmd':self.exportExtFiles}}
        self.IO_menu=self.create_pulldown(self.menu,self.IO_menu)
        self.menu.add_cascade(label='Import/Export',menu=self.IO_menu['var'])
        self.view_menu={ '01Show Change Log':{'cmd':self.showUndoLog},
                         '02Show Changed Items':{'cmd':self.showChanged},
                         '03Show Binary files in Web Page':{'cmd':self.showExtFiles},
                         '04New Table View':{'cmd':self.createTableView}}
        self.view_menu=self.create_pulldown(self.menu,self.view_menu)
        self.view_menu['var'].add_checkbutton(label="Use Page View", variable=self.pageviewvar,
                                       command=self.pageView)
        self.menu.add_cascade(label='View',menu=self.view_menu['var'])
        self.settings_menu={ '01General':{'cmd':self.showSettings},
                             '02Project Info':{'cmd':self.editDBInfo},
                             '03Check Available Projects':{'cmd':self.checkServerPriviledges},
                             '04Table Prefs':{'cmd':self.showtablePrefs},
                             '05sep':'',
                             '06Inspect DB Meta':{'cmd':self.inspectDBMeta},
                             '07Pack Database':{'cmd':self.packDB},
                             '08Testing':{'cmd':self.testsDialog}, }
        self.settings_menu=self.create_pulldown(self.menu,self.settings_menu)
        self.menu.add_cascade(label='Settings',menu=self.settings_menu['var'])
        self.tools_menu={'01Compare Records':{'cmd':self.startComparator},
                     '02Set Reference Protein':{'cmd':self.setRefProtein},
                     '03Remodel Mutant Structures':{'cmd':self.remodelPEATModels},
                     '04Fetch PDB':{'cmd':self.fetchPDB},
                     '05Update Mutation Codes':{'cmd':self.updateMutations},
                     '06Update Mutant Sequences':{'cmd':self.updateAASequences}}
        self.tools_menu=self.create_pulldown(self.menu,self.tools_menu)
        self.menu.add_cascade(label='Tools',menu=self.tools_menu['var'])
        self.labbookmenu = Menu(self.tools_menu['var'], tearoff=1)
        self.tools_menu['var'].add_cascade(label='Labbooks', menu=self.labbookmenu)
        self.Pluginmenu={'01Update Plugins':{'cmd':self.updatePlugins},
                         '02sep':'',}
        self.Pluginmenu=self.create_pulldown(self.menu,self.Pluginmenu)
        self.menu.add_cascade(label='Plugins',menu=self.Pluginmenu['var'])
        self.curr_menu={'01Close All':{'cmd':self.closeAll},
                        '02sep':'',}
        self.curr_menu=self.create_pulldown(self.menu,self.curr_menu)
        self.menu.add_cascade(label='Current',menu=self.curr_menu['var'])
        self.help_menu=Menu(self.menu,tearoff=0)
        self.help_menu.add_command(label='Online documentation',command=self.onlineDocumentation)
        self.help_menu.add_command(label='Report Bug',command=self.gotoBugzilla)
        self.help_menu.add_command(label="About PEATDB",command=self.aboutPEAT)
        self.menu.add_cascade(label='Help',menu=self.help_menu)
        self.main.config(menu=self.menu)
        self.toggleMenus('disabled')
        return
def createMenuBar ( self ) : self . menu = Menu ( self . main ) self . file_menu = { '01Remote Project' : { 'cmd' : self . connectDialog } , '02User Setup' : { 'cmd' : self . loginSetup } , '03Open local Project' : { 'cmd' : self . openLocal } , '04New Project' : { 'cmd' : self . newDB } , '05Close Project' : { 'cmd' : self . closeDB } , '06Save Changes' : { 'cmd' : self . saveDB } , '07Save a Copy As' : { 'cmd' : self . saveAs } , '08Create Project on Server' : { 'cmd' : self . createDBonServerDialog } , '09Undo Current Changes' : { 'cmd' : self . undo } , '10Undo Previous Commits' : { 'cmd' : self . showUndoLog } , '11Quit' : { 'cmd' : self . quit } } self . file_menu = self . create_pulldown ( self . menu , self . file_menu ) self . menu . add_cascade ( label = 'Project' , menu = self . file_menu [ 'var' ] ) self . addPrevProjects ( self . file_menu [ 'var' ] ) self . rec_menu = { '01Add Protein' : { 'cmd' : self . addRecordDialog } , '02Delete Protein' : { 'cmd' : self . deleteRecord } , '03Add Column' : { 'cmd' : self . addColumnDialog } , '04Delete Column' : { 'cmd' : self . deleteColumn } , '05Show/Hide Columns' : { 'cmd' : self . hideFieldsDialog } , '06Add/Change PDB File' : { 'cmd' : self . addPDBFile } , '07Add Mutant' : { 'cmd' : self . addMutantDialog } , '08sep' : '' , '09Find in table' : { 'cmd' : self . createSearchBar } , '10Filter Records' : { 'cmd' : self . showFilteringBar } , '11Advanced Search' : { 'cmd' : self . advancedSearch } } self . rec_menu = self . create_pulldown ( self . menu , self . rec_menu ) self . menu . add_cascade ( label = 'Records' , menu = self . rec_menu [ 'var' ] ) self . IO_menu = { '01Import from Text/CSV' : { 'cmd' : self . importCSV } , '03Add External/Binary files' : { 'cmd' : self . importFileset } , '04Export Binary Files' : { 'cmd' : self . exportExtFiles } } self . IO_menu = self . create_pulldown ( self . menu , self . IO_menu ) self . menu . add_cascade ( label = 'Import/Export' , menu = self . IO_menu [ 'var' ] ) self . view_menu = { '01Show Change Log' : { 'cmd' : self . showUndoLog } , '02Show Changed Items' : { 'cmd' : self . showChanged } , '03Show Binary files in Web Page' : { 'cmd' : self . showExtFiles } , '04New Table View' : { 'cmd' : self . createTableView } } self . view_menu = self . create_pulldown ( self . menu , self . view_menu ) self . view_menu [ 'var' ] . add_checkbutton ( label = "Use Page View" , variable = self . pageviewvar , command = self . pageView ) self . menu . add_cascade ( label = 'View' , menu = self . view_menu [ 'var' ] ) self . settings_menu = { '01General' : { 'cmd' : self . showSettings } , '02Project Info' : { 'cmd' : self . editDBInfo } , '03Check Available Projects' : { 'cmd' : self . checkServerPriviledges } , '04Table Prefs' : { 'cmd' : self . showtablePrefs } , '05sep' : '' , '06Inspect DB Meta' : { 'cmd' : self . inspectDBMeta } , '07Pack Database' : { 'cmd' : self . packDB } , '08Testing' : { 'cmd' : self . testsDialog } , } self . settings_menu = self . create_pulldown ( self . menu , self . settings_menu ) self . menu . add_cascade ( label = 'Settings' , menu = self . settings_menu [ 'var' ] ) self . tools_menu = { '01Compare Records' : { 'cmd' : self . startComparator } , '02Set Reference Protein' : { 'cmd' : self . setRefProtein } , '03Remodel Mutant Structures' : { 'cmd' : self . remodelPEATModels } , '04Fetch PDB' : { 'cmd' : self . fetchPDB } , '05Update Mutation Codes' : { 'cmd' : self . updateMutations } , '06Update Mutant Sequences' : { 'cmd' : self . updateAASequences } } self . tools_menu = self . create_pulldown ( self . menu , self . tools_menu ) self . menu . add_cascade ( label = 'Tools' , menu = self . tools_menu [ 'var' ] ) self . labbookmenu = Menu ( self . tools_menu [ 'var' ] , tearoff = 1 ) self . tools_menu [ 'var' ] . add_cascade ( label = 'Labbooks' , menu = self . labbookmenu ) self . Pluginmenu = { '01Update Plugins' : { 'cmd' : self . updatePlugins } , '02sep' : '' , } self . Pluginmenu = self . create_pulldown ( self . menu , self . Pluginmenu ) self . menu . add_cascade ( label = 'Plugins' , menu = self . Pluginmenu [ 'var' ] ) self . curr_menu = { '01Close All' : { 'cmd' : self . closeAll } , '02sep' : '' , } self . curr_menu = self . create_pulldown ( self . menu , self . curr_menu ) self . menu . add_cascade ( label = 'Current' , menu = self . curr_menu [ 'var' ] ) self . help_menu = Menu ( self . menu , tearoff = 0 ) self . help_menu . add_command ( label = 'Online documentation' , command = self . onlineDocumentation ) self . help_menu . add_command ( label = 'Report Bug' , command = self . gotoBugzilla ) self . help_menu . add_command ( label = "About PEATDB" , command = self . aboutPEAT ) self . menu . add_cascade ( label = 'Help' , menu = self . help_menu ) self . main . config ( menu = self . menu ) self . toggleMenus ( 'disabled' ) return
Create the menu bar for the application.
Create the menu bar for the application .
"""Create the menu bar for the application. """ #'02Import Mutants':{'cmd':self.importMutants}, #'02Export to csv file':{'cmd':self.exportCSV},
self