diff options
Diffstat (limited to 'lib/wx')
-rw-r--r-- | lib/wx/api_gen/wxapi.conf | 4 | ||||
-rw-r--r-- | lib/wx/c_src/gen/wxe_funcs.cpp | 12 | ||||
-rw-r--r-- | lib/wx/src/gen/wxFileDialog.erl | 13 |
3 files changed, 10 insertions, 19 deletions
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf index df154f0125..4a646650ea 100644 --- a/lib/wx/api_gen/wxapi.conf +++ b/lib/wx/api_gen/wxapi.conf @@ -985,7 +985,9 @@ {class, wxFileDialog, wxDialog, [{skip, [{wxFileDialog,0}]}], ['wxFileDialog','~wxFileDialog','GetDirectory','GetFilename', {'GetFilenames',[{"files", out}]}, - 'GetFilterIndex','GetMessage','GetPath','GetPaths','GetWildcard', + 'GetFilterIndex','GetMessage','GetPath', + {'GetPaths', [{"paths", out}]}, + 'GetWildcard', 'SetDirectory','SetFilename','SetFilterIndex','SetMessage','SetPath', 'SetWildcard']}. diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp index cb662fc91b..ccbacce9b9 100644 --- a/lib/wx/c_src/gen/wxe_funcs.cpp +++ b/lib/wx/c_src/gen/wxe_funcs.cpp @@ -20582,19 +20582,11 @@ case wxFileDialog_GetPath: { // wxFileDialog::GetPath break; } case wxFileDialog_GetPaths: { // wxFileDialog::GetPaths - wxFileDialog *This = (wxFileDialog *) getPtr(bp,memenv); bp += 4; - int * pathsLen = (int *) bp; bp += 4; wxArrayString paths; - int pathsASz = 0, * pathsTemp; - for(int i=0; i < *pathsLen; i++) { - pathsTemp = (int *) bp; bp += 4; - paths.Add(wxString(bp, wxConvUTF8)); - bp += *pathsTemp; - pathsASz += *pathsTemp+4; - } - bp += (8-((0+ pathsASz) & 7 )) & 7; + wxFileDialog *This = (wxFileDialog *) getPtr(bp,memenv); bp += 4; if(!This) throw wxe_badarg(0); This->GetPaths(paths); + rt.add(paths); break; } case wxFileDialog_GetWildcard: { // wxFileDialog::GetWildcard diff --git a/lib/wx/src/gen/wxFileDialog.erl b/lib/wx/src/gen/wxFileDialog.erl index 22b39aa150..efe1ff57f3 100644 --- a/lib/wx/src/gen/wxFileDialog.erl +++ b/lib/wx/src/gen/wxFileDialog.erl @@ -31,7 +31,7 @@ -module(wxFileDialog). -include("wxe.hrl"). -export([destroy/1,getDirectory/1,getFilename/1,getFilenames/1,getFilterIndex/1, - getMessage/1,getPath/1,getPaths/2,getWildcard/1,new/1,new/2,setDirectory/2, + getMessage/1,getPath/1,getPaths/1,getWildcard/1,new/1,new/2,setDirectory/2, setFilename/2,setFilterIndex/2,setMessage/2,setPath/2,setWildcard/2]). %% inherited exports @@ -152,15 +152,12 @@ getPath(#wx_ref{type=ThisT,ref=ThisRef}) -> wxe_util:call(?wxFileDialog_GetPath, <<ThisRef:32/?UI>>). -%% @spec (This::wxFileDialog(), Paths::[[string()]]) -> ok +%% @spec (This::wxFileDialog()) -> [[string()]] %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetpaths">external documentation</a>. -getPaths(#wx_ref{type=ThisT,ref=ThisRef},Paths) - when is_list(Paths) -> +getPaths(#wx_ref{type=ThisT,ref=ThisRef}) -> ?CLASS(ThisT,wxFileDialog), - Paths_UCA = [unicode:characters_to_binary([PathsTemp,0]) || - PathsTemp <- Paths], - wxe_util:cast(?wxFileDialog_GetPaths, - <<ThisRef:32/?UI,(length(Paths_UCA)):32/?UI, (<< <<(byte_size(UC_Str)):32/?UI, UC_Str/binary>>|| UC_Str <- Paths_UCA>>)/binary, 0:(((8- ((0 + lists:sum([byte_size(S)+4||S<-Paths_UCA])) band 16#7)) band 16#7))/unit:8>>). + wxe_util:call(?wxFileDialog_GetPaths, + <<ThisRef:32/?UI>>). %% @spec (This::wxFileDialog()) -> string() %% @doc See <a href="http://www.wxwidgets.org/manuals/stable/wx_wxfiledialog.html#wxfiledialoggetwildcard">external documentation</a>. |