aboutsummaryrefslogtreecommitdiffstats
path: root/lib/debugger/src/dbg_wx_mon_win.erl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-02-07 21:15:42 +0200
committerRaimo Niskanen <[email protected]>2010-06-07 13:44:27 +0200
commit9e962d71c6320e224025f86070f4f9421b51fea0 (patch)
tree29e4814fb8df96b8ed2ae5dab63ce34ec24a1158 /lib/debugger/src/dbg_wx_mon_win.erl
parent3647defb6f32d471355017967bdebb83b5c6224c (diff)
downloadotp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.gz
otp-9e962d71c6320e224025f86070f4f9421b51fea0.tar.bz2
otp-9e962d71c6320e224025f86070f4f9421b51fea0.zip
debugger: Clean up as suggested by tidier
Diffstat (limited to 'lib/debugger/src/dbg_wx_mon_win.erl')
-rw-r--r--lib/debugger/src/dbg_wx_mon_win.erl11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/debugger/src/dbg_wx_mon_win.erl b/lib/debugger/src/dbg_wx_mon_win.erl
index 8ad4f4213f..04c3501b8c 100644
--- a/lib/debugger/src/dbg_wx_mon_win.erl
+++ b/lib/debugger/src/dbg_wx_mon_win.erl
@@ -266,8 +266,7 @@ select(MenuItem, Bool) ->
add_module(WinInfo, MenuName, Mod) ->
Win = WinInfo#winInfo.window,
Modules = WinInfo#winInfo.modules,
- case lists:keysearch(Mod, #moduleInfo.module, Modules) of
- {value, _ModInfo} -> WinInfo;
+ case lists:keymember(Mod, #moduleInfo.module, Modules) of
false ->
%% Create a menu for the module
Menu = get(MenuName),
@@ -284,8 +283,9 @@ add_module(WinInfo, MenuName, Mod) ->
wxListBox:append(WinInfo#winInfo.listbox, atom_to_list(Mod)),
ModInfo = #moduleInfo{module=Mod, menubtn={Menu,MenuBtn}},
- WinInfo#winInfo{modules=[ModInfo | Modules]}
- end.
+ WinInfo#winInfo{modules=[ModInfo | Modules]};
+ true -> WinInfo
+ end.
%%--------------------------------------------------------------------
%% delete_module(WinInfo, Mod) -> WinInfo
@@ -559,8 +559,7 @@ handle_event(#wx{event=#wxCommand{type=command_checkbox_clicked}},
handle_event(#wx{event=#wxList{type=command_list_item_selected,
itemIndex=Row}}, WinInfo) ->
#winInfo{processes=Pids} = WinInfo,
- {value, #procInfo{pid=Pid}} =
- lists:keysearch(Row, #procInfo.row, Pids),
+ #procInfo{pid=Pid} = lists:keyfind(Row, #procInfo.row, Pids),
{focus, Pid, WinInfo#winInfo{focus=Row}};
handle_event(#wx{event=#wxList{type=command_list_item_activated}},
_WinInfo) ->