aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-02-13 21:03:48 +0800
committerChris Lahey <clahey@src.gnome.org>2002-02-13 21:03:48 +0800
commit9c5cceeeb803194ebc6ae450b038e4041c582afd (patch)
tree5fcfef60528973efc0ad67e56166a917069dd2fd /widgets/misc
parent926cc83a341feadd27be90c183b0346691f82363 (diff)
downloadgsoc2013-evolution-9c5cceeeb803194ebc6ae450b038e4041c582afd.tar.gz
gsoc2013-evolution-9c5cceeeb803194ebc6ae450b038e4041c582afd.tar.zst
gsoc2013-evolution-9c5cceeeb803194ebc6ae450b038e4041c582afd.zip
New signal for when the width of the column changes.
2002-02-13 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-reflow.c, gal/widgets/e-reflow.h (column_width_changed): New signal for when the width of the column changes. * gal/util/e-util.c, gal/util/e-util.h (e_marshal_NONE__DOUBLE): New marshaller. From gal/menus/ChangeLog: 2002-02-13 Christopher James Lahey <clahey@ximian.com> * gal-view-etable.c (detach_table): Set view->table_state_changed_id to 0. (detach_tree): Set view->tree_state_changed_id to 0. svn path=/trunk/; revision=15705
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-reflow.c21
-rw-r--r--widgets/misc/e-reflow.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c
index ed83956232..f628dec126 100644
--- a/widgets/misc/e-reflow.c
+++ b/widgets/misc/e-reflow.c
@@ -68,6 +68,7 @@ enum {
enum {
SELECTION_EVENT,
+ COLUMN_WIDTH_CHANGED,
LAST_SIGNAL
};
@@ -569,6 +570,12 @@ disconnect_set_adjustment (EReflow *reflow)
}
}
+static void
+column_width_changed (EReflow *reflow)
+{
+ gtk_signal_emit (GTK_OBJECT (reflow), signals[COLUMN_WIDTH_CHANGED], reflow->column_width);
+}
+
@@ -606,6 +613,7 @@ e_reflow_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
case ARG_COLUMN_WIDTH:
if (reflow->column_width != GTK_VALUE_INT (*arg)) {
GtkAdjustment *adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas));
+ double old_width = reflow->column_width;
reflow->column_width = GTK_VALUE_INT (*arg);
adjustment->step_increment = (reflow->column_width + E_REFLOW_FULL_GUTTER) / 2;
@@ -616,6 +624,9 @@ e_reflow_set_arg (GtkObject *o, GtkArg *arg, guint arg_id)
reflow->need_column_resize = TRUE;
gnome_canvas_item_request_update(item);
+
+ if (old_width != reflow->column_width)
+ column_width_changed (reflow);
}
break;
}
@@ -874,6 +885,7 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event)
gtk_adjustment_changed(adjustment);
e_reflow_resize_children(item);
e_canvas_item_request_reflow(item);
+ column_width_changed (reflow);
}
reflow->need_column_resize = TRUE;
gnome_canvas_item_request_update(item);
@@ -1262,6 +1274,14 @@ e_reflow_class_init (EReflowClass *klass)
e_marshal_INT__OBJECT_POINTER,
GTK_TYPE_INT, 2, GTK_TYPE_OBJECT, GTK_TYPE_GDK_EVENT);
+ signals [COLUMN_WIDTH_CHANGED] =
+ gtk_signal_new ("column_width_changed",
+ GTK_RUN_LAST,
+ E_OBJECT_CLASS_TYPE (object_class),
+ GTK_SIGNAL_OFFSET (EReflowClass, column_width_changed),
+ e_marshal_NONE__DOUBLE,
+ GTK_TYPE_NONE, 1, GTK_TYPE_DOUBLE);
+
E_OBJECT_CLASS_ADD_SIGNALS (object_class, signals, LAST_SIGNAL);
object_class->set_arg = e_reflow_set_arg;
@@ -1277,6 +1297,7 @@ e_reflow_class_init (EReflowClass *klass)
item_class->point = e_reflow_point;
klass->selection_event = e_reflow_selection_event_real;
+ klass->column_width_changed = NULL;
}
static void
diff --git a/widgets/misc/e-reflow.h b/widgets/misc/e-reflow.h
index 5b699431cc..0aed25945c 100644
--- a/widgets/misc/e-reflow.h
+++ b/widgets/misc/e-reflow.h
@@ -121,6 +121,7 @@ struct _EReflowClass
GnomeCanvasGroupClass parent_class;
int (*selection_event) (EReflow *reflow, GnomeCanvasItem *item, GdkEvent *event);
+ void (*column_width_changed) (EReflow *reflow, double width);
};
/*