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

'v3.6.3.4'

This commit is contained in:
gnosygnu
2016-06-22 15:55:05 -04:00
parent 04af0accdb
commit 8afc115176
27 changed files with 535 additions and 519 deletions

View File

@@ -40,21 +40,23 @@ public class Xoax_addon_mgr {
( new gplx.xowa.addons.bldrs.files .Xoax_builds_files_addon()
, new gplx.xowa.addons.bldrs.pagelinks .Xoax_builds_pagelinks_addon()
, new gplx.xowa.addons.bldrs.utils_rankings .Xoax_builds_utils_rankings_addon()
, new gplx.xowa.addons.wikis.searchs .Xoax_builds_search_addon()
, new gplx.xowa.addons.wikis.searchs .Xoax_builds_search_addon()
, new gplx.xowa.addons.bldrs.updates.files .Xoax_updates_files_addon()
, new gplx.xowa.addons.bldrs.htmls .Html__dump_to_fsys__addon()
, new gplx.xowa.addons.bldrs.exports .Export_addon()
, new gplx.xowa.addons.wikis.pages.randoms .Rndm_addon()
// specials
, new gplx.xowa.addons.wikis.registrys .Wiki_registry_addon()
, new gplx.xowa.addons.wikis.imports .Xow_import_addon()
, new gplx.xowa.addons.wikis.registrys .Wiki_registry_addon()
, new gplx.xowa.addons.wikis.imports .Xow_import_addon()
, new gplx.xowa.addons.bldrs.centrals .Xobc_task_addon()
, new gplx.xowa.addons.apps.helps.logs .Xolog_addon()
// jsons
, new gplx.xowa.addons.servers.https .Xoax_long_poll_addon()
);
if (app.Mode().Tid_is_http()) {
app.Addon_mgr().Itms__add_many(new gplx.xowa.addons.servers.https.Xoax_long_poll_addon());
}
return this;
}
public void Run_by_app(Xoa_app app) {
@@ -83,6 +85,5 @@ public class Xoax_addon_mgr {
}
}
}
// app.Gui__cbk_mgr().Reg(gplx.xowa.addons.servers.https.Xog_cbk_wkr__http.Instance);
}
}

View File

@@ -38,7 +38,7 @@ class Xobc_task_html extends Xow_special_wtr__base {
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.log.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.ajax.listener.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.app.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.app." + (gplx.core.envs.Op_sys.Cur().Tid_is_drd() ? "drd" : "swt") + ".js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", Get_app_js_file(app))));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.elem.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.tmpl.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xo.notify.js")));
@@ -46,4 +46,8 @@ class Xobc_task_html extends Xow_special_wtr__base {
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xobc.util.js")));
head_tags.Add(Xopg_tag_itm.New_js_file(addon_dir.GenSubFil_nest("js", "xobc.js")));
}
private static String Get_app_js_file(Xoa_app app) {
if (app.Mode().Tid_is_http()) return "xo.app.http_server.js";
return gplx.core.envs.Op_sys.Cur().Tid_is_drd() ? "xo.app.drd.js" : "xo.app.swt.js";
}
}

View File

@@ -22,7 +22,9 @@ public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_it
public int Sleep_interval = 100;
public int Send_interval = 1000;
public void Init_by_app(Xoa_app app) {}
public void Init_by_app(Xoa_app app) {
app.Gui__cbk_mgr().Reg(Xog_cbk_wkr__http.Instance);
}
public void Send_msg(String msg) {
msgs.Add(msg);
}
@@ -42,7 +44,6 @@ public class Http_long_poll_cmd implements gplx.xowa.htmls.bridges.Bridge_cmd_it
return String_.Concat_lines_nl(msgs.To_str_ary_and_clear());
}
public byte[] Key() {return BRIDGE_KEY;}
public static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll");
public byte[] Key() {return BRIDGE_KEY;} private static final byte[] BRIDGE_KEY = Bry_.new_a7("long_poll");
public static final Http_long_poll_cmd Instance = new Http_long_poll_cmd(); Http_long_poll_cmd() {}
}

View File

@@ -16,9 +16,14 @@ You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.addons.servers.https; import gplx.*; import gplx.xowa.*; import gplx.xowa.addons.*; import gplx.xowa.addons.servers.*;
import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*;
import gplx.xowa.guis.cbks.*; import gplx.core.gfobjs.*; import gplx.xowa.guis.cbks.swts.*;
public class Xog_cbk_wkr__http implements Xog_cbk_wkr {
public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) {return null;}
private final Gfobj_wtr__json__browser json_wtr = new Gfobj_wtr__json__browser();
public Object Send_json(Xog_cbk_trg trg, String func, Gfobj_nde data) {
String script = json_wtr.Write_as_func__drd(func, data);
Http_long_poll_cmd.Instance.Send_msg(script);
return null;
}
public void Send_prog(String head) {
Http_long_poll_cmd.Instance.Send_msg(head);
}