mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.4.1
This commit is contained in:
@@ -16,7 +16,7 @@ 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.guis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.core.brys.fmtrs.*;
|
||||
import gplx.core.brys.fmtrs.*; import gplx.core.envs.*;
|
||||
import gplx.gfui.*; import gplx.xowa.specials.search.*; import gplx.xowa.guis.menus.*; import gplx.xowa.guis.cmds.*; import gplx.xowa.apps.cfgs.gui.*; import gplx.xowa.users.*;
|
||||
import gplx.xowa.langs.*;
|
||||
import gplx.xowa.guis.bnds.*; import gplx.xowa.guis.views.*; import gplx.xowa.guis.urls.url_macros.*;
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.guis; import gplx.*; import gplx.xowa.*;
|
||||
import gplx.core.envs.*;
|
||||
import gplx.gfui.*; import gplx.xowa.users.*; import gplx.xowa.guis.views.*;
|
||||
public class Xog_resizer {
|
||||
public void Exec_win_resize(Xoae_app app, int main_w, int main_h) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import gplx.xowa.parsers.lnkis.*;
|
||||
public class Xof_orig_file_downloader {
|
||||
public static Xof_fsdb_itm Make_fsdb(Xowe_wiki wiki, byte[] lnki_ttl, Xof_img_size img_size, Xof_url_bldr url_bldr) {
|
||||
Xof_fsdb_itm fsdb = new Xof_fsdb_itm();
|
||||
lnki_ttl = Xoa_ttl.Replace_spaces(Xoa_app_.Utl__encoder_mgr().Http_url().Decode(lnki_ttl));
|
||||
lnki_ttl = Xoa_ttl.Replace_spaces(gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Decode(lnki_ttl));
|
||||
fsdb.Init_at_lnki(Xof_exec_tid.Tid_viewer_app, wiki.Domain_itm().Abrv_xo(), lnki_ttl, Xop_lnki_type.Id_none, Xop_lnki_tkn.Upright_null, Xof_img_size.Size__neg1, Xof_img_size.Size__neg1, Xof_lnki_time.Null, Xof_lnki_page.Null, Xof_patch_upright_tid_.Tid_all);
|
||||
fsdb.Init_at_hdoc(Int_.Max_value, Xof_html_elem.Tid_img);// NOTE: set elem_id to "impossible" number, otherwise it will auto-update an image on the page with a super-large size; [[File:Alfred Sisley 062.jpg]]
|
||||
Xof_orig_itm orig = wiki.File__orig_mgr().Find_by_ttl_or_null(lnki_ttl); if (orig == Xof_orig_itm.Null) return null; // orig not found; need orig in order to get repo
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.guis.urls; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*;
|
||||
import gplx.core.net.*;
|
||||
import gplx.core.net.*; import gplx.core.envs.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.repos.*; import gplx.xowa.files.origs.*;
|
||||
import gplx.xowa.htmls.hrefs.*; import gplx.xowa.htmls.doms.*;
|
||||
import gplx.xowa.guis.views.*;
|
||||
@@ -60,13 +60,13 @@ public class Xog_url_wkr {
|
||||
}
|
||||
private Xoa_url Exec_url_file(Xoae_app app, Xowe_wiki cur_wiki, Xoae_page page, Xog_win_itm win, byte[] href_bry) { // EX: file:///xowa/A.png
|
||||
Xowe_wiki wiki = (Xowe_wiki)page.Commons_mgr().Source_wiki_or(cur_wiki);
|
||||
Io_url href_url = Io_url_.http_any_(String_.new_u8(Xoa_app_.Utl__encoder_mgr().Http_url().Decode(href_bry)), Op_sys.Cur().Tid_is_wnt());
|
||||
Io_url href_url = Io_url_.http_any_(String_.new_u8(gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Decode(href_bry)), Op_sys.Cur().Tid_is_wnt());
|
||||
gplx.gfui.Gfui_html html_box = win.Active_html_box();
|
||||
String xowa_ttl = wiki.Gui_mgr().Cfg_browser().Content_editable()
|
||||
? html_box.Html_js_eval_proc_as_str(Xog_js_procs.Selection__get_active_for_editable_mode, gplx.xowa.htmls.Xoh_consts.Atr_xowa_title_str, null)
|
||||
: Xoh_dom_.Title_by_href(href_bry, Bry_.new_u8(html_box.Html_js_eval_proc_as_str(Xog_js_procs.Doc__root_html_get)));
|
||||
if (xowa_ttl == null) {app.Gui_mgr().Kit().Ask_ok("", "", "could not find find anchor with href in html: href=~{0}", href_bry); return Rslt_handled;}
|
||||
byte[] lnki_ttl = Xoa_app_.Utl__encoder_mgr().Http_url().Decode(Xoa_ttl.Replace_spaces(Bry_.new_u8(xowa_ttl)));
|
||||
byte[] lnki_ttl = gplx.langs.htmls.encoders.Gfo_url_encoder_.Http_url.Decode(Xoa_ttl.Replace_spaces(Bry_.new_u8(xowa_ttl)));
|
||||
Xof_fsdb_itm fsdb = Xof_orig_file_downloader.Make_fsdb(wiki, lnki_ttl, img_size, url_bldr);
|
||||
if (!Io_mgr.Instance.ExistsFil(href_url)) {
|
||||
// if (!Xof_orig_file_downloader.Get_to_url(fsdb, href_url, wiki, lnki_ttl, url_bldr))
|
||||
@@ -75,7 +75,7 @@ public class Xog_url_wkr {
|
||||
}
|
||||
gplx.core.ios.IoItmFil fil = Io_mgr.Instance.QueryFil(href_url);
|
||||
if (fil.Exists()) {
|
||||
ProcessAdp media_player = app.Prog_mgr().App_by_ext(href_url.Ext());
|
||||
Process_adp media_player = app.Prog_mgr().App_by_ext(href_url.Ext());
|
||||
media_player.Run(href_url);
|
||||
fsdb.File_size_(fil.Size());
|
||||
gplx.xowa.files.caches.Xou_cache_mgr cache_mgr = wiki.Appe().User().User_db_mgr().Cache_mgr();
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*;
|
||||
import gplx.core.threads.*;
|
||||
import gplx.core.threads.*; import gplx.core.envs.*;
|
||||
public class Load_page_wkr implements Gfo_thread_wkr {
|
||||
private static final Object thread_lock = new Object(); private static boolean running = false;
|
||||
private final Xog_tab_itm tab;
|
||||
|
||||
@@ -172,7 +172,7 @@ public class Xog_html_itm implements Xog_js_wkr, GfoInvkAble, GfoEvObj {
|
||||
private boolean Scroll_page_by_id(String id) {
|
||||
return (id == null)
|
||||
? false
|
||||
: html_box.Html_js_eval_proc_as_bool(Xog_js_procs.Win__scroll_elem_into_view, Xoa_app_.Utl__encoder_mgr().Id().Encode_str(id));
|
||||
: html_box.Html_js_eval_proc_as_bool(Xog_js_procs.Win__scroll_elem_into_view, gplx.langs.htmls.encoders.Gfo_url_encoder_.Id.Encode_str(id));
|
||||
}
|
||||
public void Js_enabled_(boolean v) {
|
||||
html_box.Html_js_enabled_(v);
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*;
|
||||
import gplx.core.threads.*; import gplx.gfui.*; import gplx.xowa.guis.history.*; import gplx.xowa.guis.bnds.*;
|
||||
import gplx.core.threads.*; import gplx.core.envs.*; import gplx.gfui.*; import gplx.xowa.guis.history.*; import gplx.xowa.guis.bnds.*;
|
||||
import gplx.xowa.files.*; import gplx.xowa.files.fsdb.*;
|
||||
import gplx.xowa.langs.vnts.*;
|
||||
import gplx.xowa.parsers.*; import gplx.xowa.parsers.lnkis.redlinks.*; import gplx.xowa.apps.cfgs.old.*;
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.guis.views; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*;
|
||||
import gplx.core.threads.*;
|
||||
import gplx.core.threads.*; import gplx.core.envs.*;
|
||||
import gplx.gfui.*; import gplx.xowa.guis.*; import gplx.xowa.guis.history.*; import gplx.xowa.guis.langs.*; import gplx.xowa.guis.urls.*; import gplx.xowa.guis.views.*;
|
||||
import gplx.xowa.langs.*; import gplx.xowa.langs.msgs.*;
|
||||
import gplx.xowa.wikis.pages.*; import gplx.xowa.apps.urls.*; import gplx.xowa.files.*;
|
||||
|
||||
@@ -20,7 +20,7 @@ import gplx.gfui.*; import gplx.xowa.htmls.hrefs.*;
|
||||
public class Xog_win_itm__prog_href_mgr {
|
||||
public static void Print(Xog_win_itm win) { // PURPOSE: print href in prog box when in content editable mode
|
||||
String href = win.Active_html_box().Html_js_eval_proc_as_str(Xog_js_procs.Selection__get_active_for_editable_mode, Gfui_html.Atr_href, "");// get selected href from html_box
|
||||
href = Xoa_app_.Utl__encoder_mgr().Href().Decode_str(href); // remove url encodings
|
||||
href = gplx.langs.htmls.encoders.Gfo_url_encoder_.Href.Decode_str(href); // remove url encodings
|
||||
if (!String_.Eq(href, win.Prog_box().Text()))
|
||||
win.Usr_dlg().Prog_direct(href);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ 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.guis.views.boots; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*;
|
||||
import gplx.core.envs.*;
|
||||
public class Xog_error_data {
|
||||
public Xog_error_data(String full_msg, String err_details, String err_msg) {
|
||||
this.full_msg = full_msg;
|
||||
|
||||
@@ -16,7 +16,7 @@ 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.guis.views.boots; import gplx.*; import gplx.xowa.*; import gplx.xowa.guis.*; import gplx.xowa.guis.views.*;
|
||||
import gplx.langs.htmls.encoders.*;
|
||||
import gplx.langs.htmls.encoders.*; import gplx.core.envs.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.io.IOException;
|
||||
@@ -77,7 +77,7 @@ public class Xog_error_win extends JFrame implements GfoInvkAble {
|
||||
public Object Invk(GfsCtx ctx, int ikey, String k, GfoMsg m) {
|
||||
if (ctx.Match(k, Invk_send_mail)) {
|
||||
try {
|
||||
Url_encoder url_encoder = Xoa_app_.Utl__encoder_mgr().Fsys_safe();
|
||||
Gfo_url_encoder url_encoder = gplx.langs.htmls.encoders.Gfo_url_encoder_.Fsys_safe;
|
||||
String subject = url_encoder.Encode_str("XOWA boot error: " + error_data.Err_msg());
|
||||
String body = url_encoder.Encode_str(error_data.Err_details());
|
||||
Desktop.getDesktop().mail(new URI("mailto:gnosygnu+xowa_error_boot@gmail.com?subject=" + subject + "&body=" + body));
|
||||
|
||||
Reference in New Issue
Block a user