mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Cfg: Refactor 'Import - General'
This commit is contained in:
@@ -67,6 +67,10 @@ public class Xocfg_mgr {
|
||||
String rv = cache_mgr.Get_or(Ctx__app, key, null);
|
||||
return rv == null ? or : Long_.parse_or(rv, or);
|
||||
}
|
||||
public String[] Get_strary_app_or(String key, String dlm, String... or) {
|
||||
String rv = cache_mgr.Get_or(Ctx__app, key, null);
|
||||
return rv == null ? or : String_.Ary_parse(String_.Trim(rv), dlm);
|
||||
}
|
||||
public String Get_str_app_or(String key, String or) {return cache_mgr.Get_or(Ctx__app, key, or);}
|
||||
public String Get_str_app(String key) {return Get_str(Xocfg_mgr.Ctx__app, key);}
|
||||
public boolean Get_bool_or(String ctx, String key, boolean or) {
|
||||
|
||||
@@ -23,7 +23,7 @@ public class Xocfg_type_mgr {
|
||||
this.Lists__add("list:xowa.app.startup.window.mode", "previous", "maximized", "absolute", "relative", "default");
|
||||
this.Lists__add("list:xowa.app.startup.pages.type", "blank", "xowa", "previous", "custom");
|
||||
this.Lists__add("list:xowa.gui.window.html_box.adj_type", "none", "relative", "absolute");
|
||||
this.Lists__add("list:xowa.wiki.database.zip_mode", "text", "gzip", "bzip2", "xz");
|
||||
this.Lists__add("list:xowa.wiki.database.zip_mode", Keyval_.new_("raw", "text"), Keyval_.new_("gzip"), Keyval_.new_("bzip2"), Keyval_.new_("xz"));
|
||||
this.Lists__add("list:xowa.html.wiki.portal.missing_class", Keyval_.new_("", "Show as blue link"), Keyval_.new_("new", "Show as red link"), Keyval_.new_("xowa_display_none", "Hide"));
|
||||
this.Lists__add("list:xowa.html.category.basic.missing_class", "normal", "hide", "red_link");
|
||||
this.Lists__add("list:xowa.html.tidy.general.engine", "tidy", "jtidy");
|
||||
|
||||
@@ -24,11 +24,13 @@ public class Xoedit_itm_html {
|
||||
if (String_.Len_gt_0(gui_args)) gui_args = " " + gui_args;
|
||||
switch (Xoitm_gui_tid.To_uid(gui_type_key)) {
|
||||
case Xoitm_gui_tid.Tid__bool:
|
||||
// bfr.Add_str_u8_fmt("<input id=\"{2}\" data-xocfg-key=\"{2}\" data-xocfg-gui=\"{0}\" accesskey=\"d\" class=\"xocfg__bool\" type=\"checkbox\"{1}{3}></input>", gui_type_key, gui_args, key, String_.Eq(val, "y") ? " checked=\"checked\"" : "");
|
||||
bfr.Add_str_u8_fmt("<input id=\"{2}\" data-xocfg-key=\"{2}\" data-xocfg-gui=\"{0}\" accesskey=\"d\" class=\"xocfg__bool\" type=\"checkbox\"{1}{3}></input>", gui_type_key, gui_args, key, String_.Eq(val, "y") ? " checked=\"checked\"" : "");
|
||||
/*
|
||||
String span_args = "";
|
||||
if (String_.Has(gui_args, "disabled=\"disabled\""))
|
||||
span_args = " class=\"xocfg__bool__disabled\"";
|
||||
bfr.Add_str_u8_fmt("<label><input id=\"{2}\" data-xocfg-key=\"{2}\" data-xocfg-gui=\"{0}\" accesskey=\"d\" class=\"xocfg__bool\" type=\"checkbox\"{1}{3}></input><span{4}></span></label>", gui_type_key, gui_args, key, String_.Eq(val, "y") ? " checked=\"checked\"" : "", span_args);
|
||||
*/
|
||||
break;
|
||||
case Xoitm_gui_tid.Tid__int:
|
||||
bfr.Add_str_u8_fmt("<input id=\"{2}\" data-xocfg-key=\"{2}\" data-xocfg-gui=\"{0}\" accesskey=\"d\" class=\"xocfg__int\" type=\"text\"{1} value=\"{3}\"></input>", gui_type_key, gui_args, key, val);
|
||||
|
||||
Reference in New Issue
Block a user