[gnome-online-accounts] webview: Hide ::-webkit-scrollbar



commit a16288f89a6ab9ae4c7b6568cdaba7a68b6b62d8
Author: Debarshi Ray <debarshir gnome org>
Date:   Sat Sep 29 01:32:07 2012 +0200

    webview: Hide ::-webkit-scrollbar
    
    We don't need any fancy non-native scrollbars. Recently Microsoft
    changed their Windows Live OAuth pages to have them.
    
    Fixes: https://bugzilla.gnome.org/683968

 data/Makefile.am            |    3 +++
 data/goawebview.css         |    3 +++
 src/daemon/Makefile.am      |    2 +-
 src/examples/Makefile.am    |    2 +-
 src/goa/Makefile.am         |    2 +-
 src/goabackend/Makefile.am  |    2 +-
 src/goabackend/goawebview.c |    4 ++++
 src/goaidentity/Makefile.am |    2 +-
 8 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index 1254c9a..0e5a5af 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,6 +3,9 @@ NULL =
 
 SUBDIRS = icons
 
+cssdir = $(pkgdatadir)
+css_DATA = goawebview.css
+
 servicedir       = $(datadir)/dbus-1/services
 service_in_files = org.gnome.OnlineAccounts.service.in
 service_DATA     = $(service_in_files:.service.in=.service)
diff --git a/data/goawebview.css b/data/goawebview.css
new file mode 100644
index 0000000..a3688ef
--- /dev/null
+++ b/data/goawebview.css
@@ -0,0 +1,3 @@
+::-webkit-scrollbar {
+  display: none !important;
+}
diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am
index fb62f71..7aa53c6 100644
--- a/src/daemon/Makefile.am
+++ b/src/daemon/Makefile.am
@@ -6,7 +6,7 @@ INCLUDES = 							\
 	-I$(top_srcdir)/goaidentity				\
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" 		\
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" 		\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 			\
+	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 			\
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" 			\
 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 	\
 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" 		\
diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am
index 829c9e5..b96a5b9 100644
--- a/src/examples/Makefile.am
+++ b/src/examples/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = 							\
 	-I$(top_builddir)/src -I$(top_srcdir)/src		\
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" 		\
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" 		\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 			\
+	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 			\
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" 			\
 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 	\
 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" 		\
diff --git a/src/goa/Makefile.am b/src/goa/Makefile.am
index 398bf54..64682b1 100644
--- a/src/goa/Makefile.am
+++ b/src/goa/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES = 							\
 	-I$(top_builddir)/src -I$(top_srcdir)/src		\
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" 		\
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" 		\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 			\
+	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 			\
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" 			\
 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 	\
 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" 		\
diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am
index 414b3ae..a000dc7 100644
--- a/src/goabackend/Makefile.am
+++ b/src/goabackend/Makefile.am
@@ -9,7 +9,7 @@ INCLUDES = 							\
 	-I$(top_srcdir)/src/goaidentity				\
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" 		\
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" 		\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 			\
+	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 			\
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" 			\
 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 	\
 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" 		\
diff --git a/src/goabackend/goawebview.c b/src/goabackend/goawebview.c
index b0acc51..c139fd7 100644
--- a/src/goabackend/goawebview.c
+++ b/src/goabackend/goawebview.c
@@ -230,6 +230,7 @@ goa_web_view_init (GoaWebView *self)
   SoupCookieJar *cookie_jar;
   SoupLogger *logger;
   SoupSession *session;
+  WebKitWebSettings *settings;
 
   self->priv = GOA_WEB_VIEW_GET_PRIVATE (self);
   priv = self->priv;
@@ -264,6 +265,9 @@ goa_web_view_init (GoaWebView *self)
   priv->status = WEBKIT_LOAD_PROVISIONAL;
   gtk_container_add (GTK_CONTAINER (scrolled_window), priv->web_view);
 
+  settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (priv->web_view));
+  g_object_set (settings, "user-stylesheet-uri", "file://" PACKAGE_DATA_DIR "/goawebview.css", NULL);
+
   /* statusbar is hidden by default */
   priv->floating_bar = nautilus_floating_bar_new (NULL, FALSE);
   gtk_widget_set_halign (priv->floating_bar, GTK_ALIGN_START);
diff --git a/src/goaidentity/Makefile.am b/src/goaidentity/Makefile.am
index e73af93..89d8428 100644
--- a/src/goaidentity/Makefile.am
+++ b/src/goaidentity/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = 							\
 	-I$(top_srcdir)/src/goabackend				\
 	-DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" 		\
 	-DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" 		\
-	-DPACKAGE_DATA_DIR=\""$(datadir)"\" 			\
+	-DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" 			\
 	-DPACKAGE_BIN_DIR=\""$(bindir)"\" 			\
 	-DPACKAGE_LOCALSTATE_DIR=\""$(localstatedir)"\" 	\
 	-DPACKAGE_LOCALE_DIR=\""$(localedir)"\" 		\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]