From 6206d20badbf9f9910fb2562b6ee734a28b7e375 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 11 Sep 2019 12:56:11 -0700 Subject: [PATCH] Various small tweaks and fixes --- build.py | 8 ++++++-- demo/Main.py | 2 +- etg/ctrlsub.py | 4 ++-- wx/lib/nvdlg.py | 9 +++++---- wx/py/frame.py | 2 +- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/build.py b/build.py index 50ea3eb0b..58bb0506e 100755 --- a/build.py +++ b/build.py @@ -1201,10 +1201,14 @@ def cmd_sip(options, args): if not newer_group(sipFiles, sbf) and os.path.exists(pycode): continue + # leave this turned off for now... + # typehint = '-y {}'.format(posixjoin(cfg.PKGDIR, base[1:]) + '.pyi') + typehint = '' + pycode = '-X pycode'+base+':'+pycode sip = getSipCmd() - cmd = '%s %s -c %s -b %s %s %s' % \ - (sip, cfg.SIPOPTS, tmpdir, sbf, pycode, src_name) + cmd = '%s %s -c %s -b %s %s %s %s' % \ + (sip, cfg.SIPOPTS, tmpdir, sbf, pycode, typehint, src_name) runcmd(cmd) classesNeedingClassInfo = { 'sip_corewxTreeCtrl.cpp' : 'wxTreeCtrl', } diff --git a/demo/Main.py b/demo/Main.py index 0a33db174..e0b440b0d 100644 --- a/demo/Main.py +++ b/demo/Main.py @@ -2593,7 +2593,7 @@ def OnDemoMenu(self, event): #--------------------------------------------- def OnIconfiy(self, evt): - wx.LogMessage("OnIconfiy: %s" % evt.Iconized()) + wx.LogMessage("OnIconfiy: %s" % evt.IsIconized()) evt.Skip() #--------------------------------------------- diff --git a/etg/ctrlsub.py b/etg/ctrlsub.py index c345af580..ca556b833 100644 --- a/etg/ctrlsub.py +++ b/etg/ctrlsub.py @@ -59,7 +59,7 @@ def pickOverloads(m): # The [G|S]etClientData methods deal with untyped void* values, which we - # don't support. The [G|S]etClientObject methods use wxClientData instaces + # don't support. The [G|S]etClientObject methods use wxClientData instances # which we have a MappedType for, so make the ClientData methods just be # aliases for ClientObjects. From the Python programmer's perspective they # would be virtually the same anyway. @@ -76,7 +76,7 @@ def pickOverloads(m): body="self.SetClientData(n, data)") - # Deal with transfering ownership of wxClientData objects + # Deal with transferring ownership of wxClientData objects c.find('DetachClientObject').transfer = True c.find('SetClientObject.data').transfer = True c.find('Append').findOverload('clientData').find('clientData').transfer = True diff --git a/wx/lib/nvdlg.py b/wx/lib/nvdlg.py index 1a8c6bc3c..e4e08a584 100644 --- a/wx/lib/nvdlg.py +++ b/wx/lib/nvdlg.py @@ -84,7 +84,7 @@ def createFields(self, fields): def destroyFields(self): - for name, widgets in self._fields.iteritems(): + for name, widgets in self._fields.items(): for w in widgets: w.Destroy() del self.__dict__[name] @@ -92,9 +92,10 @@ def destroyFields(self): def loadValues(self, values): self.clearValues() - for name, value in values.iteritems(): - if name in self._fields.keys(): - setattr(self, name, value) + if values: + for name, value in values.items(): + if name in self._fields.keys(): + setattr(self, name, value) def clearValues(self): for name in self._fields.keys(): diff --git a/wx/py/frame.py b/wx/py/frame.py index 6acbd7700..249ef0393 100644 --- a/wx/py/frame.py +++ b/wx/py/frame.py @@ -85,7 +85,7 @@ def __init__(self, parent=None, id=-1, title='Editor', def OnIconize(self, event): """Event handler for Iconize.""" - self.iconized = event.Iconized() + self.iconized = event.IsIconized() def OnClose(self, event):