aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_wx.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/observer_wx.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/observer_wx.erl')
-rw-r--r--lib/observer/src/observer_wx.erl16
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 9839f8bf7b..4c385b76aa 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -131,6 +131,10 @@ setup(#state{frame = Frame} = State) ->
wxFrame:connect(Frame, close_window, [{skip, true}]),
wxMenu:connect(Frame, command_menu_selected),
wxFrame:show(Frame),
+
+ %% Freeze and thaw is buggy currently
+ DoFreeze = [?wxMAJOR_VERSION,?wxMINOR_VERSION] < [2,9],
+ DoFreeze andalso wxWindow:freeze(Panel),
%% I postpone the creation of the other tabs so they can query/use
%% the window size
@@ -154,9 +158,10 @@ setup(#state{frame = Frame} = State) ->
TracePanel = observer_trace_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, TracePanel, ?TRACE_STR, []),
-
- %% Force redraw (window needs it)
+ %% Force redraw (windows needs it)
wxWindow:refresh(Panel),
+ DoFreeze andalso wxWindow:thaw(Panel),
+
wxFrame:raise(Frame),
wxFrame:setFocus(Frame),
@@ -574,13 +579,6 @@ remove_menu_items([{MenuStr = "File", Menus}|Rest], MenuBar) ->
Menu = wxMenuBar:getMenu(MenuBar, MenuId),
Items = [wxMenu:findItem(Menu, Tag) || #create_menu{text=Tag} <- Menus],
[wxMenu:delete(Menu, MItem) || MItem <- Items],
- case os:type() =:= {unix, darwin} of
- true ->
- wxMenuBar:remove(MenuBar, MenuId),
- wxMenu:destroy(Menu);
- false ->
- ignore
- end,
remove_menu_items(Rest, MenuBar)
end;
remove_menu_items([{"Nodes", _}|_], _MB) ->