Merge pull request #2293 from wxWidgets/misc-tweaks

Misc tweaks
This commit is contained in:
Robin Dunn
2022-10-18 14:16:27 -07:00
committed by GitHub
5 changed files with 39 additions and 9 deletions

View File

@@ -8,6 +8,21 @@
wxPython Changelog
==================
4.2.1
-------------------
* unreleased
PyPI: https://pypi.python.org/pypi/wxPython/4.2.1
Extras: https://extras.wxPython.org/wxPython4/extras/
Pip: ``pip install wxPython==4.2.1``
New and improved in this release:
* Added wrappers for wxGenericStaticBitmap.
4.2.0 "Rumors of my death are only slightly exaggerated"
--------------------------------------------------------
* 7-Aug-2022

View File

@@ -1402,6 +1402,7 @@
"GenericDragImage":"wx.",
"GenericMessageDialog":"wx.",
"GenericProgressDialog":"wx.",
"GenericStaticBitmap":"wx.",
"GeometryCentre":"wx.",
"GeometrySerializer":"wx.TopLevelWindow.",
"GestureEvent":"wx.",
@@ -6821,7 +6822,7 @@
"SashLayoutWindow":"wx.adv.",
"SashWindow":"wx.adv.",
"SaveFileSelector":"wx.",
"ScaleMode":"wx.StaticBitmap.",
"ScaleMode":"wx.GenericStaticBitmap.",
"ScreenDC":"wx.",
"ScrollBar":"wx.",
"ScrollBarNameStr":"wx.",

View File

@@ -1,3 +1,10 @@
# Without a class
dlg = wx.Dialog()
wx.xml.XmlResource.Get().LoadDialog(dlg, mainFrame, "my_dialog")
dlg.ShowModal()
dlg = wx.xml.XmlResource.Get().LoadDialog(mainFrame, "my_dialog")
dlg.ShowModal()
# Or, as a class
class MyDialog(wx.Dialog):
def __init__(self, parent):
super().__init__()
wx.xml.XmlResource.Get().LoadDialog(self, parent, "my_dialog")

View File

@@ -8,6 +8,8 @@
# License: wxWindows License
#---------------------------------------------------------------------------
import copy
import etgtools
import etgtools.tweaker_tools as tools
@@ -38,6 +40,16 @@ def run():
c.find('Create.label').name = 'bitmap'
tools.fixWindowClass(c)
# Make a copy of wxStaticBitmap so we can generate wrapper code for
# wxGenericStaticBitmap too.
module.addHeaderCode('#include <wx/generic/statbmpg.h>')
gsb = copy.deepcopy(c)
assert isinstance(gsb, etgtools.ClassDef)
gsb.name = 'wxGenericStaticBitmap'
for ctor in gsb.findAll('wxStaticBitmap'):
ctor.name = 'wxGenericStaticBitmap'
module.addItem(gsb)
module.addGlobalStr('wxStaticBitmapNameStr', c)
#-----------------------------------------------------------------

View File

@@ -329,12 +329,7 @@ bool wxPyApp::IsDisplayAvailable()
} else
#endif
{
// Also foreground the application on the first call as a side-effect.
//
// TODO: These APIs are deprecated, and will likely be gone in the 10.15 SDK
//
// [NSRunningApplication activateIgnoringOtherApps: YES] ??
//
// Assume all is well... Until something better is found again.
rv = true;
}
return rv;