aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/cdv_info_page.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2013-10-16 16:53:53 +0200
committerDan Gudmundsson <[email protected]>2014-01-27 16:13:47 +0100
commit41380c0ff6c4fb56aad5702b9d9554ae36580063 (patch)
tree5c16ed3916a700b5f0176d8a33d2ffa28e65c911 /lib/observer/src/cdv_info_page.erl
parent549205db3dee21e83a64a01f03b1e8ed2225b276 (diff)
downloadotp-41380c0ff6c4fb56aad5702b9d9554ae36580063.tar.gz
otp-41380c0ff6c4fb56aad5702b9d9554ae36580063.tar.bz2
otp-41380c0ff6c4fb56aad5702b9d9554ae36580063.zip
observer: improve wx version of crashdump_viewer
* bugfixes * better progress dialogs * show expanded binaries in different formats * speed up reading of big crashdumps
Diffstat (limited to 'lib/observer/src/cdv_info_page.erl')
-rw-r--r--lib/observer/src/cdv_info_page.erl39
1 files changed, 24 insertions, 15 deletions
diff --git a/lib/observer/src/cdv_info_page.erl b/lib/observer/src/cdv_info_page.erl
index b2f94fbc7f..27eb71225d 100644
--- a/lib/observer/src/cdv_info_page.erl
+++ b/lib/observer/src/cdv_info_page.erl
@@ -63,11 +63,18 @@ handle_info(active, State) ->
crashdump_viewer_wx:set_status(State#state.trunc_warn),
{noreply, State};
-handle_info(not_active, #state{} = State) ->
- {noreply, State};
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
-handle_info(new_dump, #state{callback=Callback,panel=Panel,
- sizer=Sizer,fpanel=FPanel} = State) ->
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From, #state{callback=Callback,panel=Panel,
+ sizer=Sizer,fpanel=FPanel} = State) ->
{InfoFields,Info,TW} = Callback:get_info(),
NewFPanel =
wx:batch(
@@ -77,17 +84,7 @@ handle_info(new_dump, #state{callback=Callback,panel=Panel,
wxSizer:layout(Sizer),
FP
end),
- {noreply, State#state{fpanel=NewFPanel,trunc_warn=TW}};
-
-handle_info(Info, State) ->
- io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
- {noreply, State}.
-
-terminate(_Reason, _State) ->
- ok.
-
-code_change(_, _, State) ->
- {ok, State}.
+ {reply, ok, State#state{fpanel=NewFPanel,trunc_warn=TW}};
handle_call(Msg, _From, State) ->
io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
@@ -97,6 +94,18 @@ handle_cast(Msg, State) ->
io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
{noreply, State}.
+handle_event(#wx{event=#wxMouse{type=left_down},userData=Target}, State) ->
+ cdv_virtual_list:start_detail_win(Target),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj,event=#wxMouse{type=enter_window}},State) ->
+ wxTextCtrl:setForegroundColour(Obj,{0,0,100,255}),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj,event=#wxMouse{type=leave_window}},State) ->
+ wxTextCtrl:setForegroundColour(Obj,?wxBLUE),
+ {noreply, State};
+
handle_event(Event, State) ->
io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
{noreply, State}.