Remove wx logging junk

This commit is contained in:
2026-05-10 13:31:57 +09:00
parent e5db26ab4c
commit 97589a1da5
2 changed files with 10 additions and 5 deletions
+8 -5
View File
@@ -276,7 +276,8 @@ handle_cast(Unexpected, State) ->
handle_info(retire, State) ->
retire(State);
ok = retire(State),
{noreply, State};
handle_info(Unexpected, State) ->
ok = log(warning, "Unexpected info: ~tp~n", [Unexpected]),
{noreply, State}.
@@ -295,7 +296,8 @@ handle_event(#wx{event = #wxCommand{type = command_button_clicked}, id = ID},
ok = copy(State),
{noreply, State};
handle_event(#wx{event = #wxClose{}}, State) ->
retire(State);
ok = retire(State),
{noreply, State};
handle_event(Event, State) ->
ok = tell(info, "Unexpected event ~tp State: ~tp~n", [Event, State]),
{noreply, State}.
@@ -305,11 +307,12 @@ code_change(_, State, _) ->
{ok, State}.
retire(State = #s{frame = Frame}) ->
ok = wxWindow:destroy(Frame),
{stop, normal, State}.
retire(#s{frame = Frame}) ->
wxWindow:destroy(Frame).
terminate(wx_deleted, _) ->
wx:destroy();
terminate(Reason, State) ->
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
wx:destroy().
+2
View File
@@ -298,6 +298,8 @@ code_change(_, State, _) ->
{ok, State}.
terminate(wx_deleted, _) ->
wx:destroy();
terminate(Reason, State) ->
ok = log(info, "Reason: ~tp, State: ~tp", [Reason, State]),
wx:destroy().