[epiphany-extensions] ephy-auto-scroller: adjust to recent changes in widget hierarchy.
- From: Xan Lopez <xan src gnome org>
- To: svn-commits-list gnome org
- Subject: [epiphany-extensions] ephy-auto-scroller: adjust to recent changes in widget hierarchy.
- Date: Thu, 23 Jul 2009 05:17:35 +0000 (UTC)
commit 73f2d74d2b1dfa35d7dc8e3c5033e849645b8556
Author: Xan Lopez <xan gnome org>
Date: Thu Jul 23 08:16:59 2009 +0300
ephy-auto-scroller: adjust to recent changes in widget hierarchy.
Bug #589304
.../auto-scroller/ephy-auto-scroller-extension.c | 16 ++++++++--------
extensions/auto-scroller/ephy-auto-scroller.c | 9 +++------
2 files changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/extensions/auto-scroller/ephy-auto-scroller-extension.c b/extensions/auto-scroller/ephy-auto-scroller-extension.c
index 2925112..fb283ba 100644
--- a/extensions/auto-scroller/ephy-auto-scroller-extension.c
+++ b/extensions/auto-scroller/ephy-auto-scroller-extension.c
@@ -87,11 +87,11 @@ dom_mouse_down_cb (EphyEmbed *embed,
static gboolean
button_press_cb (GtkWidget *widget,
- GdkEventButton *event,
- EphyWindow *window)
+ GdkEventButton *event,
+ EphyWindow *window)
{
EphyAutoScroller *scroller;
- EphyEmbed *embed = (EphyEmbed*) gtk_widget_get_parent (gtk_widget_get_parent (widget));
+ EphyEmbed *embed = (EphyEmbed*) gtk_widget_get_parent (widget);
// FIXME: This will swallow middle clicks on inputs and links.
if (event->button != 2)
@@ -119,7 +119,7 @@ impl_attach_tab (EphyExtension *ext,
EphyWindow *window,
EphyEmbed *embed)
{
- GtkWidget* web_view;
+ WebKitWebView* web_view;
LOG ("impl_attach_tab");
g_return_if_fail (embed != NULL);
@@ -129,9 +129,9 @@ impl_attach_tab (EphyExtension *ext,
G_CALLBACK (dom_mouse_down_cb), window, 0);
#endif
- web_view = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (embed))));
+ web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
g_signal_connect_object (web_view, "button_press_event",
- G_CALLBACK (button_press_cb), window, 0);
+ G_CALLBACK (button_press_cb), window, 0);
}
static void
@@ -139,7 +139,7 @@ impl_detach_tab (EphyExtension *ext,
EphyWindow *window,
EphyEmbed *embed)
{
- GtkWidget *web_view;
+ WebKitWebView *web_view;
LOG ("impl_detach_tab");
g_return_if_fail (embed != NULL);
@@ -149,7 +149,7 @@ impl_detach_tab (EphyExtension *ext,
(embed, G_CALLBACK (dom_mouse_down_cb), window);
#endif
- web_view = gtk_bin_get_child (GTK_BIN (gtk_bin_get_child (GTK_BIN (embed))));
+ web_view = EPHY_GET_WEBKIT_WEB_VIEW_FROM_EMBED (embed);
g_signal_handlers_disconnect_by_func
(web_view, G_CALLBACK (button_press_cb), window);
}
diff --git a/extensions/auto-scroller/ephy-auto-scroller.c b/extensions/auto-scroller/ephy-auto-scroller.c
index d3459a6..b250b70 100644
--- a/extensions/auto-scroller/ephy-auto-scroller.c
+++ b/extensions/auto-scroller/ephy-auto-scroller.c
@@ -188,19 +188,16 @@ ephy_auto_scroller_grab_notify_cb (GtkWidget *widget,
static void
ephy_auto_scroller_scroll_pixels (EphyEmbed *embed, int scroll_x, int scroll_y)
{
- GtkWidget *child;
GtkAdjustment *adj;
gdouble value;
- child = gtk_bin_get_child (GTK_BIN (embed));
- g_return_if_fail (child);
- g_return_if_fail (GTK_IS_SCROLLED_WINDOW (child));
+ g_return_if_fail (GTK_IS_SCROLLED_WINDOW (embed));
- adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (child));
+ adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (embed));
value = gtk_adjustment_get_value (adj);
gtk_adjustment_set_value (adj, value + scroll_x);
- adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (child));
+ adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (embed));
value = gtk_adjustment_get_value (adj);
gtk_adjustment_set_value (adj, value + scroll_y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]