From: Kevin A. <ka...@us...> - 2004-05-14 19:23:21
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12734 Modified Files: configuration.py debug.py pythoncard_config.txt Log Message: moved saveUserConfiguration to configuration and out of debug.py and codeEditor.py tidied up pythoncard_config.txt Index: debug.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/debug.py,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** debug.py 9 May 2004 19:46:05 -0000 1.130 --- debug.py 14 May 2004 19:23:11 -0000 1.131 *************** *** 601,621 **** def doSaveUserConfiguration(self, evt): ! if self.parentApp.mw is not None: ! configuration.setOption('messageWatcherPosition', self.parentApp.mw.GetPositionTuple()) ! configuration.setOption('messageWatcherSize', self.parentApp.mw.GetSizeTuple()) ! configuration.setOption('showMessageWatcher', 0) ! if self.parentApp.namespaceFrame is not None: ! configuration.setOption('namespacePosition', self.parentApp.namespaceFrame.GetPositionTuple()) ! configuration.setOption('namespaceSize', self.parentApp.namespaceFrame.GetSizeTuple()) ! configuration.setOption('showNamespace', 0) ! if self.parentApp.pw is not None: ! configuration.setOption('propertyEditorPosition', self.parentApp.pw.GetPositionTuple()) ! configuration.setOption('propertyEditorSize', self.parentApp.pw.GetSizeTuple()) ! configuration.setOption('showPropertyEditor', 0) ! if self.parentApp.shellFrame is not None: ! configuration.setOption('shellPosition', self.parentApp.shellFrame.GetPositionTuple()) ! configuration.setOption('shellSize', self.parentApp.shellFrame.GetSizeTuple()) ! configuration.setOption('showShell', 0) ! configuration.saveConfig() def onlineHomePage(self, evt): --- 601,605 ---- def doSaveUserConfiguration(self, evt): ! configuration.saveUserConfiguration(self.parentApp) def onlineHomePage(self, evt): Index: configuration.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/configuration.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** configuration.py 25 Apr 2004 15:23:34 -0000 1.3 --- configuration.py 14 May 2004 19:23:11 -0000 1.4 *************** *** 39,62 **** # pythoncard_config.txt # for standalones DEFAULT_CONFIG = { 'logfile':'pythoncard.log', ! 'logToStdout':1, ! 'showMessageWatcher':0, 'messageWatcherPosition':(0, 0), 'messageWatcherSize':(200, 300), ! #'messageWatcherVisible':1, ! 'showPropertyEditor':0, 'propertyEditorPosition':(0, 0), 'propertyEditorSize':(360, 240), ! #'propertyEditorVisible':1, ! 'showShell':0, 'shellPosition':(0, 0), 'shellSize':(500, 200), ! #'shellVisible':1, ! 'showNamespace':0, 'namespacePosition':(0, 0), 'namespaceSize':(600, 300), - #'namespaceVisible':1, - 'enableLogging':0 } --- 39,59 ---- # pythoncard_config.txt # for standalones + # updated 2004-05-14 DEFAULT_CONFIG = { + 'enableLogging':False, 'logfile':'pythoncard.log', ! 'logToStdout':True, ! 'showMessageWatcher':False, 'messageWatcherPosition':(0, 0), 'messageWatcherSize':(200, 300), ! 'showPropertyEditor':False, 'propertyEditorPosition':(0, 0), 'propertyEditorSize':(360, 240), ! 'showShell':False, 'shellPosition':(0, 0), 'shellSize':(500, 200), ! 'showNamespace':False, 'namespacePosition':(0, 0), 'namespaceSize':(600, 300), } *************** *** 254,257 **** --- 251,278 ---- setOption('showDebugMenu', 1) + def saveUserConfiguration(app): + """ + Given an application instance, save the current settings of the runtime + windows. + """ + if app.mw is not None: + setOption('messageWatcherPosition', app.mw.GetPositionTuple()) + setOption('messageWatcherSize', app.mw.GetSizeTuple()) + setOption('showMessageWatcher', False) + if app.namespaceFrame is not None: + setOption('namespacePosition', app.namespaceFrame.GetPositionTuple()) + setOption('namespaceSize', app.namespaceFrame.GetSizeTuple()) + setOption('showNamespace', False) + if app.pw is not None: + setOption('propertyEditorPosition', app.pw.GetPositionTuple()) + setOption('propertyEditorSize', app.pw.GetSizeTuple()) + setOption('showPropertyEditor', False) + if app.shellFrame is not None: + setOption('shellPosition', app.shellFrame.GetPositionTuple()) + setOption('shellSize', app.shellFrame.GetSizeTuple()) + setOption('showShell', False) + setOption('enableLogging', False) + saveConfig() + if __name__ == '__main__' : Index: pythoncard_config.txt =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/pythoncard_config.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pythoncard_config.txt 12 Jan 2003 22:35:04 -0000 1.1 --- pythoncard_config.txt 14 May 2004 19:23:11 -0000 1.2 *************** *** 3,24 **** { 'logfile':'pythoncard.log', ! 'logToStdout':1, ! 'showMessageWatcher':0, 'messageWatcherPosition':(0, 0), 'messageWatcherSize':(200, 300), ! #'messageWatcherVisible':1, ! 'showPropertyEditor':0, 'propertyEditorPosition':(0, 0), 'propertyEditorSize':(360, 240), ! #'propertyEditorVisible':1, ! 'showShell':0, 'shellPosition':(0, 0), 'shellSize':(500, 200), ! #'shellVisible':1, ! 'showNamespace':0, 'namespacePosition':(0, 0), 'namespaceSize':(600, 300), - #'namespaceVisible':1, - 'enableLogging':0 } --- 3,20 ---- { + 'enableLogging':False, 'logfile':'pythoncard.log', ! 'logToStdout':True, ! 'showMessageWatcher':False, 'messageWatcherPosition':(0, 0), 'messageWatcherSize':(200, 300), ! 'showPropertyEditor':False, 'propertyEditorPosition':(0, 0), 'propertyEditorSize':(360, 240), ! 'showShell':False, 'shellPosition':(0, 0), 'shellSize':(500, 200), ! 'showNamespace':False, 'namespacePosition':(0, 0), 'namespaceSize':(600, 300), } |