mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-05 11:30:06 +01:00
Merge branch 'mesalu-fix_384'
This commit is contained in:
@@ -89,6 +89,9 @@ Changes in this release include the following:
|
||||
* Fix missing parameter tool_id in
|
||||
wx.lib.agw.ribbon.toolbar.RibbonToolBar.AddToggleTool. (#947)
|
||||
|
||||
* Add a step to wx.Config.ReadInt to attempt converting from long to int
|
||||
under python2. (#384)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,11 +56,19 @@ def run():
|
||||
else:
|
||||
func.find('defaultVal').default = 'wxEmptyString'
|
||||
|
||||
c.addCppMethod('long', 'ReadInt', '(const wxString& key, long defaultVal=0)', """\
|
||||
c.addCppMethod('long', '_cpp_ReadInt', '(const wxString& key, long defaultVal=0)', """\
|
||||
long rv;
|
||||
self->Read(*key, &rv, defaultVal);
|
||||
return rv;
|
||||
""")
|
||||
c.addPyMethod('ReadInt', '(self, key, defaultVal=0)', body="""\
|
||||
import six
|
||||
rv = self._cpp_ReadInt(key, defaultVal)
|
||||
if six.PY2:
|
||||
rv = int(rv)
|
||||
return rv
|
||||
""")
|
||||
|
||||
c.addCppMethod('double', 'ReadFloat', '(const wxString& key, double defaultVal=0.0)', """\
|
||||
double rv;
|
||||
self->Read(*key, &rv, defaultVal);
|
||||
|
||||
Reference in New Issue
Block a user