WIP: Need to switch to wxAcceleratorTable

This commit is contained in:
2026-05-19 18:15:25 +09:00
parent e5dcce341e
commit e0ebfade97
5 changed files with 128 additions and 45 deletions
+11 -11
View File
@@ -55,7 +55,7 @@
-type state() :: #s{}.
-type ui_name() :: gd_v_netman
| gd_v_wallman
| gd_v_doomweaver
| gd_v_fateweaver
| gd_v_express.
@@ -248,8 +248,8 @@ open_contract(ConID) ->
when ConID :: string(),
DevmanToFront :: boolean().
%% @doc
%% Ask the controller to tell the doomweaver interface to open a deployed contract.
%% The controller will start the doomweaver if it isn't already on.
%% Ask the controller to tell the fateweaver interface to open a deployed contract.
%% The controller will start the fateweaver if it isn't already on.
open_contract(ConID, DevmanToFront) when is_binary(ConID) ->
gd_server:cast(?MODULE, {open_contract, ConID, DevmanToFront});
@@ -272,9 +272,9 @@ show_call(ConID, Info) ->
Info :: map(),
DevmanToFront :: boolean().
%% @doc
%% Ask the controller to tell the doomweaver interface to dislpay the result of a call
%% Ask the controller to tell the fateweaver interface to dislpay the result of a call
%% to the indicated contract. Opens the contract in question if it isn't alread open.
%% Starts the doomweaver if it isn't already running.
%% Starts the fateweaver if it isn't already running.
show_call(ConID, Info, DevmanToFront) when is_binary(ConID) ->
gd_server:cast(?MODULE, {show_call, ConID, Info, DevmanToFront});
@@ -661,7 +661,7 @@ task_data(gd_v_netman, #s{wallet = none}) ->
[];
task_data(gd_v_wallman, #s{wallets = Wallets}) ->
Wallets;
task_data(gd_v_doomweaver, #s{}) ->
task_data(gd_v_fateweaver, #s{}) ->
[];
task_data(gd_v_express, State) ->
{ok, Selected, Keys} = do_list_keys(State),
@@ -1075,15 +1075,15 @@ do_drop_key(ID, State = #s{wallet = W, wallets = Wallets, pass = Pass}) ->
do_open_contract(ConID, ToFront, State) ->
NewState = do_show_ui(gd_v_doomweaver, ToFront, State),
ok = gd_v_doomweaver:open_contract(ConID),
NewState = do_show_ui(gd_v_fateweaver, ToFront, State),
ok = gd_v_fateweaver:open_contract(ConID),
NewState.
do_show_call(ConID, Info, ToFront, State) ->
NewState = do_show_ui(gd_v_doomweaver, ToFront, State),
ok = gd_v_doomweaver:open_contract(ConID),
ok = gd_v_doomweaver:call_result(ConID, Info),
NewState = do_show_ui(gd_v_fateweaver, ToFront, State),
ok = gd_v_fateweaver:open_contract(ConID),
ok = gd_v_fateweaver:call_result(ConID, Info),
NewState.