[Spambayes-checkins] spambayes/Outlook2000 config_wizard.py, 1.4,
1.5
Mark Hammond
mhammond at users.sourceforge.net
Sun Aug 24 07:25:14 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv31740
Modified Files:
config_wizard.py
Log Message:
* Copy the "training" folders from the wizard config.
* Save the Wizard config unless the user elected to postpone the
configuration - this means the Wizard will popup next time they start
Outlook.
Index: config_wizard.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/config_wizard.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** config_wizard.py 24 Aug 2003 07:58:00 -0000 1.4
--- config_wizard.py 24 Aug 2003 13:25:12 -0000 1.5
***************
*** 95,98 ****
--- 95,102 ----
f = _CreateFolder(manager, wc.wizard.unsure_folder_name, "contains messages SpamBayes is uncertain about")
manager.config.filter.unsure_folder_id = f.GetID()
+ if wc.training.ham_folder_ids:
+ manager.config.training.ham_folder_ids = wc.training.ham_folder_ids
+ if wc.training.spam_folder_ids:
+ manager.config.training.spam_folder_ids = wc.training.spam_folder_ids
wiz_cd = manager.wizard_classifier_data
***************
*** 100,107 ****
if wiz_cd:
manager.classifier_data.Adopt(wiz_cd)
- manager.config.filter.enabled = True
if wc.wizard.preparation == 2: # manually configure
import dialogs
dialogs.ShowDialog(0, manager, manager.config, "IDD_MANAGER")
def CancelWizardConfig(manager, wc):
--- 104,120 ----
if wiz_cd:
manager.classifier_data.Adopt(wiz_cd)
if wc.wizard.preparation == 2: # manually configure
import dialogs
dialogs.ShowDialog(0, manager, manager.config, "IDD_MANAGER")
+ elif wc.wizard.will_train_later:
+ # User cancelled, but said they will sort their mail for us.
+ # don't save the config - this will force the wizard up next time
+ # outlook is started.
+ pass
+ else:
+ # All done - enable, and save the config
+ manager.config.filter.enabled = True
+ manager.SaveConfig()
+
def CancelWizardConfig(manager, wc):
More information about the Spambayes-checkins
mailing list