aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorXan Lopez <xan@gnome.org>2010-10-24 16:21:26 +0800
committerXan Lopez <xan@gnome.org>2010-10-24 16:21:26 +0800
commit90f545eba59c0ecf1ea6924d909630e9a9b564c6 (patch)
tree926dea7403ecb757f653b3bb742b00ce9bb7742e /embed
parente6a1b53ad5b92b572017bc756e188ccfc86b7f9a (diff)
downloadgsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar.gz
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar.bz2
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar.lz
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar.xz
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.tar.zst
gsoc2013-epiphany-90f545eba59c0ecf1ea6924d909630e9a9b564c6.zip
ephy-web-view: don't use set-scroll-adjustments signal
Instead rely on notify::{h,v}adjustment
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-web-view.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index ac68164d4..8252adc9e 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2083,13 +2083,21 @@ adj_changed_cb (GtkAdjustment *adj, EphyWebView *view)
}
static void
-set_scroll_adjustments_cb (EphyWebView *view, GtkAdjustment *hadj, GtkAdjustment *vadj)
+hadjustment_changed_cb (EphyWebView *view, GParamSpec *pspec, gpointer data)
{
- if (hadj)
- g_signal_connect (hadj, "value-changed", G_CALLBACK (adj_changed_cb), view);
+ GtkAdjustment *adj = gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(view));
- if (vadj)
- g_signal_connect (vadj, "value-changed", G_CALLBACK (adj_changed_cb), view);
+ if (adj)
+ g_signal_connect (adj, "value-changed", G_CALLBACK (adj_changed_cb), view);
+}
+
+static void
+vadjustment_changed_cb (EphyWebView *view, GParamSpec *pspec, gpointer data)
+{
+ GtkAdjustment *adj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(view));
+
+ if (adj)
+ g_signal_connect (adj, "value-changed", G_CALLBACK (adj_changed_cb), view);
}
static void
@@ -2171,8 +2179,12 @@ ephy_web_view_init (EphyWebView *web_view)
G_CALLBACK (ge_popup_blocked_cb),
web_view, (GConnectFlags)0);
- g_signal_connect (web_view, "set-scroll-adjustments",
- G_CALLBACK (set_scroll_adjustments_cb),
+ g_signal_connect (web_view, "notify::hadjustment",
+ G_CALLBACK (hadjustment_changed_cb),
+ NULL);
+
+ g_signal_connect (web_view, "notify::vadjustment",
+ G_CALLBACK (vadjustment_changed_cb),
NULL);
g_signal_connect (web_view, "notify::status-message",