You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(45) |
May
(185) |
Jun
|
Jul
(36) |
Aug
(205) |
Sep
(98) |
Oct
(107) |
Nov
(6) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(1) |
Feb
(2) |
Mar
(19) |
Apr
(26) |
May
(18) |
Jun
|
Jul
(12) |
Aug
(16) |
Sep
(22) |
Oct
(7) |
Nov
(11) |
Dec
(74) |
2006 |
Jan
(14) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(14) |
Jun
(5) |
Jul
(20) |
Aug
(10) |
Sep
(1) |
Oct
|
Nov
(4) |
Dec
(1) |
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
(14) |
Aug
|
Sep
|
Oct
(6) |
Nov
(1) |
Dec
|
From: Alex T. <ale...@us...> - 2004-08-12 23:55:58
|
Update of /cvsroot/pythoncard/PythonCard/tools/resourceEditor In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3227 Modified Files: resourceEditor.py Log Message: Add a dialog to give new name and, if appropriate, label/text when creating a component via (Edit/Duplicate, Copy/Paste or Component/<comp>). Provide offset checkboxes to allow easy default positioning. Index: resourceEditor.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/tools/resourceEditor/resourceEditor.py,v retrieving revision 1.204 retrieving revision 1.205 diff -C2 -d -r1.204 -r1.205 *** resourceEditor.py 12 Aug 2004 19:14:22 -0000 1.204 --- resourceEditor.py 12 Aug 2004 23:55:48 -0000 1.205 *************** *** 21,24 **** --- 21,25 ---- from modules import stackInfoDialog from modules import menuDialog + from modules.newComponentDialog import NewComponentDialog from modules import stringDialog from modules.dialogInfoDialog import DialogInfoDialog *************** *** 1022,1082 **** ##self.propertyEditorWindow.Thaw() def on_componentDuplicate_command(self, event): if self.startName in self.components: aWidget = self.components[self.startName] - result = dialog.textEntryDialog(self, 'Duplicate ' + self.startName, - 'Name for copy:', - self.startName + 'Copy') - if result.accepted: - name = result.text - if name in self.components: - dialog.alertDialog(self, name + " already exists", 'Error: Unable to duplicate widget') - else: - # now loop through the original widget and build a dictionary suitable - # for making a copy - d = {} - d['type'] = aWidget.__class__.__name__ - #for key in aWidget._getAttributeNames(): - attributes = aWidget._spec.getAttributes().keys() - attributes.sort() - for key in attributes: - # I'm not exactly sure why I have to special-case these tuples - if key == 'bitmap': - # this should get recreated from the file attribute - pass - elif key in ['position', 'size']: - d[key] = getattr(aWidget, key) - elif getattr(aWidget, key) is not None: - d[key] = getattr(aWidget, key) - d['name'] = name - #d['toolTip'] = '' - #print d - - # a lot of this is common to add widget below - # so refactor so the common code is in a method - self.components[name] = d - # offset the widget so that it isn't underneath - # the original - x, y = self.components[name].position - x += 10 - y += 10 - self.components[name].position = (x, y) - - self.components.order.remove(name) - self.components.order.insert(NUM_SIZING_HANDLES, name) - self.fixComponentOrder(name) - - self.startName = name - self.startPosition = self.components[self.startName].position - self.startSize = self.components[self.startName].size - self.offset = (0, 0) - self.showSizingHandles(name) - self.documentChanged = True ! c = self.components[name] ! wx.EVT_LEFT_DOWN(c, self.on_mouseDown) ! wx.EVT_LEFT_UP(c, self.on_mouseUp) ! wx.EVT_MOTION(c, self.on_mouseDrag) def on_componentDelete_command(self, event): --- 1023,1104 ---- ##self.propertyEditorWindow.Thaw() + def create_component(self, desc, offsets, promptString, errString): + dlg = NewComponentDialog(self, desc, offsets, promptString) + result = dlg.showModal() + if result.accepted: + name = dlg.components.fldName.text + if name in self.components: + dialog.alertDialog(self, name + " already exists", 'Error: Unable to '+errString+' widget') + return + if 'label' in desc.keys(): + desc['label'] = dlg.components.fldLabelOrText.text + elif 'text' in desc.keys(): + desc['text'] = dlg.components.fldLabelOrText.text + + desc['name'] = name + self.components[name] = desc + if offsets: + # offset the widget so that it isn't underneath the original + x, y = self.components[name].position + dx, dy = self.components[name].size + #rint x, y, dx, dy + if dlg.components.chkHorizontal.checked: + x += dx+30 + if dlg.components.chkVertical.checked: + y += dy+30 + else: + if dlg.components.chkVertical.checked: + y += dy+30 + else: + x += 10 + y += 10 + #rint " => ", x, y + self.components[name].position = (x, y) + + # KEA 2001-12-20 + # hack to insert component so that it is the first one + # in the list + # a similar trick will be needed for re-ordering widgets + self.components.order.remove(name) + self.components.order.insert(NUM_SIZING_HANDLES, name) + self.fixComponentOrder(name) + + self.startName = name + self.startPosition = self.components[self.startName].position + self.startSize = self.components[self.startName].size + self.offset = (0, 0) + self.showSizingHandles(name) + self.documentChanged = True + + c = self.components[self.startName] + wx.EVT_LEFT_DOWN(c, self.on_mouseDown) + wx.EVT_LEFT_UP(c, self.on_mouseUp) + wx.EVT_MOTION(c, self.on_mouseDrag) + def on_componentDuplicate_command(self, event): if self.startName in self.components: aWidget = self.components[self.startName] ! # now loop through the original widget and build a dictionary suitable ! # for making a copy ! d = {} ! d['type'] = aWidget.__class__.__name__ ! #for key in aWidget._getAttributeNames(): ! attributes = aWidget._spec.getAttributes().keys() ! attributes.sort() ! for key in attributes: ! # I'm not exactly sure why I have to special-case these tuples ! if key == 'bitmap': ! # this should get recreated from the file attribute ! pass ! elif key == "id": ! # must avoid duplicate IDs ! pass ! elif key in ['position', 'size']: ! d[key] = getattr(aWidget, key) ! elif getattr(aWidget, key) is not None: ! d[key] = getattr(aWidget, key) + self.create_component(d, True, 'Duplicate ' + d['type'], "duplicate") def on_componentDelete_command(self, event): *************** *** 1104,1130 **** i += 1 desc['position'] = (10, 10) ! ! name = desc['name'] ! self.components[name] = desc ! ! # KEA 2001-12-20 ! # hack to insert component so that it is the first one ! # in the list ! # a similar trick will be needed for re-ordering widgets ! self.components.order.remove(name) ! self.components.order.insert(NUM_SIZING_HANDLES, name) ! self.fixComponentOrder(name) ! ! self.startName = name ! self.startPosition = self.components[self.startName].position ! self.startSize = self.components[self.startName].size ! self.offset = (0, 0) ! self.showSizingHandles(name) ! self.documentChanged = True ! ! c = self.components[self.startName] ! wx.EVT_LEFT_DOWN(c, self.on_mouseDown) ! wx.EVT_LEFT_UP(c, self.on_mouseUp) ! wx.EVT_MOTION(c, self.on_mouseDrag) def on_componentSendBack_command(self, event): --- 1126,1131 ---- i += 1 desc['position'] = (10, 10) ! self.create_component(desc, False, "New"+className, "create") ! def on_componentSendBack_command(self, event): *************** *** 1537,1568 **** desc = eval(desc) name = desc['name'] ! if name in self.components: ! aWidget = self.components[name] ! result = dialog.textEntryDialog(self, 'New name', ! name + ' component already exists\nEnter a new name:', ! name + 'Copy') ! if result.accepted: ! name = result.text ! if name in self.components: ! dialog.alertDialog(self, name + " already exists", 'Error: Unable to duplicate component') ! return ! else: ! return ! #print name, desc ! desc['name'] = name ! self.components[name] = desc ! ! # this is common to duplicate, need to refactor ! self.components.order.remove(name) ! self.components.order.insert(NUM_SIZING_HANDLES, name) ! self.fixComponentOrder(name) ! ! self.startName = name ! self.startPosition = self.components[self.startName].position ! self.startSize = self.components[self.startName].size ! self.offset = (0, 0) ! self.showSizingHandles(name) ! self.documentChanged = True ! def loadConfig(self): --- 1538,1544 ---- desc = eval(desc) name = desc['name'] ! # AGT 2004-07-08 ! # give dialog to set name ! self.create_component(desc, True, 'Paste ' + desc['type'], "paste") def loadConfig(self): |
From: Kevin A. <ka...@us...> - 2004-08-12 19:45:36
|
Update of /cvsroot/pythoncard/PythonCard/samples/sounds In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22108/samples/sounds Added Files: .cvsignore Log Message: added .cvsignore files --- NEW FILE: .cvsignore --- .cvsignore *.pyc *.pyo *.log .DS_Store |
From: Kevin A. <ka...@us...> - 2004-08-12 19:45:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/redemo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22108/samples/redemo Added Files: .cvsignore Log Message: added .cvsignore files --- NEW FILE: .cvsignore --- .cvsignore *.pyc *.pyo *.log .DS_Store |
From: Kevin A. <ka...@us...> - 2004-08-12 19:44:48
|
Update of /cvsroot/pythoncard/PythonCard/tools/textEditor/scriptlets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21723/tools/textEditor/scriptlets Added Files: .cvsignore Log Message: added .cvsignore files and/or *.pyc ignore line --- NEW FILE: .cvsignore --- .cvsignore *.pyc *.pyo *.log .DS_Store |
From: Kevin A. <ka...@us...> - 2004-08-12 19:44:47
|
Update of /cvsroot/pythoncard/PythonCard/samples/tictactoe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21723/samples/tictactoe Added Files: .cvsignore Log Message: added .cvsignore files and/or *.pyc ignore line --- NEW FILE: .cvsignore --- .cvsignore *.pyc *.pyo *.log .DS_Store |
From: Kevin A. <ka...@us...> - 2004-08-12 19:40:49
|
Update of /cvsroot/pythoncard/PythonCard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21082 Modified Files: flatfileDatabase.py gadflyDatabase.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: flatfileDatabase.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/flatfileDatabase.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** flatfileDatabase.py 3 Aug 2004 15:57:32 -0000 1.23 --- flatfileDatabase.py 12 Aug 2004 19:40:39 -0000 1.24 *************** *** 578,583 **** def sortRecords(self, name=None): result = dialog.singleChoiceDialog(self.view, "Sort", "Sort cards by field:", self.sortableFields) ! if result['accepted']: ! self.sortByFieldName(result['selection']) def updateStatusBar(self): --- 578,583 ---- def sortRecords(self, name=None): result = dialog.singleChoiceDialog(self.view, "Sort", "Sort cards by field:", self.sortableFields) ! if result.accepted: ! self.sortByFieldName(result.selection) def updateStatusBar(self): *************** *** 808,814 **** # this version doesn't alert the user if the line number is out-of-range # it just fails quietly ! if result['accepted']: try: ! i = int(result['text']) if i > 0: self.document.goRecord(i - 1) --- 808,814 ---- # this version doesn't alert the user if the line number is out-of-range # it just fails quietly ! if result.accepted: try: ! i = int(result.text) if i > 0: self.document.goRecord(i - 1) *************** *** 856,866 **** searchableFields ) ! if result['accepted']: startTime = time.time() ! self.lastFind['searchText'] = result['searchText'] ! self.lastFind['wholeWordsOnly'] = result['wholeWordsOnly'] ! self.lastFind['caseSensitive'] = result['caseSensitive'] ! self.lastFind['searchField'] = result['searchField'] self.document.findRecord(self.lastFind['searchText'], self.lastFind['caseSensitive'], --- 856,866 ---- searchableFields ) ! if result.accepted: startTime = time.time() ! self.lastFind['searchText'] = result.searchText ! self.lastFind['wholeWordsOnly'] = result.wholeWordsOnly ! self.lastFind['caseSensitive'] = result.caseSensitive ! self.lastFind['searchField'] = result.searchField self.document.findRecord(self.lastFind['searchText'], self.lastFind['caseSensitive'], Index: gadflyDatabase.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/gadflyDatabase.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** gadflyDatabase.py 14 Apr 2004 02:38:47 -0000 1.10 --- gadflyDatabase.py 12 Aug 2004 19:40:39 -0000 1.11 *************** *** 9,13 **** """ ! from PythonCard import dialog, log, model, util from PythonCard import flatfileDatabase import os, sys --- 9,13 ---- """ ! from PythonCard import log, model from PythonCard import flatfileDatabase import os, sys |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:40
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleIEBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/simpleIEBrowser Modified Files: simpleIEBrowser.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: simpleIEBrowser.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleIEBrowser/simpleIEBrowser.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** simpleIEBrowser.py 10 May 2004 00:45:22 -0000 1.13 --- simpleIEBrowser.py 12 Aug 2004 19:19:01 -0000 1.14 *************** *** 94,99 **** wildcard = "HTML files (*.htm;*.html)|*.htm;*.html|All files (*.*)|*.*" result = dialog.openFileDialog(None, "Open file", '', '', wildcard) ! if result['accepted']: ! path = result['paths'][0] self.openFile(path) --- 94,99 ---- wildcard = "HTML files (*.htm;*.html)|*.htm;*.html|All files (*.*)|*.*" result = dialog.openFileDialog(None, "Open file", '', '', wildcard) ! if result.accepted: ! path = result.paths[0] self.openFile(path) |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:40
|
Update of /cvsroot/pythoncard/PythonCard/samples/simpleBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/simpleBrowser Modified Files: simpleBrowser.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: simpleBrowser.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/simpleBrowser/simpleBrowser.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** simpleBrowser.py 5 May 2004 16:53:45 -0000 1.18 --- simpleBrowser.py 12 Aug 2004 19:18:59 -0000 1.19 *************** *** 90,95 **** wildcard = "HTML files (*.htm;*.html)|*.htm;*.html;*.HTM;*.HTML|All files (*.*)|*.*" result = dialog.openFileDialog(None, "Open file", '', '', wildcard) ! if result['accepted']: ! path = result['paths'][0] self.openFile(path) --- 90,95 ---- wildcard = "HTML files (*.htm;*.html)|*.htm;*.html;*.HTM;*.HTML|All files (*.*)|*.*" result = dialog.openFileDialog(None, "Open file", '', '', wildcard) ! if result.accepted: ! path = result.paths[0] self.openFile(path) |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:38
|
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 |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:37
|
Update of /cvsroot/pythoncard/PythonCard/samples/pysshed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/pysshed Modified Files: customDialogs.py pysshed.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: customDialogs.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/customDialogs.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** customDialogs.py 10 May 2004 00:45:20 -0000 1.10 --- customDialogs.py 12 Aug 2004 19:18:56 -0000 1.11 *************** *** 100,105 **** wildcard = "All Files|*" result = dialog.openFileDialog(self, 'Open', start, '', wildcard) ! if result['accepted']: ! self.components.identityFile.text = result['paths'][0] def on_btnOK_mouseClick(self, event): --- 100,105 ---- wildcard = "All Files|*" result = dialog.openFileDialog(self, 'Open', start, '', wildcard) ! if result.accepted: ! self.components.identityFile.text = result.paths[0] def on_btnOK_mouseClick(self, event): *************** *** 125,131 **** msgtxt += 'want to accept it anyway?' result = dialog.messageDialog(self, wrap_string(msgtxt, 50), 'Warning:', ! dialog.ICON_EXCLAMATION, ! dialog.BUTTON_YES_NO|dialog.BUTTON_NO_DEFAULT) ! accept = result['accepted'] if accept: if not self.parent.cfg.has_section(self.components.sessionName.text): --- 125,130 ---- msgtxt += 'want to accept it anyway?' result = dialog.messageDialog(self, wrap_string(msgtxt, 50), 'Warning:', ! wx.ICON_EXCLAMATION | wx.YES_NO | wx.NO_DEFAULT) ! accept = result.accepted if accept: if not self.parent.cfg.has_section(self.components.sessionName.text): Index: pysshed.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pysshed/pysshed.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** pysshed.py 5 May 2004 16:53:28 -0000 1.10 --- pysshed.py 12 Aug 2004 19:18:57 -0000 1.11 *************** *** 35,38 **** --- 35,39 ---- import os, sys + import wx from PythonCard import model import ConfigParser *************** *** 152,158 **** msgtxt = 'Are you sure you want to delete "%s"?' % self.components.sessionList.stringSelection result = dialog.messageDialog(self, msgtxt, 'Caution!', ! dialog.ICON_EXCLAMATION, ! dialog.BUTTON_YES_NO|dialog.BUTTON_NO_DEFAULT) ! if result['accepted']: bull = self.cfg.remove_section(self.components.sessionList.stringSelection) fd = open(CONFIG_FILE, 'w') --- 153,158 ---- msgtxt = 'Are you sure you want to delete "%s"?' % self.components.sessionList.stringSelection result = dialog.messageDialog(self, msgtxt, 'Caution!', ! wx.ICON_EXCLAMATION | wx.YES_NO | wx.NO_DEFAULT) ! if result.accepted: bull = self.cfg.remove_section(self.components.sessionList.stringSelection) fd = open(CONFIG_FILE, 'w') |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:37
|
Update of /cvsroot/pythoncard/PythonCard/samples/radioclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/radioclient Modified Files: radioclient.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: radioclient.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/radioclient/radioclient.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** radioclient.py 10 May 2004 00:45:21 -0000 1.25 --- radioclient.py 12 Aug 2004 19:18:57 -0000 1.26 *************** *** 187,193 **** msg = "Are you sure want to delete post %s made on %s?" % (postID, dateTime) result = dialog.messageDialog(self, msg, 'Delete Post', ! dialog.ICON_EXCLAMATION, ! dialog.BUTTON_YES_NO | dialog.BUTTON_NO_DEFAULT) ! if result['accepted']: self.blog.deletePost(int(postID)) # now get the recent posts again just to be safe --- 187,192 ---- msg = "Are you sure want to delete post %s made on %s?" % (postID, dateTime) result = dialog.messageDialog(self, msg, 'Delete Post', ! wx.ICON_EXCLAMATION | wx.YES_NO | wx.NO_DEFAULT) ! if result.accepted: self.blog.deletePost(int(postID)) # now get the recent posts again just to be safe |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:36
|
Update of /cvsroot/pythoncard/PythonCard/samples/pictureViewer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/pictureViewer Modified Files: pictureViewer.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: pictureViewer.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/pictureViewer/pictureViewer.py,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** pictureViewer.py 10 May 2004 00:45:20 -0000 1.22 --- pictureViewer.py 12 Aug 2004 19:18:56 -0000 1.23 *************** *** 142,148 **** def on_menuImageScaleSize_select(self, event): result = dialog.textEntryDialog(self, "Scale image", "Scale by percent:", "") ! if result['accepted']: try: ! scale = float(result['text']) / 100.0 self.displayFileScaled(scale, scale) except: --- 142,148 ---- def on_menuImageScaleSize_select(self, event): result = dialog.textEntryDialog(self, "Scale image", "Scale by percent:", "") ! if result.accepted: try: ! scale = float(result.text) / 100.0 self.displayFileScaled(scale, scale) except: *************** *** 195,200 **** def on_menuFileOpen_select(self, event): result = dialog.openFileDialog() ! if result['accepted']: ! self.openFile(result['paths'][0]) def on_menuFileSaveAs_select(self, event): --- 195,200 ---- def on_menuFileOpen_select(self, event): result = dialog.openFileDialog() ! if result.accepted: ! self.openFile(result.paths[0]) def on_menuFileSaveAs_select(self, event): *************** *** 206,211 **** wildcard = "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 --- 206,211 ---- wildcard = "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 *************** *** 216,224 **** bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return 1 except: ! return 0 else: ! return 0 def on_menuEditCopy_select(self, event): --- 216,224 ---- bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return True except: ! return False else: ! return False def on_menuEditCopy_select(self, event): |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:36
|
Update of /cvsroot/pythoncard/PythonCard/samples/multicolumnexample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/multicolumnexample Modified Files: multicolumnexample.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: multicolumnexample.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/multicolumnexample/multicolumnexample.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** multicolumnexample.py 5 May 2004 16:53:27 -0000 1.6 --- multicolumnexample.py 12 Aug 2004 19:18:56 -0000 1.7 *************** *** 156,163 **** wildcard = "CSV files (*.csv)|*.csv|Text files (*.txt;*.log)|*.txt;*.log|All Files (*.*)|*.*" result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! if not result['accepted']: pprint.pprint(result) return ! for fn in result['paths']: lines = open(fn, 'r').read().strip().split('\n') items = [x.split(',') for x in lines] --- 156,163 ---- wildcard = "CSV files (*.csv)|*.csv|Text files (*.txt;*.log)|*.txt;*.log|All Files (*.*)|*.*" result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! if not result.accepted: pprint.pprint(result) return ! for fn in result.paths lines = open(fn, 'r').read().strip().split('\n') items = [x.split(',') for x in lines] *************** *** 193,201 **** wildcard = "CSV files (*.csv)|*.csv|Text files (*.txt;*.log)|*.txt;*.log|All Files (*.*)|*.*" result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! if not result['accepted']: pprint.pprint(result) return items = [] ! for fn in result['paths']: lines = open(fn, 'r').read().strip().split('\n') items.extend([x.split(',') for x in lines]) --- 193,201 ---- wildcard = "CSV files (*.csv)|*.csv|Text files (*.txt;*.log)|*.txt;*.log|All Files (*.*)|*.*" result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! if not result.accepted: pprint.pprint(result) return items = [] ! for fn in result.paths: lines = open(fn, 'r').read().strip().split('\n') items.extend([x.split(',') for x in lines]) |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:36
|
Update of /cvsroot/pythoncard/PythonCard/samples/addresses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/addresses Modified Files: addresses.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: addresses.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/addresses/addresses.py,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** addresses.py 10 May 2004 00:45:18 -0000 1.34 --- addresses.py 12 Aug 2004 19:18:47 -0000 1.35 *************** *** 290,295 **** def on_findRecord_command(self, event): result = dialog.findDialog(self) ! if result['accepted']: ! self.document.findRecord(result['searchText'], result['caseSensitive']) def on_editUndo_command(self, event): --- 290,295 ---- def on_findRecord_command(self, event): result = dialog.findDialog(self) ! if result.accepted: ! self.document.findRecord(result.searchText, result.caseSensitive) def on_editUndo_command(self, event): |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:36
|
Update of /cvsroot/pythoncard/PythonCard/samples/custdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/custdb Modified Files: custdb.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: custdb.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/custdb/custdb.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** custdb.py 24 Apr 2004 21:09:17 -0000 1.8 --- custdb.py 12 Aug 2004 19:18:50 -0000 1.9 *************** *** 175,180 **** def on_delButt_mouseUp(self, event): result = dialog.messageDialog(self, 'Are you sure you want to delete the entry: %s ?'%self.rowsDict[self.selected]['name'], 'Delete Entry.' ) ! if result['accepted']: ! print "messageDialog result:\naccepted: %s\nreturned: %s" % (result['accepted'], result['returned']) del self.rowsDict[self.selected] self.selected -= 1 --- 175,180 ---- def on_delButt_mouseUp(self, event): result = dialog.messageDialog(self, 'Are you sure you want to delete the entry: %s ?'%self.rowsDict[self.selected]['name'], 'Delete Entry.' ) ! if result.accepted: ! print "messageDialog result:\naccepted: %s\nreturnedString: %s" % (result.accepted, result.returnedString) del self.rowsDict[self.selected] self.selected -= 1 |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/mp3player In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/mp3player Modified Files: mp3player.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: mp3player.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/mp3player/mp3player.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mp3player.py 8 Aug 2004 17:43:56 -0000 1.2 --- mp3player.py 12 Aug 2004 19:18:54 -0000 1.3 *************** *** 28,33 **** wildcard = "MP3 files (*.mp3)|*.mp3" result = dialog.openFileDialog(self, 'Open', path, filename, wildcard ) ! if result['accepted']: ! path = result['paths'][0] self.components.filename.text = path --- 28,33 ---- wildcard = "MP3 files (*.mp3)|*.mp3" result = dialog.openFileDialog(self, 'Open', path, filename, wildcard ) ! if result.accepted: ! path = result.paths[0] self.components.filename.text = path |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/dialogs Modified Files: dialogs.py minimalDialog.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: minimalDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dialogs/minimalDialog.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** minimalDialog.py 15 Apr 2004 23:59:29 -0000 1.6 --- minimalDialog.py 12 Aug 2004 19:18:51 -0000 1.7 *************** *** 6,10 **** from PythonCard import model - import os class MinimalDialog(model.CustomDialog): --- 6,9 ---- *************** *** 17,23 **** def minimalDialog(parent, txt): dlg = MinimalDialog(parent, txt) ! dlg.showModal() ! result = {'accepted':dlg.accepted()} ! result['text'] = dlg.components.field1.text dlg.destroy() return result --- 16,21 ---- def minimalDialog(parent, txt): dlg = MinimalDialog(parent, txt) ! result = dlg.showModal() ! result.text = dlg.components.field1.text dlg.destroy() return result Index: dialogs.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dialogs/dialogs.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dialogs.py 5 May 2004 16:53:25 -0000 1.21 --- dialogs.py 12 Aug 2004 19:18:50 -0000 1.22 *************** *** 24,47 **** def on_buttonMultipleChoice_mouseClick(self, event): result = dialog.multipleChoiceDialog(self, "title", "message", ['one', 'two', 'three']) ! self.components.fldResults.text = "multipleChoiceDialog result:\naccepted: %s\nSelection: %s" % (result['accepted'], result['selection']) def on_buttonSingleChoice_mouseClick(self, event): result = dialog.singleChoiceDialog(self, "title", "message", ['one', 'two', 'three']) ! self.components.fldResults.text = "singleChoiceDialog result:\naccepted: %s\nSelection: %s" % (result['accepted'], result['selection']) def on_buttonFind_mouseClick(self, event): result = dialog.findDialog(self) ! self.components.fldResults.text = "findDialog result:\naccepted: %s\nText: %s\nWhole word only: %s\nCase sensitive: %s" % (result['accepted'], ! result['searchText'], ! result['wholeWordsOnly'], ! result['caseSensitive']) def on_buttonColor_mouseClick(self, event): result = dialog.colorDialog(self) ! self.components.fldResults.text = "colorDialog result:\naccepted: %s\nColor: %s" % (result['accepted'], result['color']) def on_buttonFont_mouseClick(self, event): result = dialog.fontDialog(self) ! self.components.fldResults.text = "fontDialog result:\naccepted: %s\nColor: %s\nFont: %s" % (result['accepted'], result['color'], result['font']) def on_buttonFile_mouseClick(self, event): --- 24,47 ---- def on_buttonMultipleChoice_mouseClick(self, event): result = dialog.multipleChoiceDialog(self, "title", "message", ['one', 'two', 'three']) ! self.components.fldResults.text = "multipleChoiceDialog result:\naccepted: %s\nSelection: %s" % (result.accepted, result.selection) def on_buttonSingleChoice_mouseClick(self, event): result = dialog.singleChoiceDialog(self, "title", "message", ['one', 'two', 'three']) ! self.components.fldResults.text = "singleChoiceDialog result:\naccepted: %s\nSelection: %s" % (result.accepted, result.selection) def on_buttonFind_mouseClick(self, event): result = dialog.findDialog(self) ! self.components.fldResults.text = "findDialog result:\naccepted: %s\nText: %s\nWhole word only: %s\nCase sensitive: %s" % (result.accepted, ! result.text, ! result.wholeword, ! result.casesensitive) def on_buttonColor_mouseClick(self, event): result = dialog.colorDialog(self) ! self.components.fldResults.text = "colorDialog result:\naccepted: %s\nColor: %s" % (result.accepted, result.color) def on_buttonFont_mouseClick(self, event): result = dialog.fontDialog(self) ! self.components.fldResults.text = "fontDialog result:\naccepted: %s\nColor: %s\nFont: %s" % (result.accepted, result.color, result.font) def on_buttonFile_mouseClick(self, event): *************** *** 49,53 **** # wildcard = '*.py' result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! self.components.fldResults.text = "fileDialog result:\naccepted: %s\npaths: %s" % (result['accepted'], result['paths']) def on_buttonOpenFile_mouseClick(self, event): --- 49,53 ---- # wildcard = '*.py' result = dialog.fileDialog(self, 'Open', '', '', wildcard ) ! self.components.fldResults.text = "fileDialog result:\naccepted: %s\npaths: %s" % (result.accepted, result.paths) def on_buttonOpenFile_mouseClick(self, event): *************** *** 55,59 **** # wildcard = '*.py' result = dialog.openFileDialog(wildcard=wildcard) ! self.components.fldResults.text = "openFileDialog result:\naccepted: %s\npaths: %s" % (result['accepted'], result['paths']) def on_buttonSaveFile_mouseClick(self, event): --- 55,59 ---- # wildcard = '*.py' result = dialog.openFileDialog(wildcard=wildcard) ! self.components.fldResults.text = "openFileDialog result:\naccepted: %s\npaths: %s" % (result.accepted, result.paths) def on_buttonSaveFile_mouseClick(self, event): *************** *** 61,69 **** # wildcard = '*.py' result = dialog.saveFileDialog(wildcard=wildcard) ! self.components.fldResults.text = "saveFileDialog result:\naccepted: %s\npaths: %s" % (result['accepted'], result['paths']) def on_buttonDir_mouseClick(self, event): result = dialog.directoryDialog(self, 'Choose a directory', 'a') ! self.components.fldResults.text = "directoryDialog result:\naccepted: %s\npath: %s" % (result['accepted'], result['path']) """ --- 61,69 ---- # wildcard = '*.py' result = dialog.saveFileDialog(wildcard=wildcard) ! self.components.fldResults.text = "saveFileDialog result:\naccepted: %s\npaths: %s" % (result.accepted, result.paths) def on_buttonDir_mouseClick(self, event): result = dialog.directoryDialog(self, 'Choose a directory', 'a') ! self.components.fldResults.text = "directoryDialog result:\naccepted: %s\npath: %s" % (result.accepted, result.path) """ *************** *** 77,96 **** ICON_INFORMATION # Shows an information (i) icon. ! BUTTON_OK # Show an OK button. ! BUTTON_CANCEL # Show a Cancel button. ! BUTTON_YES_NO # Show Yes and No buttons. ! BUTTON_YES_DEFAULT # Used with wxYES_NO, makes Yes button the default - which is the default behaviour. ! BUTTON_NO_DEFAULT # Used with wxYES_NO, makes No button the default. """ def on_buttonMessage_mouseClick(self, event): """ result = dialog.messageDialog(self, 'a message', 'a title', ! dialog.ICON_ERROR, dialog.BUTTON_YES_NO) """ result = dialog.messageDialog(self, 'a message', 'a title', ! dialog.ICON_INFORMATION, ! dialog.BUTTON_YES_NO | dialog.BUTTON_NO_DEFAULT | dialog.BUTTON_CANCEL) #result = dialog.messageDialog(self, 'a message', 'a title') ! self.components.fldResults.text = "messageDialog result:\naccepted: %s\nreturned: %s" % (result['accepted'], result['returned']) # you can pass in an additional aStyle parameter --- 77,95 ---- ICON_INFORMATION # Shows an information (i) icon. ! OK # Show an OK button. ! CANCEL # Show a Cancel button. ! YES_NO # Show Yes and No buttons. ! YES_DEFAULT # Used with wxYES_NO, makes Yes button the default - which is the default behaviour. ! NO_DEFAULT # Used with wxYES_NO, makes No button the default. """ def on_buttonMessage_mouseClick(self, event): """ result = dialog.messageDialog(self, 'a message', 'a title', ! wx.ICON_ERROR | wx.YES_NO) """ result = dialog.messageDialog(self, 'a message', 'a title', ! wx.ICON_INFORMATION | wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL) #result = dialog.messageDialog(self, 'a message', 'a title') ! self.components.fldResults.text = "messageDialog result:\naccepted: %s\nreturnedString: %s" % (result.accepted, result.returnedString) # you can pass in an additional aStyle parameter *************** *** 105,111 **** 'A window title', 'What is your favorite language?', ! 'Python', dialog.TEXT_MULTILINE) """ ! self.components.fldResults.text = "textEntryDialog result:\naccepted: %s\nreturned: %s\ntext: %s" % (result['accepted'], result['returned'], result['text']) def on_buttonScrolledMessage_mouseClick(self, event): --- 104,110 ---- 'A window title', 'What is your favorite language?', ! 'Python', wx.TEXT_MULTILINE) """ ! self.components.fldResults.text = "textEntryDialog result:\naccepted: %s\nreturnedString: %s\ntext: %s" % (result.accepted, result.returnedString, result.text) def on_buttonScrolledMessage_mouseClick(self, event): *************** *** 118,130 **** msg = "Can't find the file dialogs.py" result = dialog.scrolledMessageDialog(self, msg, filename) ! self.components.fldResults.text = "scrolledMessageDialog result:\naccepted: %s" % (result['accepted']) def on_buttonAlert_mouseClick(self, event): result = dialog.alertDialog(self, 'a message', 'a title') ! self.components.fldResults.text = "alertDialog result:\naccepted: %s\nreturned: %s" % (result['accepted'], result['returned']) def on_buttonMinimalDialog_mouseClick(self, event): result = minimalDialog.minimalDialog(self, 'hello minimal') ! self.components.fldResults.text = "minimalDialog result:\naccepted: %s\ntext: %s" % (result['accepted'], result['text']) --- 117,129 ---- msg = "Can't find the file dialogs.py" result = dialog.scrolledMessageDialog(self, msg, filename) ! self.components.fldResults.text = "scrolledMessageDialog result:\naccepted: %s" % (result.accepted) def on_buttonAlert_mouseClick(self, event): result = dialog.alertDialog(self, 'a message', 'a title') ! self.components.fldResults.text = "alertDialog result:\naccepted: %s\nreturnedString: %s" % (result.accepted, result.returnedString) def on_buttonMinimalDialog_mouseClick(self, event): result = minimalDialog.minimalDialog(self, 'hello minimal') ! self.components.fldResults.text = "minimalDialog result:\naccepted: %s\ntext: %s" % (result.accepted, result.text) |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/jabberChat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/jabberChat Modified Files: conferenceDialog.py jabberChat.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: jabberChat.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/jabberChat/jabberChat.py,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** jabberChat.py 10 May 2004 00:45:19 -0000 1.31 --- jabberChat.py 12 Aug 2004 19:18:53 -0000 1.32 *************** *** 68,73 **** def on_doSetFont_command(self, event): result = dialog.fontDialog(self, self.components.fldDocument.font) ! if result['accepted']: ! self.config['font'] = result['font'] self.setChatWindowFont() --- 68,73 ---- def on_doSetFont_command(self, event): result = dialog.fontDialog(self, self.components.fldDocument.font) ! if result.accepted: ! self.config['font'] = result.font self.setChatWindowFont() *************** *** 322,329 **** nickname = self.jabberConnection.username result = conferenceDialog.conferenceDialog(self, '', server, nickname) ! if result['accepted']: ! room = result['room'] ! server = result['server'] ! nickname = result['nickname'] jid = room + '@' + server self.createGroupChatWindow(jid, nickname) --- 322,329 ---- nickname = self.jabberConnection.username result = conferenceDialog.conferenceDialog(self, '', server, nickname) ! if result.accepted: ! room = result.room ! server = result.server ! nickname = result.nickname jid = room + '@' + server self.createGroupChatWindow(jid, nickname) Index: conferenceDialog.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/jabberChat/conferenceDialog.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** conferenceDialog.py 22 Apr 2004 16:42:42 -0000 1.4 --- conferenceDialog.py 12 Aug 2004 19:18:53 -0000 1.5 *************** *** 20,28 **** def conferenceDialog(parent, room='', server=None, nickname=''): dlg = ConferenceDialog(parent, room, server, nickname) ! dlg.showModal() ! result = {'accepted':dlg.accepted()} ! result['room'] = dlg.components.fldRoomName.text ! result['server'] = dlg.components.cmbRoomServer.stringSelection ! result['nickname'] = dlg.components.fldNickname.text dlg.destroy() return result --- 20,27 ---- def conferenceDialog(parent, room='', server=None, nickname=''): dlg = ConferenceDialog(parent, room, server, nickname) ! result = dlg.showModal() ! result.room = dlg.components.fldRoomName.text ! result.server = dlg.components.cmbRoomServer.stringSelection ! result.nickname = dlg.components.fldNickname.text dlg.destroy() return result |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/life In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/life Modified Files: life.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: life.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/life/life.py,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** life.py 10 May 2004 00:45:19 -0000 1.38 --- life.py 12 Aug 2004 19:18:53 -0000 1.39 *************** *** 314,319 **** directory = os.path.join(self.application.applicationDirectory, 'patterns') result = dialog.openFileDialog(None, "Import which file?", directory, '', wildcard) ! if result['accepted']: ! path = result['paths'][0] os.chdir(os.path.dirname(path)) self.filename = path --- 314,319 ---- directory = os.path.join(self.application.applicationDirectory, 'patterns') result = dialog.openFileDialog(None, "Import which file?", directory, '', wildcard) ! if result.accepted: ! path = result.paths[0] os.chdir(os.path.dirname(path)) self.filename = path *************** *** 335,340 **** wildcard = "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 --- 335,340 ---- wildcard = "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 *************** *** 342,350 **** bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return 1 except: ! return 0 else: ! return 0 def on_menuEditCopy_select(self, event): --- 342,350 ---- bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return True except: ! return False else: ! return False def on_menuEditCopy_select(self, event): *************** *** 384,389 **** if automata == 'menuAutomataLife': result = dialog.textEntryDialog(self, 'Number of steps', 'Steps (-1 means continuous):', '-1') ! if result['accepted']: ! steps = int(result['text']) self.keepDrawing = True startTime = time.time() --- 384,389 ---- if automata == 'menuAutomataLife': result = dialog.textEntryDialog(self, 'Number of steps', 'Steps (-1 means continuous):', '-1') ! if result.accepted: ! steps = int(result.text) self.keepDrawing = True startTime = time.time() |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/lsystem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/lsystem Modified Files: lsystem.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: lsystem.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/lsystem/lsystem.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** lsystem.py 22 May 2004 01:05:20 -0000 1.4 --- lsystem.py 12 Aug 2004 19:18:54 -0000 1.5 *************** *** 117,132 **** def on_btnColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result['accepted']: ! self.components.bufOff.foregroundColor = result['color'] ! event.target.backgroundColor = result['color'] def openFile(self): result = dialog.openFileDialog(None, "Import which file?") ! if result['accepted']: ! path = result['paths'][0] os.chdir(os.path.dirname(path)) self.filename = path bmp = graphic.Bitmap(self.filename) ! self.components.bufOff.drawBitmap(bmp, 0, 0) def on_menuFileOpen_select(self, event): --- 117,132 ---- def on_btnColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result.accepted: ! self.components.bufOff.foregroundColor = result.color ! event.target.backgroundColor = result.color def openFile(self): result = dialog.openFileDialog(None, "Import which file?") ! if result.accepted: ! path = result.paths[0] os.chdir(os.path.dirname(path)) self.filename = path bmp = graphic.Bitmap(self.filename) ! self.components.bufOff.drawBitmap(bmp, (0, 0)) def on_menuFileOpen_select(self, event): *************** *** 140,145 **** path, filename = os.path.split(self.filename) result = dialog.saveFileDialog(None, "Save As", path, filename) ! if result['accepted']: ! path = result['paths'][0] fileType = graphic.bitmapType(path) print fileType, path --- 140,145 ---- path, filename = os.path.split(self.filename) result = dialog.saveFileDialog(None, "Save As", path, filename) ! if result.accepted: ! path = result.paths[0] fileType = graphic.bitmapType(path) print fileType, path *************** *** 147,155 **** bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return 1 except: ! return 0 else: ! return 0 def on_menuEditCopy_select(self, event): --- 147,155 ---- bmp = self.components.bufOff.getBitmap() bmp.SaveFile(path, fileType) ! return True except: ! return False else: ! return False def on_menuEditCopy_select(self, event): |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/moderator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/moderator Modified Files: moderator.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: moderator.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/moderator/moderator.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** moderator.py 8 Aug 2004 18:07:44 -0000 1.5 --- moderator.py 12 Aug 2004 19:18:54 -0000 1.6 *************** *** 89,95 **** def on_btnAddSpeaker_mouseClick(self, event): result = dialog.textEntryDialog(self, 'Add Speaker', 'Speaker:', 'First Last') ! if result['accepted']: ! #returned = result['returned'] ! text = result['text'] #self.components.lstDelegates.append(text) self.delegates.add(text.strip()) --- 89,94 ---- def on_btnAddSpeaker_mouseClick(self, event): result = dialog.textEntryDialog(self, 'Add Speaker', 'Speaker:', 'First Last') ! if result.accepted: ! text = result.text #self.components.lstDelegates.append(text) self.delegates.add(text.strip()) |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/dbBrowser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/dbBrowser Modified Files: dbLogin.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: dbLogin.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/dbBrowser/dbLogin.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dbLogin.py 24 Apr 2004 21:09:18 -0000 1.9 --- dbLogin.py 12 Aug 2004 19:18:50 -0000 1.10 *************** *** 72,77 **** else: result = dialog.openFileDialog() ! if result['accepted']: ! dir, filename = os.path.split(result['paths'][0]) if self.components.choice.stringSelection == 'Gadfly': filename = os.path.splitext(filename)[0] --- 72,77 ---- else: result = dialog.openFileDialog() ! if result.accepted: ! dir, filename = os.path.split(result.paths[0]) if self.components.choice.stringSelection == 'Gadfly': filename = os.path.splitext(filename)[0] |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:35
|
Update of /cvsroot/pythoncard/PythonCard/samples/fpop In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/fpop Modified Files: dlg_config.py fpop.py message.py preview.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: preview.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/preview.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** preview.py 8 Aug 2004 18:31:53 -0000 1.21 --- preview.py 12 Aug 2004 19:18:52 -0000 1.22 *************** *** 145,150 **** dir = self.application.applicationDirectory result = dialog.saveFileDialog(None, "Save As", dir, filename, wildcard) ! if result['accepted']: ! path = result['paths'][0] else: # error message here? --- 145,150 ---- dir = self.application.applicationDirectory result = dialog.saveFileDialog(None, "Save As", dir, filename, wildcard) ! if result.accepted: ! path = result.paths[0] else: # error message here? Index: message.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/message.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** message.py 5 May 2004 16:53:25 -0000 1.16 --- message.py 12 Aug 2004 19:18:52 -0000 1.17 *************** *** 206,213 **** message = "You haven't sent this message. Close anyway?" result = dialog.messageDialog(self, message, 'Unsent Message', \ ! dialog.ICON_INFORMATION, dialog.BUTTON_YES_NO | \ ! dialog.BUTTON_NO_DEFAULT | dialog.BUTTON_CANCEL) ! if result['accepted']: ! returned = result['returned'] if returned == 'Yes': del self.parent.messageWindows[self.GetId()] --- 206,212 ---- message = "You haven't sent this message. Close anyway?" result = dialog.messageDialog(self, message, 'Unsent Message', \ ! wx.ICON_INFORMATION | wx.YES_NO | wx.NO_DEFAULT | wx.CANCEL) ! if result.accepted: ! returned = result.returnedString if returned == 'Yes': del self.parent.messageWindows[self.GetId()] Index: dlg_config.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/dlg_config.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dlg_config.py 17 May 2004 16:43:53 -0000 1.10 --- dlg_config.py 12 Aug 2004 19:18:52 -0000 1.11 *************** *** 45,62 **** def configureDialog(parent): dlg = ConfigureDialog(parent) ! dlg.showModal() ! result = {'accepted':dlg.accepted()} ! result['fromName'] = dlg.components.fromName.text ! result['fromAttribution'] = dlg.components.fromAttribution.text ! result['fromAddress'] = dlg.components.fromAddress.text ! result['replyAddress'] = dlg.components.replyAddress.text ! result['SMTPserver'] = dlg.components.SMTPserver.text ! result['POPserver'] = dlg.components.POPserver.text ! result['POPuser'] = dlg.components.POPuser.text ! result['POPpwd'] = dlg.components.POPpwd.text ! result['CheckAtStart'] = dlg.components.CheckAtStart.checked ! result['AutoCheck'] = dlg.components.AutoCheck.checked ! result['AutoCheckInterval'] = dlg.components.AutoCheckInterval.value ! result['PreviewLines'] = dlg.components.PreviewLines.value dlg.destroy() return result --- 45,61 ---- def configureDialog(parent): dlg = ConfigureDialog(parent) ! result = dlg.showModal() ! result.fromName = dlg.components.fromName.text ! result.fromAttribution = dlg.components.fromAttribution.text ! result.fromAddress = dlg.components.fromAddress.text ! result.replyAddress = dlg.components.replyAddress.text ! result.SMTPserver = dlg.components.SMTPserver.text ! result.POPserver = dlg.components.POPserver.text ! result.POPuser = dlg.components.POPuser.text ! result.POPpwd = dlg.components.POPpwd.text ! result.CheckAtStart = dlg.components.CheckAtStart.checked ! result.AutoCheck = dlg.components.AutoCheck.checked ! result.AutoCheckInterval = dlg.components.AutoCheckInterval.value ! result.PreviewLines = dlg.components.PreviewLines.value dlg.destroy() return result Index: fpop.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/fpop/fpop.py,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** fpop.py 17 May 2004 16:43:53 -0000 1.44 --- fpop.py 12 Aug 2004 19:18:52 -0000 1.45 *************** *** 336,342 **** if self.POPpwd == '': result = dialog.textEntryDialog(self, 'Password', 'Enter your password:', ! '', dialog.TEXT_PASSWORD) ! if result['accepted'] and result['text'] != '': ! self.POPpwd = result['text'] else: return --- 336,342 ---- if self.POPpwd == '': result = dialog.textEntryDialog(self, 'Password', 'Enter your password:', ! '', wx.TEXT_PASSWORD) ! if result.accepted and result.text != '': ! self.POPpwd = result.text else: return *************** *** 469,485 **** def on_btnConfigure_mouseClick(self, event): result = dlg_config.configureDialog(self) ! if result['accepted'] : ! self.fromName = result['fromName'] ! self.fromAttribution = result['fromAttribution'] ! self.fromAddress = result['fromAddress'] ! self.replyAddress = result['replyAddress'] ! self.SMTPserver = result['SMTPserver'] ! self.POPserver = result['POPserver'] ! self.POPuser = result['POPuser'] ! self.POPpwd = result['POPpwd'] ! self.CheckAtStart = result['CheckAtStart'] ! self.AutoCheck = result['AutoCheck'] ! self.AutoCheckInterval = result['AutoCheckInterval'] ! self.PreviewLines = result['PreviewLines'] if self.POPserver == '' or self.POPuser == '': --- 469,485 ---- def on_btnConfigure_mouseClick(self, event): result = dlg_config.configureDialog(self) ! if result.accepted: ! self.fromName = result.fromName ! self.fromAttribution = result.fromAttribution ! self.fromAddress = result.fromAddress ! self.replyAddress = result.replyAddress ! self.SMTPserver = result.SMTPserver ! self.POPserver = result.POPserver ! self.POPuser = result.POPuser ! self.POPpwd = result.POPpwd ! self.CheckAtStart = result.CheckAtStart ! self.AutoCheck = result.AutoCheck ! self.AutoCheckInterval = result.AutoCheckInterval ! self.PreviewLines = result.PreviewLines if self.POPserver == '' or self.POPuser == '': |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:34
|
Update of /cvsroot/pythoncard/PythonCard/samples/doodle In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/doodle Modified Files: doodle.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: doodle.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/doodle/doodle.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** doodle.py 26 Apr 2004 04:16:02 -0000 1.26 --- doodle.py 12 Aug 2004 19:18:51 -0000 1.27 *************** *** 46,61 **** def on_btnColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result['accepted']: ! self.components.bufOff.foregroundColor = result['color'] ! event.target.backgroundColor = result['color'] def openFile(self): result = dialog.openFileDialog(None, "Import which file?") ! if result['accepted']: ! path = result['paths'][0] os.chdir(os.path.dirname(path)) self.filename = path bmp = graphic.Bitmap(self.filename) ! self.components.bufOff.drawBitmap(bmp, 0, 0) def on_menuFileOpen_select(self, event): --- 46,61 ---- def on_btnColor_mouseClick(self, event): result = dialog.colorDialog(self) ! if result.accepted: ! self.components.bufOff.foregroundColor = result.color ! event.target.backgroundColor = result.color def openFile(self): result = dialog.openFileDialog(None, "Import which file?") ! if result.accepted: ! path = result.paths[0] os.chdir(os.path.dirname(path)) self.filename = path bmp = graphic.Bitmap(self.filename) ! self.components.bufOff.drawBitmap(bmp, (0, 0)) def on_menuFileOpen_select(self, event): *************** *** 69,74 **** path, filename = os.path.split(self.filename) result = dialog.saveFileDialog(None, "Save As", path, filename) ! if result['accepted']: ! path = result['paths'][0] fileType = graphic.bitmapType(path) print fileType, path --- 69,74 ---- path, filename = os.path.split(self.filename) result = dialog.saveFileDialog(None, "Save As", path, filename) ! if result.accepted: ! path = result.paths[0] fileType = graphic.bitmapType(path) print fileType, path |
From: Kevin A. <ka...@us...> - 2004-08-12 19:19:33
|
Update of /cvsroot/pythoncard/PythonCard/samples/ataxx In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16511/ataxx Modified Files: ataxx.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: ataxx.py =================================================================== RCS file: /cvsroot/pythoncard/PythonCard/samples/ataxx/ataxx.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ataxx.py 4 May 2004 23:31:56 -0000 1.1 --- ataxx.py 12 Aug 2004 19:18:49 -0000 1.2 *************** *** 13,17 **** """ ! from PythonCard import dialog, model from random import randint import time --- 13,17 ---- """ ! from PythonCard import model from random import randint import time |