aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-10-05 20:12:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-30 01:50:03 +0800
commitb5ee0e3e829b826ba283538a034ef27e0300a123 (patch)
tree9c32f4ae03506768f3ec135cbf0f8e0f70ba0803 /widgets
parentabe994285adfe8d2019ed9407f29393ba9a52263 (diff)
downloadgsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar.gz
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar.bz2
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar.lz
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar.xz
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.tar.zst
gsoc2013-evolution-b5ee0e3e829b826ba283538a034ef27e0300a123.zip
e-map: Use gtk_alignment_configure()
Nothing but a massive code cleanup
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-map.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 0611ff20bc..56c966bf84 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -1445,30 +1445,22 @@ set_scroll_area (EMap *view, int width, int height)
gtk_widget_get_allocation (GTK_WIDGET (view), &allocation);
- /* Set scroll increments */
-
- gtk_adjustment_set_page_size (priv->hadj, allocation.width);
- gtk_adjustment_set_page_increment (priv->hadj, allocation.width / 2);
- gtk_adjustment_set_step_increment (priv->hadj, SCROLL_STEP_SIZE);
-
- gtk_adjustment_set_page_size (priv->vadj, allocation.height);
- gtk_adjustment_set_page_increment (priv->vadj, allocation.height / 2);
- gtk_adjustment_set_step_increment (priv->vadj, SCROLL_STEP_SIZE);
-
- /* Set scroll bounds and new offsets */
-
- gtk_adjustment_set_lower (priv->hadj, 0);
- gtk_adjustment_set_upper (priv->hadj, width);
+ priv->xofs = CLAMP (priv->xofs, 0, width - allocation.width);
+ priv->yofs = CLAMP (priv->yofs, 0, height - allocation.height);
- gtk_adjustment_set_lower (priv->vadj, 0);
- gtk_adjustment_set_upper (priv->vadj, height);
+ gtk_adjustment_configure (priv->hadj,
+ priv->xofs,
+ 0, width,
+ SCROLL_STEP_SIZE,
+ allocation.width / 2,
+ allocation.width);
+ gtk_adjustment_configure (priv->vadj,
+ priv->yofs,
+ 0, height,
+ SCROLL_STEP_SIZE,
+ allocation.height / 2,
+ allocation.height);
g_object_thaw_notify (G_OBJECT (priv->hadj));
g_object_thaw_notify (G_OBJECT (priv->vadj));
-
- priv->xofs = CLAMP (priv->xofs, 0, width - allocation.width);
- priv->yofs = CLAMP (priv->yofs, 0, height - allocation.height);
-
- gtk_adjustment_set_value (priv->hadj, priv->xofs);
- gtk_adjustment_set_value (priv->vadj, priv->yofs);
}