Browse Source

code cleanup

sisyphus
Dustin Falgout 8 years ago
parent
commit
66392277da
  1. 10
      configure.ac
  2. 9
      src/lightdm-webkit2-greeter.c

10
configure.ac

@ -32,12 +32,6 @@ PKG_CHECK_MODULES([WEB_EXTENSION], [
webkit2gtk-web-extension-4.0 >= 2.10.7
])
PKG_CHECK_MODULES([GREETER], [gtk+-3.0 >= 3.20],
[AC_DEFINE([HAVE_GTK320], [1], [Use Gtk320])],
[AC_DEFINE([HAVE_GTK320], [0], [Use Gtk320])]
)
AM_CONDITIONAL([HAVE_GTK320], [test "$HAVE_GTK320" -eq 1])
AC_SUBST([WEB_EXTENSION_CFLAGS])
AC_SUBST([WEB_EXTENSION_LIBS])
@ -144,8 +138,8 @@ dnl Summary
dnl ###########################################################################
echo "
Light Display Manager WebKit2 Greeter $VERSION
==========================================
LightDM WebKit2 Greeter $VERSION
==========================================
prefix: $prefix
Theme directory: $THEME_DIR

9
src/lightdm-webkit2-greeter.c

@ -131,7 +131,7 @@ context_menu_cb(WebKitWebView *view,
static gboolean
check_theme_heartbeat_cb(void) {
if (! heartbeat && ! heartbeat_exit) {
/* Theme heartbeat not received. We assume that an error has occured
/* Theme heartbeat not received. We assume that an error has occurred
* which broke script execution. We will fallback to the simple theme
* so the user won't be stuck with a broken login screen.
*/
@ -355,15 +355,14 @@ main(int argc, char **argv) {
create_new_webkit_settings_object();
webkit_web_view_set_settings(WEBKIT_WEB_VIEW(web_view), webkit_settings);
/* The default background is white which causes a flash effect when the greeter starts.
* We make it black instead. This is for backwards compatibility with Gtk versions that
* don't use the new CSS provider.
/* The default background color of the web_view is white which causes a flash effect when the greeter starts.
* We make it black instead. This only applies when the theme hasn't set the body background via CSS.
*/
gdk_rgba_parse(&bg_color, "#000000");
webkit_web_view_set_background_color(WEBKIT_WEB_VIEW(web_view), gdk_rgba_copy(&bg_color));
/* Maybe disable the context (right-click) menu. */
//g_signal_connect(web_view, "context-menu", G_CALLBACK(context_menu_cb), NULL);
g_signal_connect(web_view, "context-menu", G_CALLBACK(context_menu_cb), NULL);
/* There's no turning back now, let's go! */
gtk_container_add(GTK_CONTAINER(window), web_view);

Loading…
Cancel
Save