From 41380c0ff6c4fb56aad5702b9d9554ae36580063 Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 16 Oct 2013 16:53:53 +0200 Subject: observer: improve wx version of crashdump_viewer * bugfixes * better progress dialogs * show expanded binaries in different formats * speed up reading of big crashdumps --- lib/observer/src/cdv_mod_wx.erl | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'lib/observer/src/cdv_mod_wx.erl') diff --git a/lib/observer/src/cdv_mod_wx.erl b/lib/observer/src/cdv_mod_wx.erl index 601da1f4e8..8751651fec 100644 --- a/lib/observer/src/cdv_mod_wx.erl +++ b/lib/observer/src/cdv_mod_wx.erl @@ -59,33 +59,32 @@ get_details(Id) -> {ok,{Title,Proplist,TW}}. detail_pages() -> - [{simple, "General Information", fun init_gen_page/3}, - {simple, "Current Attributes", fun init_curr_attr_page/3}, - {simple, "Current Compilation Info", fun init_curr_comp_page/3}, - {simple, "Old Attributes", fun init_old_attr_page/3}, - {simple, "Old Compilation Info", fun init_old_comp_page/3}]. + [{"General Information", fun init_gen_page/2}, + {"Current Attributes", fun init_curr_attr_page/2}, + {"Current Compilation Info", fun init_curr_comp_page/2}, + {"Old Attributes", fun init_old_attr_page/2}, + {"Old Compilation Info", fun init_old_comp_page/2}]. -init_gen_page(Parent, _Id, Info) -> +init_gen_page(Parent, Info) -> Fields = info_fields(), - cdv_detail_win:init_detail_page(Parent, Fields, Info). + cdv_info_page:start_link(Parent,{Fields,Info,[]}). -init_curr_attr_page(Parent, _Id, Info) -> +init_curr_attr_page(Parent, Info) -> init_info_page(Parent, proplists:get_value(current_attrib,Info)). -init_curr_comp_page(Parent, _Id, Info) -> +init_curr_comp_page(Parent, Info) -> init_info_page(Parent, proplists:get_value(current_comp_info,Info)). -init_old_attr_page(Parent, _Id, Info) -> +init_old_attr_page(Parent, Info) -> init_info_page(Parent, proplists:get_value(old_attrib,Info)). -init_old_comp_page(Parent, _Id, Info) -> +init_old_comp_page(Parent, Info) -> init_info_page(Parent, proplists:get_value(old_comp_info,Info)). init_info_page(Parent, undefined) -> init_info_page(Parent, ""); init_info_page(Parent, String) -> - Html = crashdump_viewer_html:plain_page(String), - observer_lib:html_window(Parent,Html). + cdv_html_page:start_link(Parent,crashdump_viewer_html:plain_page(String)). format({Bin,q}) when is_binary(Bin) -> [$'|binary_to_list(Bin)]; -- cgit v1.2.3