[Spambayes-checkins] spambayes/Outlook2000/dialogs dialog_map.py,
1.5, 1.6 dlgcore.py, 1.4, 1.5
Adam Walker
xenogeist at users.sourceforge.net
Mon Aug 18 07:31:56 EDT 2003
Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv26085/Outlook2000/dialogs
Modified Files:
dialog_map.py dlgcore.py
Log Message:
Changed the property pages to change styles at runtime so we can put the captions in the rc file and removed the caption_map hack. Recombined the filter pages. Moved two options to a seperate diagnosic dialog.
Index: dialog_map.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dialog_map.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dialog_map.py 18 Aug 2003 04:25:29 -0000 1.5
--- dialog_map.py 18 Aug 2003 13:31:53 -0000 1.6
***************
*** 159,165 ****
self.currentPage = None
self.currentPageIndex = -1
! self.currentPageHwnd = None
for index, page_id in enumerate(self.page_ids):
! self.addPage(index, page_id, caption_map[page_id])
self.switchToPage(0)
def OnNotify(self, nmhdr, wparam, lparam):
--- 159,166 ----
self.currentPage = None
self.currentPageIndex = -1
! self.currentPageHwnd = None
for index, page_id in enumerate(self.page_ids):
! template = self.window.manager.dialog_parser.dialogs[page_id]
! self.addPage(index, page_id, template[0][0])
self.switchToPage(0)
def OnNotify(self, nmhdr, wparam, lparam):
***************
*** 229,244 ****
import filter, train
- # This sucks a little, but the captions for the dialogs aren't in the
- # rc script for property pages.
- # A human language map may also be nice :)
- caption_map = {
- "IDD_GENERAL" : "General",
- "IDD_TRAINING": "Training",
- "IDD_FILTER_SPAM": "Spam",
- "IDD_FILTER_UNSURE": "Possible Spam",
- "IDD_FILTER_NOW": "Filter Now",
- "IDD_ADVANCED": "Advanced",
- }
-
dialog_map = {
"IDD_MANAGER" : (
--- 230,233 ----
***************
*** 246,256 ****
(CloseButtonProcessor, "IDOK IDCANCEL"),
(TabProcessor, "IDC_TAB",
! """IDD_GENERAL IDD_TRAINING IDD_FILTER_SPAM
! IDD_FILTER_UNSURE IDD_FILTER_NOW
IDD_ADVANCED"""),
- (VersionStringProcessor, "IDC_VERSION"),
(CommandButtonProcessor, "IDC_ABOUT_BTN", ShowAbout, ()),
),
"IDD_GENERAL": (
(TrainingStatusProcessor, "IDC_TRAINING_STATUS"),
(FilterEnableProcessor, "IDC_BUT_FILTER_ENABLE", "Filter.enabled"),
--- 235,245 ----
(CloseButtonProcessor, "IDOK IDCANCEL"),
(TabProcessor, "IDC_TAB",
! """IDD_GENERAL IDD_TRAINING IDD_FILTER
! IDD_FILTER_NOW
IDD_ADVANCED"""),
(CommandButtonProcessor, "IDC_ABOUT_BTN", ShowAbout, ()),
),
"IDD_GENERAL": (
+ (VersionStringProcessor, "IDC_VERSION"),
(TrainingStatusProcessor, "IDC_TRAINING_STATUS"),
(FilterEnableProcessor, "IDC_BUT_FILTER_ENABLE", "Filter.enabled"),
***************
*** 264,268 ****
(DialogCommand, "IDC_BUT_TRAIN_NOW", "IDD_TRAINING"),
(DialogCommand, "IDC_ADVANCED_BTN", "IDD_ADVANCED"),
- (BoolButtonProcessor, "IDC_SAVE_SPAM_SCORE", "Filter.save_spam_info"),
),
"IDD_FILTER_NOW" : (
--- 253,256 ----
***************
*** 279,283 ****
"IDC_BUT_ACT_SCORE IDC_BUT_ACT_ALL"),
),
! "IDD_FILTER_SPAM" : (
(FolderIDProcessor, "IDC_FOLDER_WATCH IDC_BROWSE_WATCH",
"Filter.watch_folder_ids",
--- 267,271 ----
"IDC_BUT_ACT_SCORE IDC_BUT_ACT_ALL"),
),
! "IDD_FILTER" : (
(FolderIDProcessor, "IDC_FOLDER_WATCH IDC_BROWSE_WATCH",
"Filter.watch_folder_ids",
***************
*** 289,294 ****
"Filter.spam_threshold"),
(BoolButtonProcessor, "IDC_MARK_SPAM_AS_READ", "Filter.spam_mark_as_read"),
- ),
- "IDD_FILTER_UNSURE" : (
(FolderIDProcessor, "IDC_FOLDER_UNSURE IDC_BROWSE_UNSURE",
"Filter.unsure_folder_id"),
--- 277,280 ----
***************
*** 314,318 ****
),
"IDD_ADVANCED" : (
- (IntProcessor, "IDC_VERBOSE_LOG", "General.verbose"),
(MsSliderProcessor, "IDC_DELAY1_TEXT IDC_DELAY1_SLIDER", "Experimental.timer_start_delay"),
(MsSliderProcessor, "IDC_DELAY2_TEXT IDC_DELAY2_SLIDER", "Experimental.timer_interval"),
--- 300,303 ----
***************
*** 320,323 ****
--- 305,313 ----
(ComboProcessor, "IDC_DEL_SPAM_RS", "General.delete_as_spam_message_state"),
(ComboProcessor, "IDC_RECOVER_RS", "General.recover_from_spam_message_state"),
+ ),
+ "IDD_DIAGNOSIC" : (
+ (BoolButtonProcessor, "IDC_SAVE_SPAM_SCORE", "Filter.save_spam_info"),
+ (IntProcessor, "IDC_VERBOSE_LOG", "General.verbose"),
+ (CloseButtonProcessor, "IDOK IDCANCEL"),
)
}
Index: dlgcore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dlgcore.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dlgcore.py 17 Aug 2003 21:14:37 -0000 1.4
--- dlgcore.py 18 Aug 2003 13:31:53 -0000 1.5
***************
*** 300,303 ****
--- 300,306 ----
# modeless. Pages should have the WS_CHILD window style
message_map = self.GetMessageMap()
+ # remove frame from dialog and make sure it is a child
+ self.template[0][2] = self.template[0][2] & ~(win32con.DS_MODALFRAME|win32con.WS_POPUP|win32con.WS_OVERLAPPED|win32con.WS_CAPTION)
+ self.template[0][2] = self.template[0][2] | win32con.WS_CHILD
return win32gui.CreateDialogIndirect(self.hinst, self.template, self.parent, message_map)
More information about the Spambayes-checkins
mailing list