From: Kevin A. <ka...@us...> - 2004-07-19 18:21:53
|
Update of /cvsroot/pythoncard/PythonCard/tools/codeEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18207/tools/codeEditor Modified Files: codeEditor.py codeEditor.rsrc.py Log Message: added menuShellChangeDirectory method to simplify changing dir in the shell Index: codeEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditor.py,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** codeEditor.py 14 May 2004 19:23:11 -0000 1.116 --- codeEditor.py 19 Jul 2004 18:21:44 -0000 1.117 *************** *** 906,909 **** --- 906,923 ---- configuration.saveUserConfiguration(self.application) + def on_menuShellChangeDirectory_select(self, event): + try: + if self.documentPath: + path = os.path.dirname(self.documentPath) + else: + path = '' + result = dialog.directoryDialog(self, 'Choose a directory', path) + if result['accepted']: + path = result['path'] + os.chdir(path) + self.application.shell.run('os.getcwd()') + except: + pass + def on_menuScriptletSaveShellSelection_select(self, event): if self.application.shell is not None: Index: codeEditor.rsrc.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/codeEditor/codeEditor.rsrc.py,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** codeEditor.rsrc.py 10 May 2004 05:02:48 -0000 1.32 --- codeEditor.rsrc.py 19 Jul 2004 18:21:45 -0000 1.33 *************** *** 273,276 **** --- 273,280 ---- }, {'type':'MenuItem', + 'name':'menuShellChangeDirectory', + 'label':'Change &Directory...', + }, + {'type':'MenuItem', 'name':'scriptletSep1', 'label':'-', |