[gucharmap] Use gtk_adjustment_configure
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gucharmap] Use gtk_adjustment_configure
- Date: Mon, 28 Jun 2010 13:11:51 +0000 (UTC)
commit d3fd461f9b7e68d66d07cba8144a7e66e600ee59
Author: Christian Persch <chpe gnome org>
Date: Mon Jun 28 15:11:38 2010 +0200
Use gtk_adjustment_configure
gucharmap/gucharmap-chartable.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/gucharmap/gucharmap-chartable.c b/gucharmap/gucharmap-chartable.c
index a0d6d20..292e4c6 100644
--- a/gucharmap/gucharmap-chartable.c
+++ b/gucharmap/gucharmap-chartable.c
@@ -1283,23 +1283,19 @@ update_scrollbar_adjustment (GucharmapChartable *chartable)
{
GucharmapChartablePrivate *priv = chartable->priv;
GtkAdjustment *vadjustment = priv->vadjustment;
- GObject *vadjustment_object = G_OBJECT (vadjustment);
if (!vadjustment)
return;
- g_object_freeze_notify (vadjustment_object);
-
- gtk_adjustment_set_lower (vadjustment, 0.0);
- gtk_adjustment_set_upper (vadjustment, 1.0 * ( priv->last_cell / priv->cols + 1 ));
- gtk_adjustment_set_step_increment (vadjustment, 3.0);
- gtk_adjustment_set_page_increment (vadjustment, 1.0 * priv->rows);
- /* FIXMEchpe: shouldn't set page size at all! */
- gtk_adjustment_set_page_size (vadjustment, priv->rows); /* FIXMEchpe + 1 maybe? so scroll-wheel up/down scroll exactly half a page? */
-
- gtk_adjustment_set_value (vadjustment, 1.0 * priv->page_first_cell / priv->cols);
-
- g_object_thaw_notify (vadjustment_object);
+ gtk_adjustment_configure (vadjustment,
+ 1.0 * priv->page_first_cell / priv->cols,
+ 0.0,
+ 1.0 * ( priv->last_cell / priv->cols + 1 ),
+ 3.0,
+ 1.0 * priv->rows,
+ /* FIXMEchpe: shouldn't set page size at all! */
+ /* FIXMEchpe + 1 maybe? so scroll-wheel up/down scroll exactly half a page? */
+ priv->rows);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]