diff options
author | Dan Gudmundsson <[email protected]> | 2012-05-07 14:28:55 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2012-05-08 12:36:48 +0200 |
commit | 5628fb8d88f91b3ef8e140e2658a6f61b4e42adb (patch) | |
tree | 5fd637bb062e5646cb6c70db6d564ad8d76253b7 /lib/observer/src/observer_app_wx.erl | |
parent | 515e0ad4040bc50a637bb31fc33c825d41b4f0ac (diff) | |
download | otp-5628fb8d88f91b3ef8e140e2658a6f61b4e42adb.tar.gz otp-5628fb8d88f91b3ef8e140e2658a6f61b4e42adb.tar.bz2 otp-5628fb8d88f91b3ef8e140e2658a6f61b4e42adb.zip |
[observer] Add more popup menus and info selected pid
Diffstat (limited to 'lib/observer/src/observer_app_wx.erl')
-rw-r--r-- | lib/observer/src/observer_app_wx.erl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl index 4efcd44747..f9be11e05a 100644 --- a/lib/observer/src/observer_app_wx.erl +++ b/lib/observer/src/observer_app_wx.erl @@ -204,7 +204,7 @@ handle_event(#wx{id=?ID_PROC_MSG, event=#wxCommand{type=command_menu_selected}}, handle_event(#wx{id=?ID_PROC_KILL, event=#wxCommand{type=command_menu_selected}}, State = #state{panel=Panel, sel={#box{s1=#str{pid=Pid}},_}}) -> - case observer_lib:user_term(Panel, "Enter Exit Reason", "") of + case observer_lib:user_term(Panel, "Enter Exit Reason", "kill") of cancel -> ok; {ok, Term} -> exit(Pid, Term); {error, Error} -> observer_lib:display_info_dialog(Error) @@ -276,6 +276,7 @@ handle_info({active, Node}, State = #state{parent=Parent, current=Curr}) -> handle_info(not_active, State = #state{appmon=AppMon}) -> appmon_info:app_ctrl(AppMon, node(AppMon), false, []), lists:member(node(AppMon), nodes()) andalso exit(AppMon, normal), + observer_wx:set_status(""), {noreply, State#state{appmon=undefined}}; handle_info({delivery, Pid, app_ctrl, _, Apps0}, State = #state{appmon=Pid, apps_w=LBox, current=Curr0}) -> @@ -333,6 +334,7 @@ handle_mouse_click(Node = {#box{s1=#str{pid=Pid}},_}, Type, right_down -> popup_menu(Panel); _ -> ok end, + observer_wx:set_status(io_lib:format("Pid: ~p", [Pid])), wxWindow:refresh(AppWin), State#state{sel=Node}; handle_mouse_click(_, _, State = #state{sel=undefined}) -> @@ -341,6 +343,7 @@ handle_mouse_click(_, right_down, State=#state{panel=Panel}) -> popup_menu(Panel), State; handle_mouse_click(_, _, State=#state{app_w=AppWin}) -> + observer_wx:set_status(""), wxWindow:refresh(AppWin), State#state{sel=undefined}. @@ -368,10 +371,11 @@ popup_menu(Panel) -> wxMenu:append(Menu, ?ID_TRACE_NAME, "Trace named process"), wxMenu:append(Menu, ?ID_TRACE_TREE_PIDS, "Trace process tree"), wxMenu:append(Menu, ?ID_TRACE_TREE_NAMES, "Trace named process tree"), + wxMenu:append(Menu, ?ID_PROC_MSG, "Send Msg"), + wxMenu:append(Menu, ?ID_PROC_KILL, "Kill process"), wxWindow:popupMenu(Panel, Menu), wxMenu:destroy(Menu). - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% locate_node(X, _Y, [{Box=#box{x=BX}, _Chs}|_Rest]) when X < BX -> |