1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2016-01-17 23:18:07 -05:00
parent 096045614c
commit 235228976e
314 changed files with 4458 additions and 2694 deletions

View File

@@ -33,7 +33,7 @@ class Xogv_page_load_wkr implements Gfo_thread_wkr, GfoInvkAble {
tab.Show_page(old_itm, new_itm, new_hpg);
}
private Xoh_page Fetch_page(byte[] wiki_domain, byte[] page_bry, byte[] qarg_bry) {
Xowv_wiki wiki = wiki_mgr.Get_by_domain(wiki_domain);
Xowv_wiki wiki = (Xowv_wiki)wiki_mgr.Get_by_or_null(wiki_domain);
if (wiki == null) return new Xoh_page().Exists_n_(); // wiki does not exist; happens with xwiki; PAGE:s.w:Photon; EX:[[wikt:transmit]]; DATE:2015-04-27
Xoa_ttl ttl = wiki.Ttl_parse(page_bry);
Gfo_url url = url_parser.Parse(Bry_.Add(wiki_domain, Byte_ascii.Slash_bry, page_bry, qarg_bry));

View File

@@ -27,7 +27,7 @@ public abstract class Xogv_tab_base {
public void Ctor(Xoav_wiki_mgr wiki_mgr, Gfo_thread_pool thread_pool, Gfo_url_parser url_parser) {this.wiki_mgr = wiki_mgr; this.thread_pool = thread_pool; this.url_parser = url_parser;}
public Xog_history_stack History_stack() {return history_stack;} private final Xog_history_stack history_stack = new Xog_history_stack();
public Xog_history_itm Cur_itm() {return history_stack.Cur_itm();}
public Xow_wiki Get_wiki_or_null(byte[] key) {return wiki_mgr.Get_by_domain(key);}
public Xow_wiki Get_wiki_or_null(byte[] key) {return wiki_mgr.Get_by_or_null(key);}
public Xoh_page Go_to(byte[] page) {return Go_to(history_stack.Cur_itm().Wiki(), page, Bry_.Empty, Bry_.Empty, false, "");}
public Xoh_page Go_to(byte[] wiki, byte[] page) {return Go_to(wiki, page, Bry_.Empty, Bry_.Empty, false, "");}
public Xoh_page Go_to(byte[] wiki, byte[] page, byte[] anch, byte[] qarg, boolean redirect_force, String bmk_pos) {

View File

@@ -61,7 +61,7 @@ class Xog_launcher_tabs {
private void Launch_tab(Xog_win_itm win, Xowe_wiki home_wiki, String launch_str) {
Xoae_app app = win.App();
Xoa_url launch_url = home_wiki.Utl__url_parser().Parse_by_urlbar_or_null(launch_str); if (launch_url == null) return;
Xowe_wiki launch_wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_key_or_make_init_y(launch_url.Wiki_bry());
Xowe_wiki launch_wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_or_make_init_y(launch_url.Wiki_bry());
Xoa_ttl launch_ttl = Xoa_ttl.parse(launch_wiki, launch_url.Page_bry());
Xog_tab_itm tab = win.Tab_mgr().Tabs_new_init(launch_wiki, Xoae_page.New(launch_wiki, launch_ttl)); // WORKAROUND: set the tab to an empty page, else null ref later; DATE:2014-07-23
tab.Show_url_bgn(launch_url);

View File

@@ -113,7 +113,7 @@ public class Xog_tab_itm implements GfoInvkAble {
if (page != null) page.Tab_data().Close_mgr().When_close(this, url); // cancel any current search cmds
app.Log_wtr().Queue_enabled_(true);
usr_dlg.Gui_wkr().Clear();
this.wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_key_or_make_init_y(url.Wiki_bry()); // NOTE: must update wiki variable; DATE:????-??-??; NOTE: must load wiki; DATE:2015-07-22
this.wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_or_make_init_y(url.Wiki_bry()); // NOTE: must update wiki variable; DATE:????-??-??; NOTE: must load wiki; DATE:2015-07-22
if (url.Page_is_main()) url.Page_bry_(wiki.Props().Main_page());
if (url.Vnt_bry() != null) Cur_vnt_(wiki, url.Vnt_bry());
Xoa_ttl ttl = Xoa_ttl.parse(wiki, url.Page_bry());

View File

@@ -253,7 +253,7 @@ public class Xog_win_itm implements GfoInvkAble, GfoEvObj {
boolean output_html = String_.Eq(output_str, "html");
Xowe_wiki home_wiki = app.Usere().Wiki();
Xoa_url url = home_wiki.Utl__url_parser().Parse_by_urlbar_or_null(url_str); if (url == null) return Bry_.Empty;
Xowe_wiki wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_key_or_make_init_y(url.Wiki_bry());
Xowe_wiki wiki = (Xowe_wiki)app.Wiki_mgr().Get_by_or_make_init_y(url.Wiki_bry());
Xoa_ttl ttl = Xoa_ttl.parse(wiki, url.Page_bry());
Xoae_page new_page = wiki.Data_mgr().Load_page_by_ttl(url, ttl);
if (new_page.Missing()) {return Bry_.Empty;}