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')
|