mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Copy methods from wxGenericProgressDialog to wxProgressDialog.
This is needed because some of the methods are non-virtual, and they are reimplemented in the MSW version of wxProgressDialog. In order for those methods to be called they need to have wrappers generated.
This commit is contained in:
@@ -106,7 +106,8 @@ Changes in this release include the following:
|
||||
|
||||
* Fix displaying '&' in the label of wx.RadioBox on GTK. (#39)
|
||||
|
||||
|
||||
* Fix problems of the wrong C++ method being called in wx.ProgressDialog on MS
|
||||
Windows. (#701)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
import etgtools
|
||||
import etgtools.tweaker_tools as tools
|
||||
import copy
|
||||
|
||||
PACKAGE = "wx"
|
||||
MODULE = "_core"
|
||||
@@ -34,7 +35,7 @@ def run():
|
||||
|
||||
module.addHeaderCode("#include <wx/progdlg.h>")
|
||||
|
||||
c = module.find('wxGenericProgressDialog')
|
||||
c = gpd = module.find('wxGenericProgressDialog')
|
||||
assert isinstance(c, etgtools.ClassDef)
|
||||
|
||||
tools.fixWindowClass(c)#, False)
|
||||
@@ -47,6 +48,18 @@ def run():
|
||||
c = module.find('wxProgressDialog')
|
||||
tools.fixWindowClass(c)
|
||||
|
||||
# Copy methods from the generic to the native class. This is needed
|
||||
# because none of the methods are declared in the interface files, and
|
||||
# since on MSW some non-virtual methods are reimplemented in
|
||||
# wxProgressDialogs they will not be called if SIP doesn't know about
|
||||
# them. We'll copy all of them and let the C++ compiler sort things out.
|
||||
for item in gpd:
|
||||
if (isinstance(item, etgtools.MethodDef) and
|
||||
not item.isCtor and
|
||||
not item.isDtor):
|
||||
c.addItem(copy.deepcopy(item))
|
||||
|
||||
|
||||
#-----------------------------------------------------------------
|
||||
tools.doCommonTweaks(module)
|
||||
tools.runGenerators(module)
|
||||
|
||||
Reference in New Issue
Block a user