diff options
author | Dan Gudmundsson <[email protected]> | 2016-08-30 14:17:39 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2016-09-01 10:30:39 +0200 |
commit | 80ba480787e1fce17d834a580ef427fcf07cc1e8 (patch) | |
tree | 2e0c6eec6f00372c2266c657e81d5dcdfa0df77c /lib/observer/src/observer_wx.erl | |
parent | b815d568e2e43d96698dbb8de6b993d55c1b14a0 (diff) | |
download | otp-80ba480787e1fce17d834a580ef427fcf07cc1e8.tar.gz otp-80ba480787e1fce17d834a580ef427fcf07cc1e8.tar.bz2 otp-80ba480787e1fce17d834a580ef427fcf07cc1e8.zip |
observer: Fix error msg loop in table viewer
When observing mnesia table on remote node and connection to that node
is lost, a loop of error messages occur if mnesia is not running on
the observer node. ERL-237
Diffstat (limited to 'lib/observer/src/observer_wx.erl')
-rw-r--r-- | lib/observer/src/observer_wx.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl index 301bb4b32f..5732c12006 100644 --- a/lib/observer/src/observer_wx.erl +++ b/lib/observer/src/observer_wx.erl @@ -21,7 +21,7 @@ -behaviour(wx_object). -export([start/0, stop/0]). --export([create_menus/2, get_attrib/1, get_tracer/0, get_active_node/0, +-export([create_menus/2, get_attrib/1, get_tracer/0, get_active_node/0, get_menubar/0, set_status/1, create_txt_dialog/4, try_rpc/4, return_to_localnode/2]). -export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3, @@ -94,6 +94,9 @@ get_tracer() -> get_active_node() -> wx_object:call(observer, get_active_node). +get_menubar() -> + wx_object:call(observer, get_menubar). + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% init(_Args) -> @@ -391,6 +394,9 @@ handle_call(get_tracer, _From, State=#state{trace_panel=TraceP}) -> handle_call(get_active_node, _From, State=#state{node=Node}) -> {reply, Node, State}; +handle_call(get_menubar, _From, State=#state{menubar=MenuBar}) -> + {reply, MenuBar, State}; + handle_call(stop, From, State) -> stop_servers(State), {noreply, State#state{reply_to=From}}; |