[Spambayes-checkins] spambayes/Outlook2000/dialogs dlgcore.py, 1.3, 1.4

Adam Walker xenogeist at users.sourceforge.net
Sun Aug 17 15:14:40 EDT 2003


Update of /cvsroot/spambayes/spambayes/Outlook2000/dialogs
In directory sc8-pr-cvs1:/tmp/cvs-serv16483/Outlook2000/dialogs

Modified Files:
	dlgcore.py 
Log Message:
Added support for modeless dialogs and property pages. Dialogs will close the tooltip in OnDestroy as well.

Index: dlgcore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/dlgcore.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dlgcore.py	13 Aug 2003 13:40:47 -0000	1.3
--- dlgcore.py	17 Aug 2003 21:14:37 -0000	1.4
***************
*** 83,87 ****
  
      def CreateWindow(self):
!         self._DoCreate(win32gui.CreateDialogIndirect)
  
      def DoModal(self):
--- 83,87 ----
  
      def CreateWindow(self):
!         return self._DoCreate(win32gui.CreateDialogIndirect)
  
      def DoModal(self):
***************
*** 152,155 ****
--- 152,158 ----
          self.tt.HideTooltip()
  
+     def OnDestroy(self, hwnd, msg, wparam, lparam):
+         self.tt.HideTooltip()
+         
      def OnHelp(self, hwnd, msg, wparam, lparam):
          format = "iiiiiii"
***************
*** 228,231 ****
--- 231,235 ----
      def OnDestroy(self, hwnd, msg, wparam, lparam):
          #print "OnDestroy"
+         TooltipDialog.OnDestroy(self, hwnd, msg, wparam, lparam)
          self.command_processors = None
          self.all_processors = None
***************
*** 273,277 ****
              print "Ignoring OnNotify for", self._GetIDName(idFrom)
              return
!         handler.OnNotify( (hwndFrom, idFrom, code), wparam, lparam)
  
      def OnCommand(self, hwnd, msg, wparam, lparam):
--- 277,281 ----
              print "Ignoring OnNotify for", self._GetIDName(idFrom)
              return
!         return handler.OnNotify( (hwndFrom, idFrom, code), wparam, lparam)
  
      def OnCommand(self, hwnd, msg, wparam, lparam):
***************
*** 284,285 ****
--- 288,303 ----
  
          self.ApplyHandlingOptionValueError(handler.OnCommand, wparam, lparam)
+ 
+ class ProcessorPage(ProcessorDialog):
+     def __init__(self, parent, manager, idd, option_handlers):
+         ProcessorDialog.__init__(self, parent, manager, idd,option_handlers)
+     def OnInitDialog(self, hwnd, msg, wparam, lparam):
+         self.hwnd = hwnd
+         # The hardcoded values are a bit of a hack.
+         win32gui.SetWindowPos(self.hwnd, win32con.HWND_TOP, 1, 24, 0, 0, win32con.SWP_NOSIZE)
+         self.LoadAllControls()
+     def CreateWindow(self):
+         # modeless. Pages should have the WS_CHILD window style
+         message_map = self.GetMessageMap()
+         return win32gui.CreateDialogIndirect(self.hinst, self.template, self.parent, message_map)
+ 





More information about the Spambayes-checkins mailing list