diff options
author | Siri Hansen <[email protected]> | 2014-01-28 15:48:11 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-01-28 15:48:11 +0100 |
commit | f65764907faba7ea6ca1a6bb266b6c6612e06b7b (patch) | |
tree | f228f7ae616ee86fb4f0ff5a7d6643f608fde471 /lib/observer/src/observer_app_wx.erl | |
parent | 10dcd146040728fab222fe325dde9328ab506d15 (diff) | |
parent | a0d7557b1f84e71f79af5f2d32caf2ce994adb4e (diff) | |
download | otp-f65764907faba7ea6ca1a6bb266b6c6612e06b7b.tar.gz otp-f65764907faba7ea6ca1a6bb266b6c6612e06b7b.tar.bz2 otp-f65764907faba7ea6ca1a6bb266b6c6612e06b7b.zip |
Merge branch 'siri/wx-cdv/OTP-11179'
* siri/wx-cdv/OTP-11179:
observer: cosmetic gui tweaks
observer: Fix progress dialog creation
observer: renamed crashdump_viewer files and fixed makefiles
observer: improve wx version of crashdump_viewer
observer: Use crashdump_viewer's term viewer to display large terms and binaries
observer: Fix memory and scheduler info and handle missing fields
observer: Optimize row lookups
observer: improve wx version of crashdump_viewer
observer: Consolidate the view of process information
observer: add wx version of crashdump_viewer
Diffstat (limited to 'lib/observer/src/observer_app_wx.erl')
-rw-r--r-- | lib/observer/src/observer_app_wx.erl | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl index 72bafcc5e0..a8ace10275 100644 --- a/lib/observer/src/observer_app_wx.erl +++ b/lib/observer/src/observer_app_wx.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2011-2012. All Rights Reserved. +%% Copyright Ericsson AB 2011-2013. 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 @@ -81,7 +81,7 @@ init([Notebook, Parent]) -> ]), Main = wxBoxSizer:new(?wxHORIZONTAL), Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)}, - {style, ?wxSP_LIVE_UPDATE}, + {style, ?SASH_STYLE}, {id, 2} ]), Apps = wxListBox:new(Splitter, 3, []), @@ -178,11 +178,16 @@ handle_event(#wx{id=Id, event=_Sz=#wxSize{size=Size}}, {noreply, State}; handle_event(#wx{event=#wxMouse{type=Type, x=X0, y=Y0}}, - S0=#state{app=#app{ptree=Tree}, app_w=AppWin}) -> - {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0), - Hit = locate_node(X,Y, [Tree]), - State = handle_mouse_click(Hit, Type, S0), - {noreply, State}; + S0=#state{app=App, app_w=AppWin}) -> + case App of + #app{ptree=Tree} -> + {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0), + Hit = locate_node(X,Y, [Tree]), + State = handle_mouse_click(Hit, Type, S0), + {noreply, State}; + _ -> + {noreply, S0} + end; handle_event(#wx{event=#wxCommand{type=command_menu_selected}}, State = #state{sel=undefined}) -> @@ -190,8 +195,8 @@ handle_event(#wx{event=#wxCommand{type=command_menu_selected}}, {noreply, State}; handle_event(#wx{id=?ID_PROC_INFO, event=#wxCommand{type=command_menu_selected}}, - State = #state{panel=Panel, sel={#box{s1=#str{pid=Pid}},_}}) -> - observer_procinfo:start(Pid, Panel, self()), + State = #state{sel={#box{s1=#str{pid=Pid}},_}}) -> + observer ! {open_link, Pid}, {noreply, State}; handle_event(#wx{id=?ID_PROC_MSG, event=#wxCommand{type=command_menu_selected}}, @@ -337,8 +342,8 @@ code_change(_, _, State) -> handle_mouse_click(Node = {#box{s1=#str{pid=Pid}},_}, Type, State=#state{app_w=AppWin,panel=Panel}) -> case Type of - left_dclick -> observer_procinfo:start(Pid, Panel, self()); - right_down -> popup_menu(Panel); + left_dclick -> observer ! {open_link, Pid}; + right_down -> popup_menu(Panel); _ -> ok end, observer_wx:set_status(io_lib:format("Pid: ~p", [Pid])), |