diff options
author | Dan Gudmundsson <[email protected]> | 2014-02-14 09:57:19 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2014-02-14 09:57:19 +0100 |
commit | 26b83d85f82a0ff59821eeb7ccecc5d57a767ce5 (patch) | |
tree | bbd0b4075a9fe3cc7ea8b7e70b02ac89540419b8 /lib/debugger/src/dbg_wx_filedialog_win.erl | |
parent | 50093842d6e916a76e4ed42263b1b3f9489d896e (diff) | |
parent | a822ec31a9148dd1e88fd3090f48559924a55eba (diff) | |
download | otp-26b83d85f82a0ff59821eeb7ccecc5d57a767ce5.tar.gz otp-26b83d85f82a0ff59821eeb7ccecc5d57a767ce5.tar.bz2 otp-26b83d85f82a0ff59821eeb7ccecc5d57a767ce5.zip |
Merge branch 'dgud/misc-cleanup'
* dgud/misc-cleanup:
dbg: Remove debug printouts and fix file dialog
sasl: Fix testcase which didn't work on windows
gs: Minor doc fix, gs is deprecated
Diffstat (limited to 'lib/debugger/src/dbg_wx_filedialog_win.erl')
-rw-r--r-- | lib/debugger/src/dbg_wx_filedialog_win.erl | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/debugger/src/dbg_wx_filedialog_win.erl b/lib/debugger/src/dbg_wx_filedialog_win.erl index c8ecb7b5d4..ea34295067 100644 --- a/lib/debugger/src/dbg_wx_filedialog_win.erl +++ b/lib/debugger/src/dbg_wx_filedialog_win.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2012. All Rights Reserved. +%% Copyright Ericsson AB 2009-2014. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -242,16 +242,13 @@ handle_event(#wx{event=#wxList{itemIndex=Index}}, {noreply, State0} end; -handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}}, +handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}}, State = #state{ptext=Previous, completion=Comp}) -> case Previous =:= undefined orelse lists:prefix(Wanted, Previous) of - true -> - case Comp of - {Temp,_} -> wxWindow:destroy(Temp); - undefined -> ok - end, + true -> + destroy_completion(Comp), {noreply, State#state{ptext=Wanted,completion=undefined}}; - false -> + false -> {noreply, show_completion(Wanted, State)} end; @@ -310,8 +307,7 @@ handle_event(#wx{event=#wxSize{size={Width,_}}}, State = #state{list=LC}) -> end), {noreply, State}; -handle_event(Event,State) -> - io:format("~p Got ~p ~n",[self(), Event]), +handle_event(_Event,State) -> {noreply, State}. handle_info(_Msg, State) -> @@ -419,8 +415,9 @@ show_completion(Wanted, State = #state{text=TC, win=Win, list=LC, completion=Com end. destroy_completion(undefined) -> ok; -destroy_completion({Window, _}) -> +destroy_completion({Window, _LB}) -> Parent = wxWindow:getParent(Window), + wxWindow:hide(Window), wxWindow:destroy(Window), wxWindow:refresh(Parent). |