diff options
author | Siri Hansen <[email protected]> | 2016-04-28 14:32:25 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2016-05-19 15:21:52 +0200 |
commit | 6dfc55407493278e9875814df054de4df51e7527 (patch) | |
tree | 9269b1a42d2325bfbd3860cfb02ace78ac6aa2fd /lib/observer/src/observer_trace_wx.erl | |
parent | 7621e4aded2b5e8ad1a04102718c9bce21d4dc4c (diff) | |
download | otp-6dfc55407493278e9875814df054de4df51e7527.tar.gz otp-6dfc55407493278e9875814df054de4df51e7527.tar.bz2 otp-6dfc55407493278e9875814df054de4df51e7527.zip |
[observer] Add menu option to set default MS for send/receive
Diffstat (limited to 'lib/observer/src/observer_trace_wx.erl')
-rw-r--r-- | lib/observer/src/observer_trace_wx.erl | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl index 9f4a54c304..f5211c8a31 100644 --- a/lib/observer/src/observer_trace_wx.erl +++ b/lib/observer/src/observer_trace_wx.erl @@ -35,9 +35,11 @@ -define(ADD_NEW_PORTS, 309). -define(ADD_TP, 310). -define(TRACE_OUTPUT, 311). --define(TRACE_DEFMS, 312). --define(DEF_PROC_OPTS, 313). --define(DEF_PORT_OPTS, 314). +-define(DEF_MS_FUNCS, 312). +-define(DEF_MS_SEND, 313). +-define(DEF_MS_RECV, 314). +-define(DEF_PROC_OPTS, 315). +-define(DEF_PORT_OPTS, 316). -define(NODES_WIN, 330). -define(ADD_NODES, 331). @@ -241,7 +243,9 @@ create_menues(Parent) -> #create_menu{id = ?SAVE_TRACEOPTS, text = "Save settings"}]}, {"Options", [#create_menu{id = ?TRACE_OUTPUT, text = "Output"}, - #create_menu{id = ?TRACE_DEFMS, text = "Default Match Specifications for Functions"}, + #create_menu{id = ?DEF_MS_FUNCS, text = "Default Match Specifications for Functions"}, + #create_menu{id = ?DEF_MS_SEND, text = "Default Match Specifications for 'send'"}, + #create_menu{id = ?DEF_MS_RECV, text = "Default Match Specifications for 'receive'"}, #create_menu{id = ?DEF_PROC_OPTS, text = "Default Process Options"}, #create_menu{id = ?DEF_PORT_OPTS, text = "Default Port Options"}]} ], @@ -463,7 +467,7 @@ handle_event(#wx{id=?DEF_PORT_OPTS}, #state{panel=Panel, def_port_flags=PO} = St {noreply, State} end; -handle_event(#wx{id=?TRACE_DEFMS}, #state{panel=Panel, match_specs=Ms} = State) -> +handle_event(#wx{id=?DEF_MS_FUNCS}, #state{panel=Panel, match_specs=Ms} = State) -> try %% Return selected MS and sends new MS's to us observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, funcs) catch _:_ -> @@ -471,6 +475,22 @@ handle_event(#wx{id=?TRACE_DEFMS}, #state{panel=Panel, match_specs=Ms} = State) end, {noreply, State}; +handle_event(#wx{id=?DEF_MS_SEND}, #state{panel=Panel, match_specs=Ms} = State) -> + try %% Return selected MS and sends new MS's to us + observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, send) + catch _:_ -> + cancel + end, + {noreply, State}; + +handle_event(#wx{id=?DEF_MS_RECV}, #state{panel=Panel, match_specs=Ms} = State) -> + try %% Return selected MS and sends new MS's to us + observer_traceoptions_wx:select_matchspec(self(), Panel, Ms, 'receive') + catch _:_ -> + cancel + end, + {noreply, State}; + handle_event(#wx{id=?EDIT_FUNCS_MS}, #state{panel=Panel, tpatterns=TPs, f_view=LCtrl, m_view=Mview, match_specs=Mss |