[Spambayes-checkins] spambayes/Outlook2000/dialogs AsyncDialog.py, 1.6, 1.7

Mark Hammond mhammond at users.sourceforge.net
Wed Jul 23 05:02:14 EDT 2003


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

Modified Files:
	AsyncDialog.py 
Log Message:
Anything that could fail should be done before we screw with the dialog
control state, just so the dialog doesn't look completely broken.


Index: AsyncDialog.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/dialogs/AsyncDialog.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AsyncDialog.py	22 Jul 2003 13:29:57 -0000	1.6
--- AsyncDialog.py	23 Jul 2003 11:02:12 -0000	1.7
***************
*** 149,152 ****
--- 149,157 ----
              self.progress.request_stop()
          else:
+             # Do anything likely to fail before we screw around with the
+             # control states - this way the dialog doesn't look as 'dead'
+             progress=_Progress(self)
+             # Now screw around with the control states, restored when
+             # the thread terminates.
              for id in self.disable_while_running_ids:
                  self.GetDlgItem(id).EnableWindow(0)
***************
*** 173,177 ****
              # back to the program :)
              import threading
!             t = threading.Thread(target=thread_target, args =(self.GetSafeHwnd(), _Progress(self)))
              t.start()
  
--- 178,182 ----
              # back to the program :)
              import threading
!             t = threading.Thread(target=thread_target, args =(self.GetSafeHwnd(), progress))
              t.start()
  





More information about the Spambayes-checkins mailing list