def addSettingsMenuSetWindowGeometry(self, center): "Add the settings menu, center the scroll region, update, and set the window geometry." self.settingsMenu = settings.Tkinter.Menu(self.fileHelpMenuBar.menuBar, tearoff=0) self.fileHelpMenuBar.addMenuToMenuBar("Settings", self.settingsMenu) settings.addMenuEntitiesToMenuFrameable(self.settingsMenu, self.repository.menuEntities) self.relayXview(settings.Tkinter.MOVETO, center.real - self.canvasScreenCenter.real) self.relayYview(settings.Tkinter.MOVETO, center.imag - self.canvasScreenCenter.imag) self.root.withdraw() self.root.update_idletasks() movedGeometryString = "%sx%s+%s" % (self.root.winfo_reqwidth(), self.root.winfo_reqheight(), "0+0") self.root.geometry(movedGeometryString)
def addSettingsMenuSetWindowGeometry( self, center ): 'Add the settings menu, center the scroll region, update, and set the window geometry.' self.settingsMenu = settings.Tkinter.Menu( self.fileHelpMenuBar.menuBar, tearoff = 0 ) self.fileHelpMenuBar.addMenuToMenuBar( 'Settings', self.settingsMenu ) settings.addMenuEntitiesToMenuFrameable( self.settingsMenu, self.repository.menuEntities ) self.relayXview( settings.Tkinter.MOVETO, center.real - self.canvasScreenCenter.real ) self.relayYview( settings.Tkinter.MOVETO, center.imag - self.canvasScreenCenter.imag ) self.root.withdraw() self.root.update_idletasks() movedGeometryString = '%sx%s+%s' % ( self.root.winfo_reqwidth(), self.root.winfo_reqheight(), '0+0') self.root.geometry( movedGeometryString )