1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Gui: Fix Read / Edit / HTML not working by keyboard shortcuts / in personal wikis [#392]

This commit is contained in:
gnosygnu
2019-03-20 08:33:30 -04:00
parent ab4cbbd3c1
commit 71232e4402
27 changed files with 100 additions and 76 deletions

View File

@@ -67,11 +67,11 @@ class Http_url_parser {
Gfo_qarg_mgr qarg_mgr = new Gfo_qarg_mgr().Init(url_obj.Qargs());
byte[] action_val = qarg_mgr.Read_bry_or("action", Bry_.Empty);
if (Bry_.Eq(action_val, Xoa_url_.Qarg__action__read))
this.action = Xopg_page_.Tid_read;
this.action = Xopg_view_mode_.Tid__read;
else if (Bry_.Eq(action_val, Xoa_url_.Qarg__action__edit))
this.action = Xopg_page_.Tid_edit;
this.action = Xopg_view_mode_.Tid__edit;
else if (Bry_.Eq(action_val, Xoa_url_.Qarg__action__html))
this.action = Xopg_page_.Tid_html;
this.action = Xopg_view_mode_.Tid__html;
else if (Bry_.Eq(action_val, Qarg__action__popup)) {
this.popup = true;
this.popup_id = qarg_mgr.Read_str_or_null(Bry_.new_a7("popup_id"));

View File

@@ -33,10 +33,10 @@ public class Http_url_parser_tst {
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1/A/B/C", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1/A/B/C"));
// action=edit
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1?action=edit", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1").Action_(Xopg_page_.Tid_edit));
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1?action=edit", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1").Action_(Xopg_view_mode_.Tid__edit));
// action=html
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1?action=html", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1").Action_(Xopg_page_.Tid_html));
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1?action=html", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1").Action_(Xopg_view_mode_.Tid__html));
// action=popup
fxt.Test__parse("/en.wikipedia.org/wiki/Page_1?action=popup", fxt.Make().Wiki_("en.wikipedia.org").Page_("Page_1").Popup_(true));