Browse Source

finish up with new theme error recovery system. update default theme for compat with latest jQuery.

sisyphus
Dustin Falgout 8 years ago
parent
commit
cfd93c05a3
  1. 11
      build/utils.sh
  2. 25
      src/webkit2-extension.c
  3. 2
      themes/antergos/js/greeter.js

11
build/utils.sh

@ -10,6 +10,13 @@ do_build() {
&& ninja) && ninja)
} }
do_quick_install() {
(cd "$(dirname "${DIR}")/build/src" \
&& sudo cp lightdm-webkit2-greeter /usr/bin \
&& sudo cp liblightdm-webkit2-greeter-webext.so /usr/lib/lightdm-webkit2-greeter \
&& sudo cp -R ../../themes/antergos /usr/share/lightdm-webkit/themes)
}
clean_build_dir() { clean_build_dir() {
(cd "${DIR}" \ (cd "${DIR}" \
&& find . -type f ! -path './ci*' ! -name '.gitignore' ! -name utils.sh -delete \ && find . -type f ! -path './ci*' ! -name '.gitignore' ! -name utils.sh -delete \
@ -49,4 +56,8 @@ case "$1" in
build) build)
clean_build_dir && do_build clean_build_dir && do_build
;; ;;
build-dev)
clean_build_dir && do_build && do_quick_install
;;
esac esac

25
src/webkit2-extension.c

@ -1914,36 +1914,21 @@ void
web_page_console_message_sent_cb(WebKitWebPage *web_page, web_page_console_message_sent_cb(WebKitWebPage *web_page,
WebKitConsoleMessage *console_message, WebKitConsoleMessage *console_message,
gpointer user_data) { gpointer user_data) {
WebKitConsoleMessageLevel msg_level;
WebKitConsoleMessageSource msg_source;
WebKitDOMDOMWindow *dom_window; WebKitDOMDOMWindow *dom_window;
WebKitDOMDocument *dom_document; WebKitDOMDocument *dom_document;
const gchar *msg_text; const gchar *msg_text;
gboolean is_error, is_from_javascript, is_exception; gboolean is_error;
msg_level = webkit_console_message_get_level(console_message);
is_error = WEBKIT_CONSOLE_MESSAGE_LEVEL_ERROR == msg_level;
if (! is_error) {
return;
}
msg_source = webkit_console_message_get_source(console_message);
is_from_javascript = WEBKIT_CONSOLE_MESSAGE_SOURCE_JAVASCRIPT == msg_source;
if (! is_from_javascript) {
return;
}
msg_text = webkit_console_message_get_text(console_message); msg_text = webkit_console_message_get_text(console_message);
is_exception = is_error =
NULL != strstr(msg_text, "Uncaught") || NULL != strstr(msg_text, "Uncaught") ||
NULL != strstr(msg_text, "Error") || NULL != strstr(msg_text, "Error") ||
NULL != strstr(msg_text, "error") || NULL != strstr(msg_text, "error") ||
NULL != strstr(msg_text, "Exception") || NULL != strstr(msg_text, "Exception") ||
NULL != strstr(msg_text, "exception"); NULL != strstr(msg_text, "exception") ||
NULL != strstr(msg_text, "ERROR");
if (! is_exception) { if (! is_error) {
return; return;
} }

2
themes/antergos/js/greeter.js

@ -896,7 +896,7 @@ class AntergosTheme {
/** /**
* Initialize the theme once the window has loaded. * Initialize the theme once the window has loaded.
*/ */
$( window ).load( () => { $( window ).on('load', () => {
new AntergosThemeUtils(); new AntergosThemeUtils();
new AntergosTheme(); new AntergosTheme();
} ); } );

Loading…
Cancel
Save