mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +01:00
Change wx.FileDialogCustomize.AddChoice to accept a list of strings
This commit is contained in:
@@ -59,6 +59,17 @@ def run():
|
|||||||
assert isinstance(c, etgtools.ClassDef)
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
c.noDefCtor = True
|
c.noDefCtor = True
|
||||||
|
|
||||||
|
# Change the AddChoice method to use a wxArrayString instead of a C array
|
||||||
|
# and size.
|
||||||
|
m = c.find('AddChoice')
|
||||||
|
m.find('n').ignore()
|
||||||
|
m.find('strings').type = 'const wxArrayString&'
|
||||||
|
m.argsString = '(size_t n, const wxArrayString& strings)'
|
||||||
|
m.setCppCode("""\
|
||||||
|
const wxString* ptr = &strings->front();
|
||||||
|
return self->AddChoice(strings->size(), ptr);
|
||||||
|
""")
|
||||||
|
|
||||||
c = module.find('wxFileDialogCustomizeHook')
|
c = module.find('wxFileDialogCustomizeHook')
|
||||||
assert isinstance(c, etgtools.ClassDef)
|
assert isinstance(c, etgtools.ClassDef)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user