aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2001-08-10 23:47:18 +0800
committerJP Rosevear <jpr@src.gnome.org>2001-08-10 23:47:18 +0800
commit2f81032abc0e68f1a2cdbc88c23b0febd2524bb1 (patch)
treefeb1e579c759fdf9e84a46ce8d8f28eb0a0daca5 /widgets/misc
parent8a2a58927497c4e88482d509f99b689dabe33a24 (diff)
downloadgsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.gz
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.bz2
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.lz
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.xz
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.tar.zst
gsoc2013-evolution-2f81032abc0e68f1a2cdbc88c23b0febd2524bb1.zip
new proto and virtual method
2001-08-10 JP Rosevear <jpr@ximian.com> * gal/widgets/e-canvas-vbox.h: new proto and virtual method * gal/widgets/e-canvas-vbox.c (e_canvas_vbox_real_add_item_start): adds the the item to the beginning (e_canvas_vbox_add_item_start): call the virtual method 2001-08-10 JP Rosevear <jpr@ximian.com> * e-table.c (et_build_groups): add the items to the start or end based on where the click to add should be (e_table_setup_table): ditto (et_real_construct): read additional spec flag * e-table.h: new flag * e-table-specification.c (etsp_init): init new flag (e_table_specification_load_from_node): set click to add end flag (e_table_specification_save_to_node): write out flag * e-table-specification.h: new flag svn path=/trunk/; revision=11880
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-canvas-vbox.c25
-rw-r--r--widgets/misc/e-canvas-vbox.h2
2 files changed, 27 insertions, 0 deletions
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 5879d4f672..465548b885 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -41,6 +41,7 @@ static void e_canvas_vbox_realize (GnomeCanvasItem *item);
static void e_canvas_vbox_reflow (GnomeCanvasItem *item, int flags);
static void e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+static void e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
static void e_canvas_vbox_resize_children (GnomeCanvasItem *item);
static GnomeCanvasGroupClass *parent_class = NULL;
@@ -100,6 +101,7 @@ e_canvas_vbox_class_init (ECanvasVboxClass *klass)
GTK_ARG_READWRITE, ARG_SPACING);
klass->add_item = e_canvas_vbox_real_add_item;
+ klass->add_item_start = e_canvas_vbox_real_add_item_start;
object_class->set_arg = e_canvas_vbox_set_arg;
object_class->get_arg = e_canvas_vbox_get_arg;
@@ -265,6 +267,21 @@ e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
}
}
+
+static void
+e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+{
+ e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item);
+ gtk_signal_connect(GTK_OBJECT(item), "destroy",
+ GTK_SIGNAL_FUNC(e_canvas_vbox_remove_item), e_canvas_vbox);
+ if ( GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED ) {
+ gnome_canvas_item_set(item,
+ "width", (double) e_canvas_vbox->minimum_width,
+ NULL);
+ e_canvas_item_request_reflow(item);
+ }
+}
+
static void
e_canvas_vbox_resize_children (GnomeCanvasItem *item)
{
@@ -348,3 +365,11 @@ e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
if (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item)
(E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item) (e_canvas_vbox, item);
}
+
+void
+e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
+{
+ if (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item_start)
+ (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item_start) (e_canvas_vbox, item);
+}
+
diff --git a/widgets/misc/e-canvas-vbox.h b/widgets/misc/e-canvas-vbox.h
index 1dfaf7a726..3a98264cd1 100644
--- a/widgets/misc/e-canvas-vbox.h
+++ b/widgets/misc/e-canvas-vbox.h
@@ -69,6 +69,7 @@ struct _ECanvasVboxClass
/* Virtual methods. */
void (* add_item) (ECanvasVbox *CanvasVbox, GnomeCanvasItem *item);
+ void (* add_item_start) (ECanvasVbox *CanvasVbox, GnomeCanvasItem *item);
};
/*
@@ -78,6 +79,7 @@ struct _ECanvasVboxClass
* changes.
*/
void e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
+void e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item);
GtkType e_canvas_vbox_get_type (void);
#ifdef __cplusplus