aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_tv_wx.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-11-10 11:12:48 +0100
committerDan Gudmundsson <[email protected]>2011-11-11 14:59:18 +0100
commit3caa688c5522b8f0f039b9375cf6377b1bd88f0e (patch)
tree3a5fb27501f1a3e729683fc29b47df9aa14d9189 /lib/observer/src/observer_tv_wx.erl
parentb7b88933672591d7f7c2a71a4c1643b6ca486f23 (diff)
downloadotp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.tar.gz
otp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.tar.bz2
otp-3caa688c5522b8f0f039b9375cf6377b1bd88f0e.zip
[observer] Fix portability bugs
Turn on generic listctrl implementation on Mac, the native doesn't work in wx-2.8. Fix listctrl colours on mac Turn on wxSystemMenu for miniFrame to get a close box on Windows. Direct observer help to a browser. Cleanups
Diffstat (limited to 'lib/observer/src/observer_tv_wx.erl')
-rw-r--r--lib/observer/src/observer_tv_wx.erl21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl
index dbf573151f..191faf73ff 100644
--- a/lib/observer/src/observer_tv_wx.erl
+++ b/lib/observer/src/observer_tv_wx.erl
@@ -173,16 +173,13 @@ handle_event(Event, State) ->
io:format("~p:~p, handle event ~p\n", [?MODULE, ?LINE, Event]),
{noreply, State}.
-handle_sync_event(Event, _Obj, _State) ->
- io:format("~p:~p, handle sync_event ~p\n", [?MODULE, ?LINE, Event]),
+handle_sync_event(_Event, _Obj, _State) ->
ok.
-handle_call(Event, From, State) ->
- io:format("~p:~p, handle call (~p) ~p\n", [?MODULE, ?LINE, From, Event]),
+handle_call(_Event, _From, State) ->
{noreply, State}.
-handle_cast(Event, State) ->
- io:format("~p:~p, handle cast ~p\n", [?MODULE, ?LINE, Event]),
+handle_cast(_Event, State) ->
{noreply, State}.
handle_info(refresh_interval, State = #state{node=Node, grid=Grid, opt=Opt}) ->
@@ -213,12 +210,10 @@ handle_info({error, Error}, State) ->
handle_error(Error),
{noreply, State};
-handle_info(Event, State) ->
- io:format("~p:~p, handle info ~p\n", [?MODULE, ?LINE, Event]),
+handle_info(_Event, State) ->
{noreply, State}.
-terminate(Event, _State) ->
- io:format("~p:~p, terminate ~p\n", [?MODULE, ?LINE, Event]),
+terminate(_Event, _State) ->
ok.
code_change(_, _, State) ->
@@ -339,7 +334,8 @@ display_table_info(Parent0, Node, Source, Table) ->
Parent = observer_lib:get_wx_parent(Parent0),
Title = "Table Info: " ++ atom_to_list(Table#tab.name),
Frame = wxMiniFrame:new(Parent, ?wxID_ANY, Title,
- [{style, ?wxCAPTION bor ?wxCLOSE_BOX}]),
+ [{style, ?wxSYSTEM_MENU bor ?wxCAPTION
+ bor ?wxCLOSE_BOX bor ?wxRESIZE_BORDER}]),
IdInfo = {"Identification and Owner",
[{"Name", Table#tab.name},
@@ -452,7 +448,7 @@ update_grid2(Grid, #opt{sort_key=Sort,sort_incr=Dir}, Tables) ->
protection = Protection, reg_name = RegName}, Row) ->
_Item = wxListCtrl:insertItem(Grid, Row, ""),
if (Row rem 2) =:= 0 ->
- wxListCtrl:setItemBackgroundColour(Grid, Row, {240,240,255});
+ wxListCtrl:setItemBackgroundColour(Grid, Row, ?BG_EVEN);
true -> ignore
end,
if Protection == private ->
@@ -466,7 +462,6 @@ update_grid2(Grid, #opt{sort_key=Sort,sort_incr=Dir}, Tables) ->
end,
[{0,Name}, {1,Id}, {2,Size}, {3, Memory div 1024},
{4,Owner}, {5,RegName}]),
- %% wxListCtrl:setItemData(Grid, Item, Item),
Row + 1
end,
ProcInfo = case Dir of