From: Robin Dunn Date: Thu, 4 May 2006 02:15:48 +0000 (+0000) Subject: wx.ProgressDialog.Update now returns two values. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8ec09aacc6d8a0ef8c8e3910c46258bc20f0734b wx.ProgressDialog.Update now returns two values. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/ProgressDialog.py b/wxPython/demo/ProgressDialog.py index 9417209834..5e120a4600 100644 --- a/wxPython/demo/ProgressDialog.py +++ b/wxPython/demo/ProgressDialog.py @@ -43,10 +43,11 @@ class TestPanel(wx.Panel): wx.MilliSleep(250) if count >= max / 2: - keepGoing = dlg.Update(count, "Half-time!") + (keepGoing, skip) = dlg.Update(count, "Half-time!") else: - keepGoing = dlg.Update(count) + (keepGoing, skip) = dlg.Update(count) + dlg.Destroy() #--------------------------------------------------------------------------- diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 6562af4497..e281bded0c 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -120,17 +120,24 @@ source of the clipboard or DnD operation, and then you'll know which of the component data objects to use to access the data. Changed how the stock objects (wx.RED, wx.RED_PEN, wx.RED_BRUSH, etc.) -are initialized. They are now created as a wrapper object that -initializes itself on first use (when an attribute of the object is -requested.) This was needed because of similar delayed initialization +are initialized. They are now created after the wx.App has been +created, but before OnInit is called, so if you use any of these +objects before the wx.App is created you will need to adjust your +code. This was needed because of some delayed initialization functionality that was implemented in wxWidgets, but the end result is cleaner for wxPython as well, and allowed me to remove some ugly code -under the covers. +previously hidden under the covers. Added wx.StandardPaths.GetDocumentsDir. Added wx.RendererNative.DrawCheckButton. +wx.ProgressDialog.Update now returns a tuple of two values. The first +is a continue flag (what was returned before) and the second is a skip +flag. If the dialog has the wx.PD_CAN_SKIP flag and if the Skip +button is clicked, then the skip flag is set to True the next time +Update is called. +