aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2009-12-07 13:12:37 +0000
committerErlang/OTP <[email protected]>2009-12-07 13:12:37 +0000
commitd6897fe9cb73b3b37a8872b81bfe50b01d169e3c (patch)
treebb6fc1ce0f5d163845cdb33e51a3a2bd0d4d7252 /lib
parent0b340619c90d7b55189fcb06a46ff64e594d3a97 (diff)
parent546b1dfb3d66be446c90b4d9e11333352dbd5011 (diff)
downloadotp-d6897fe9cb73b3b37a8872b81bfe50b01d169e3c.tar.gz
otp-d6897fe9cb73b3b37a8872b81bfe50b01d169e3c.tar.bz2
otp-d6897fe9cb73b3b37a8872b81bfe50b01d169e3c.zip
Merge branch 'dgud/wx_filedialog_bug' into ccase/r13b04_dev
* dgud/wx_filedialog_bug: The generated updates, of the previous fix. Fixed generation of wxFileDialog:getPaths/1. OTP-8330 Corrected incorrectly generated wxFileDialog:getPaths/1. Reported by Jason/hornja.
Diffstat (limited to 'lib')
-rw-r--r--lib/wx/api_gen/wxapi.conf4
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp12
-rw-r--r--lib/wx/src/gen/wxFileDialog.erl13
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>.