Update of /cvsroot/pythoncard/PythonCard/tools/findfiles
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15782/findfiles
Modified Files:
findfiles.py
Log Message:
getCommandLineArgs moved to util.py
runOptionsDialog moved to templates.dialogs.runOptionsDialog.py
dialog.py is now a thin wrapper around wx.lib.dialogs.py
all dialog results now use DialogResults class instead of dictionary
e.g. result.accepted instead of result['accepted']
see dialogs sample and other samples and tools for examples of change
Index: findfiles.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/tools/findfiles/findfiles.py,v
retrieving revision 1.80
retrieving revision 1.81
diff -C2 -d -r1.80 -r1.81
*** findfiles.py 3 Aug 2004 05:40:53 -0000 1.80
--- findfiles.py 12 Aug 2004 19:14:21 -0000 1.81
***************
*** 180,185 ****
wildcard = "Grep files (*.grep)|*.grep|All files (*.*)|*.*"
result = dialog.openFileDialog(wildcard=wildcard)
! if result['accepted']:
! path = result['paths'][0]
self.loadGrepFile(path)
--- 180,185 ----
wildcard = "Grep files (*.grep)|*.grep|All files (*.*)|*.*"
result = dialog.openFileDialog(wildcard=wildcard)
! if result.accepted:
! path = result.paths[0]
self.loadGrepFile(path)
***************
*** 187,192 ****
wildcard = "Grep files (*.grep)|*.grep"
result = dialog.openFileDialog(wildcard=wildcard)
! if result['accepted']:
! s = result['paths'][0]
self.dir = os.path.dirname(s)
fileList = []
--- 187,192 ----
wildcard = "Grep files (*.grep)|*.grep"
result = dialog.openFileDialog(wildcard=wildcard)
! if result.accepted:
! s = result.paths[0]
self.dir = os.path.dirname(s)
fileList = []
***************
*** 316,321 ****
dirs = wFldDirectories.text
result = dialog.directoryDialog(self, '', '')
! if result['accepted']:
! s = result['path']
if dirs == "":
wFldDirectories.text = s
--- 316,321 ----
dirs = wFldDirectories.text
result = dialog.directoryDialog(self, '', '')
! if result.accepted:
! s = result.path
if dirs == "":
wFldDirectories.text = s
***************
*** 356,365 ****
filename = os.path.basename(self.documentPath)
result = dialog.saveFileDialog(None, "Save As", dir, filename, wildcard)
! if result['accepted']:
! path = result['paths'][0]
self.saveGrepFile(path)
! return 1
else:
! return 0
def editFile(self, filename, lineno=None):
--- 356,365 ----
filename = os.path.basename(self.documentPath)
result = dialog.saveFileDialog(None, "Save As", dir, filename, wildcard)
! if result.accepted:
! path = result.paths[0]
self.saveGrepFile(path)
! return True
else:
! return False
def editFile(self, filename, lineno=None):
|