[Spambayes-checkins] spambayes/Outlook2000/dialogs
async_processor.py, 1.4, 1.5 dialog_map.py, 1.18,
1.19 processors.py, 1.7, 1.8
Mark Hammond
mhammond at users.sourceforge.net
Sun Aug 24 06:01:54 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv20562
Modified Files:
async_processor.py dialog_map.py processors.py
Log Message:
Add "Reset" button, and more wizard work.
Index: async_processor.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/async_processor.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** async_processor.py 24 Aug 2003 03:05:16 -0000 1.4
--- async_processor.py 24 Aug 2003 12:01:52 -0000 1.5
***************
*** 120,125 ****
def Done(self):
if self.running:
! msg = "You must let the running process finish, or stop it\r\n" \
! "yourself, before closing this window"
win32gui.MessageBox(self.window.hwnd, msg, "SpamBayes",
win32con.MB_OK | win32con.MB_ICONEXCLAMATION)
--- 120,124 ----
def Done(self):
if self.running:
! msg = "You must let the running process finish before closing this window"
win32gui.MessageBox(self.window.hwnd, msg, "SpamBayes",
win32con.MB_OK | win32con.MB_ICONEXCLAMATION)
Index: dialog_map.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** dialog_map.py 24 Aug 2003 07:56:52 -0000 1.18
--- dialog_map.py 24 Aug 2003 12:01:52 -0000 1.19
***************
*** 220,227 ****
buf)
self.pages[item] = idName
-
! def ShowAbout(mgr):
! mgr.ShowHtml("about.html")
class DialogCommand(ButtonProcessor):
--- 220,248 ----
buf)
self.pages[item] = idName
!
! def ShowAbout(window):
! window.manager.ShowHtml("about.html")
!
! def ResetConfig(window):
! question = "This will reset all configuration options to their default values\r\n\r\n" \
! "It will not reset the folders you have selected, nor your\r\n" \
! "training information, but all other options will be reset\r\n" \
! "and SpamBayes will need to be re-enabled before it will\r\n" \
! "continuefiltering.\r\n\r\n" \
! "Are you sure you wish to reset all options?"
! flags = win32con.MB_ICONQUESTION | win32con.MB_YESNO | win32con.MB_DEFBUTTON2
! if win32gui.MessageBox(window.hwnd,
! question, "SpamBayes",flags) == win32con.IDYES:
! options = window.config._options
! for sect in options.sections():
! for opt_name in options.options_in_section(sect):
! opt = options.get_option(sect, opt_name)
! if not opt.no_restore():
! assert opt.is_valid(opt.default_value), \
! "Resetting '%s' to invalid default %r" % (opt.display_name(), opt.default_value)
! opt.set(opt.default_value)
! window.LoadAllControls()
!
class DialogCommand(ButtonProcessor):
***************
*** 358,361 ****
--- 379,383 ----
(DialogCommand, "IDC_ADVANCED_BTN", "IDD_ADVANCED"),
(ShowWizardCommand, "IDC_BUT_WIZARD", "IDD_WIZARD"),
+ (CommandButtonProcessor, "IDC_BUT_RESET", ResetConfig, ()),
),
"IDD_FILTER_NOW" : (
Index: processors.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/processors.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** processors.py 24 Aug 2003 03:05:16 -0000 1.7
--- processors.py 24 Aug 2003 12:01:52 -0000 1.8
***************
*** 85,89 ****
def OnClicked(self, id):
# Bit of a hack - always pass the manager as the first arg.
! args = (self.window.manager,) + self.args
self.func(*args)
--- 85,89 ----
def OnClicked(self, id):
# Bit of a hack - always pass the manager as the first arg.
! args = (self.window,) + self.args
self.func(*args)
More information about the Spambayes-checkins
mailing list