mirror of
https://github.com/gnosygnu/xowa.git
synced 2025-06-13 12:54:14 +00:00
Cfg: Rename revert / load to delete / select
This commit is contained in:
parent
da74bc6d87
commit
982cd2b848
@ -28,18 +28,18 @@ public class Xocfg_edit_bridge implements Bridge_cmd_itm {
|
||||
Json_nde args = data.Get_kv(Bridge_cmd_mgr.Msg__args).Val_as_nde();
|
||||
switch (proc_id) {
|
||||
case Proc__update: svc.Update(args); break;
|
||||
case Proc__revert: svc.Revert(args); break;
|
||||
case Proc__load: svc.Load(args); break;
|
||||
case Proc__delete: svc.Delete(args); break;
|
||||
case Proc__select: svc.Select(args); break;
|
||||
default: throw Err_.new_unhandled_default(proc_id);
|
||||
}
|
||||
return Bridge_cmd_mgr.Msg__ok;
|
||||
}
|
||||
|
||||
private static final byte Proc__update = 0, Proc__revert = 1, Proc__load = 2;
|
||||
private static final byte Proc__update = 0, Proc__delete = 1, Proc__select = 2;
|
||||
private static final Hash_adp_bry proc_hash = Hash_adp_bry.cs()
|
||||
.Add_str_byte("update" , Proc__update)
|
||||
.Add_str_byte("revert" , Proc__revert)
|
||||
.Add_str_byte("load" , Proc__load)
|
||||
.Add_str_byte("delete" , Proc__delete)
|
||||
.Add_str_byte("select" , Proc__select)
|
||||
;
|
||||
|
||||
public byte[] Key() {return BRIDGE_KEY;} public static final byte[] BRIDGE_KEY = Bry_.new_a7("xo.cfg_edit");
|
||||
|
@ -49,7 +49,7 @@ public class Xocfg_edit_svc {
|
||||
else
|
||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.cfg_edit.update__pass", Gfobj_nde.New().Add_str("key", key).Add_str("val", val).Add_str("type", type));
|
||||
}
|
||||
public void Revert(Json_nde args) {
|
||||
public void Delete(Json_nde args) {
|
||||
String ctx = args.Get_as_str("ctx");
|
||||
String key = args.Get_as_str("key");
|
||||
String type = args.Get_as_str("type");
|
||||
@ -58,14 +58,14 @@ public class Xocfg_edit_svc {
|
||||
if (String_.Has_at_bgn(type, "gui.binding")) {
|
||||
val = String_.Concat_with_str("|", gplx.xowa.addons.apps.cfgs.enums.Xoitm_gui_binding.To_gui(val));
|
||||
}
|
||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.cfg_edit.revert__recv", Gfobj_nde.New().Add_str("key", key).Add_str("val", val));
|
||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.cfg_edit.delete__recv", Gfobj_nde.New().Add_str("key", key).Add_str("val", val));
|
||||
}
|
||||
public void Load(Json_nde args) {
|
||||
public void Select(Json_nde args) {
|
||||
String ctx = args.Get_as_str("ctx");
|
||||
String key = args.Get_as_str("key");
|
||||
if (edit_loader == null) edit_loader = Xocfg_edit_loader.New(app);
|
||||
Xoedit_root root = edit_loader.Load_root(key, ctx, "en");
|
||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.cfg_edit.load__recv", root.To_nde(Bry_bfr_.New()));
|
||||
app.Gui__cbk_mgr().Send_json(cbk_trg, "xo.cfg_edit.select__recv", root.To_nde(Bry_bfr_.New()));
|
||||
app.Cfg().Set_str_app(Xocfg_edit_special.Cfg__previous_grp, key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user