[gnome-online-accounts/gnome-3-6] webview: Hide ::-webkit-scrollbar
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-6] webview: Hide ::-webkit-scrollbar
- Date: Fri, 28 Sep 2012 23:41:23 +0000 (UTC)
commit 4858ad3adf62dedec6b175bd443c6325179e1bf7
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 2a6570f..85cb4d9 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 55290a1..147e52c 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 56efc2c..952a927 100644
--- a/src/goabackend/goawebview.c
+++ b/src/goabackend/goawebview.c
@@ -215,6 +215,7 @@ goa_web_view_init (GoaWebView *self)
GtkWidget *scrolled_window;
SoupCookieJar *cookie_jar;
SoupSession *session;
+ WebKitWebSettings *settings;
self->priv = GOA_WEB_VIEW_GET_PRIVATE (self);
priv = self->priv;
@@ -244,6 +245,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]