aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-14 06:16:57 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:19 +0800
commit80bc7035be2d07d14e60b09a624147f6e92d1dc6 (patch)
tree6a6dbd40ed7efffa7f42c0f2ff940474b80f7191 /widgets/misc
parent2485ba3936c9fdd4e185393d49c34dae7ba1f49d (diff)
downloadgsoc2013-evolution-80bc7035be2d07d14e60b09a624147f6e92d1dc6.tar.gz
gsoc2013-evolution-80bc7035be2d07d14e60b09a624147f6e92d1dc6.tar.zst
gsoc2013-evolution-80bc7035be2d07d14e60b09a624147f6e92d1dc6.zip
Fudge GtkScrollable for gtk2.
Yes, the GtkScrollable interface is implemented by more than just GtkLayout, but it turns out GtkLayout is the only thing Evolution uses the GtkScrollable API for on the gtk3 branch.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-canvas-utils.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/widgets/misc/e-canvas-utils.c b/widgets/misc/e-canvas-utils.c
index 8189dc1240..bbf10b60af 100644
--- a/widgets/misc/e-canvas-utils.c
+++ b/widgets/misc/e-canvas-utils.c
@@ -23,6 +23,9 @@
#include "e-canvas-utils.h"
+/* backward-compatibility cruft */
+#include "e-util/gtk-compat.h"
+
void
e_canvas_item_move_absolute (GnomeCanvasItem *item, gdouble dx, gdouble dy)
{
@@ -75,7 +78,7 @@ e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdo
g_return_if_fail (canvas != NULL);
g_return_if_fail (GNOME_IS_CANVAS (canvas));
- h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
+ h = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (canvas));
page_size = gtk_adjustment_get_page_size (h);
lower = gtk_adjustment_get_lower (h);
upper = gtk_adjustment_get_upper (h);
@@ -84,7 +87,7 @@ e_canvas_show_area (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gdo
if (dx)
gtk_adjustment_set_value (h, CLAMP (value + dx, lower, upper - page_size));
- v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
+ v = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (canvas));
page_size = gtk_adjustment_get_page_size (v);
lower = gtk_adjustment_get_lower (v);
upper = gtk_adjustment_get_upper (v);
@@ -119,7 +122,7 @@ e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gd
g_return_val_if_fail (canvas != NULL, FALSE);
g_return_val_if_fail (GNOME_IS_CANVAS (canvas), FALSE);
- h = gtk_layout_get_hadjustment (GTK_LAYOUT (canvas));
+ h = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (canvas));
page_size = gtk_adjustment_get_page_size (h);
lower = gtk_adjustment_get_lower (h);
upper = gtk_adjustment_get_upper (h);
@@ -128,7 +131,7 @@ e_canvas_area_shown (GnomeCanvas *canvas, gdouble x1, gdouble y1, gdouble x2, gd
if (CLAMP (value + dx, lower, upper - page_size) - value != 0)
return FALSE;
- v = gtk_layout_get_vadjustment (GTK_LAYOUT (canvas));
+ v = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (canvas));
page_size = gtk_adjustment_get_page_size (v);
lower = gtk_adjustment_get_lower (v);
upper = gtk_adjustment_get_upper (v);