diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-03-01 16:32:16 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-03-01 16:32:16 +0800 |
commit | 5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b (patch) | |
tree | df03de6655a504f924586dcf1311c5e06b0255d2 /widgets/misc/e-reflow.c | |
parent | 1fc93f47b89b1fc9fab19a48291a1129d979b50e (diff) | |
download | gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar.gz gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar.bz2 gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar.lz gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar.xz gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.tar.zst gsoc2013-evolution-5fa7ce6c09fe6ae8553e6c74281707144f1e7c8b.zip |
Added e-selection-model-simple.lo.
2001-03-01 Christopher James Lahey <clahey@ximian.com>
* gal/Makefile.am (libgal_la_LIBADD): Added
e-selection-model-simple.lo.
* gal/widgets/Makefile.am (libwidgets_la_SOURCES): Added e-selection-model-simple.c.
(libwidgetsinclude_HEADERS): Added e-selection-model-simple.h.
* gal/widgets/e-reflow-sorted.c, gal/widgets/e-reflow-sorted.h:
Added a gint *position argument to e_reflow_sorted_remove_item and
e_reflow_sorted_get_item and two gint * arguments to
e_reflow_sorted_replace_item and e_reflow_sorted_reorder_item to
return the positions in the array of the items removed, gotten, or
moved.
* gal/widgets/e-reflow.c, gal/widgets/e-reflow.h: Added a gint
*position argument to e_reflow_sorted_add_item to return the
positions in the array of the item added.
* gal/widgets/e-selection-model.c,
gal/widgets/e-selection-model.h: Added e_selection_model_move_row.
svn path=/trunk/; revision=8442
Diffstat (limited to 'widgets/misc/e-reflow.c')
-rw-r--r-- | widgets/misc/e-reflow.c | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index 88e9dc590a..735d965120 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -42,7 +42,7 @@ static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, static void e_reflow_update (GnomeCanvasItem *item, double affine[6], ArtSVP *clip_path, gint flags); static double e_reflow_point (GnomeCanvasItem *item, double x, double y, int cx, int cy, GnomeCanvasItem **actual_item); static void e_reflow_reflow (GnomeCanvasItem *item, int flags); -static void e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item); +static void e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item, gint *position); static void set_empty(EReflow *e_reflow); static void e_reflow_resize_children (GnomeCanvasItem *item); @@ -109,17 +109,17 @@ e_reflow_class_init (EReflowClass *klass) klass->add_item = e_reflow_real_add_item; - object_class->set_arg = e_reflow_set_arg; - object_class->get_arg = e_reflow_get_arg; - object_class->destroy = e_reflow_destroy; + object_class->set_arg = e_reflow_set_arg; + object_class->get_arg = e_reflow_get_arg; + object_class->destroy = e_reflow_destroy; /* GnomeCanvasItem method overrides */ - item_class->event = e_reflow_event; - item_class->realize = e_reflow_realize; - item_class->unrealize = e_reflow_unrealize; - item_class->draw = e_reflow_draw; - item_class->update = e_reflow_update; - item_class->point = e_reflow_point; + item_class->event = e_reflow_event; + item_class->realize = e_reflow_realize; + item_class->unrealize = e_reflow_unrealize; + item_class->draw = e_reflow_draw; + item_class->update = e_reflow_update; + item_class->point = e_reflow_point; } static void @@ -481,18 +481,19 @@ e_reflow_event (GnomeCanvasItem *item, GdkEvent *event) } static void -e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item) +e_reflow_real_add_item(EReflow *e_reflow, GnomeCanvasItem *item, gint *position) { e_reflow->items = g_list_append(e_reflow->items, item); gtk_object_ref(GTK_OBJECT(item)); - if ( GTK_OBJECT_FLAGS( e_reflow ) & GNOME_CANVAS_ITEM_REALIZED ) { + if (GTK_OBJECT_FLAGS (e_reflow) & GNOME_CANVAS_ITEM_REALIZED) { gnome_canvas_item_set(item, "width", (double) e_reflow->column_width, NULL); e_reflow_post_add_item(e_reflow, item); e_canvas_item_request_reflow(item); } - + if (position) + *position = g_list_index(e_reflow->items, item); } static void e_reflow_draw (GnomeCanvasItem *item, GdkDrawable *drawable, @@ -847,10 +848,10 @@ e_reflow_reflow( GnomeCanvasItem *item, int flags ) } void -e_reflow_add_item(EReflow *e_reflow, GnomeCanvasItem *item) +e_reflow_add_item(EReflow *e_reflow, GnomeCanvasItem *item, gint *position) { if (E_REFLOW_CLASS(GTK_OBJECT(e_reflow)->klass)->add_item) - (E_REFLOW_CLASS(GTK_OBJECT(e_reflow)->klass)->add_item) (e_reflow, item); + (E_REFLOW_CLASS(GTK_OBJECT(e_reflow)->klass)->add_item) (e_reflow, item, position); } void |