[Spambayes-checkins] spambayes/Outlook2000 addin.py,1.94,1.95
Mark Hammond
mhammond at users.sourceforge.net
Sun Aug 24 07:26:31 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv32220
Modified Files:
addin.py
Log Message:
If it appears we have never been prviously configured, display the
sparkling new Wizard.
Index: addin.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/addin.py,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** addin.py 22 Aug 2003 06:12:20 -0000 1.94
--- addin.py 24 Aug 2003 13:26:28 -0000 1.95
***************
*** 1122,1135 ****
self.explorers_events = None # create at OnStartupComplete
if self.manager.config.filter.enabled:
# A little "sanity test" to help the user. If our status is
# 'enabled', then it means we have previously managed to
! # convince the manager dialog we have enough ham/spam and
! # valid folders. If for some reason, we have zero ham or spam,
! # or no folder definitions but are 'enabled', then it is likely
# something got hosed and the user doesn't know.
! bayes = self.manager.classifier_data.bayes
! if bayes.nham==0 or bayes.nspam==0 or \
! not self.manager.config.filter.spam_folder_id or \
not self.manager.config.filter.watch_folder_ids:
msg = "It appears there was an error loading your configuration\r\n\r\n" \
--- 1122,1136 ----
self.explorers_events = None # create at OnStartupComplete
+ if self.manager.never_configured:
+ import dialogs
+ dialogs.ShowWizard(0, self.manager)
+
if self.manager.config.filter.enabled:
# A little "sanity test" to help the user. If our status is
# 'enabled', then it means we have previously managed to
! # convince the manager dialog to enable. If for some reason,
! # we no folder definitions but are 'enabled', then it is likely
# something got hosed and the user doesn't know.
! if not self.manager.config.filter.spam_folder_id or \
not self.manager.config.filter.watch_folder_ids:
msg = "It appears there was an error loading your configuration\r\n\r\n" \
More information about the Spambayes-checkins
mailing list