Various small tweaks and fixes

This commit is contained in:
Robin Dunn
2019-09-11 12:56:11 -07:00
parent 034ae9a775
commit 6206d20bad
5 changed files with 15 additions and 10 deletions

View File

@@ -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', }

View File

@@ -2593,7 +2593,7 @@ class wxPythonDemo(wx.Frame):
#---------------------------------------------
def OnIconfiy(self, evt):
wx.LogMessage("OnIconfiy: %s" % evt.Iconized())
wx.LogMessage("OnIconfiy: %s" % evt.IsIconized())
evt.Skip()
#---------------------------------------------

View File

@@ -59,7 +59,7 @@ def run():
# 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 run():
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

View File

@@ -84,7 +84,7 @@ class SimpleNameValueDialog(wx.Dialog):
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 @@ class SimpleNameValueDialog(wx.Dialog):
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():

View File

@@ -85,7 +85,7 @@ class Frame(wx.Frame):
def OnIconize(self, event):
"""Event handler for Iconize."""
self.iconized = event.Iconized()
self.iconized = event.IsIconized()
def OnClose(self, event):