Update of /cvsroot/pythoncard/PythonCard/samples/saveClipboardBitmap
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/saveClipboardBitmap
Modified Files:
saveClipboardBitmap.py
Log Message:
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: saveClipboardBitmap.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/saveClipboardBitmap/saveClipboardBitmap.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** saveClipboardBitmap.py 10 May 2004 05:02:38 -0000 1.16
--- saveClipboardBitmap.py 12 Aug 2004 19:18:58 -0000 1.17
***************
*** 70,75 ****
"|All Files (*.*)|*.*"
result = dialog.saveFileDialog(None, "Save As", path, filename, wildcard)
! if result['accepted']:
! path = result['paths'][0]
fileType = graphic.bitmapType(path)
#print fileType, path
--- 70,75 ----
"|All Files (*.*)|*.*"
result = dialog.saveFileDialog(None, "Save As", path, filename, wildcard)
! if result.accepted:
! path = result.paths[0]
fileType = graphic.bitmapType(path)
#print fileType, path
***************
*** 77,85 ****
try:
self.bmp.SaveFile(path, fileType)
! return 1
except:
! return 0
else:
! return 0
--- 77,85 ----
try:
self.bmp.SaveFile(path, fileType)
! return True
except:
! return False
else:
! return False
|