diff options
author | Chris Lahey <clahey@src.gnome.org> | 2000-03-21 10:50:04 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-03-21 10:50:04 +0800 |
commit | 5fe5e0f7431c00d4438eaed35825cb6a33dbe05f (patch) | |
tree | 58d4d2c17a7f3459af6f0b33f3e84032cb8379d2 /widgets/table/e-table-group-leaf.c | |
parent | cd47194eb72fbe291bbd0a04e3aa174c60eb7961 (diff) | |
download | gsoc2013-evolution-5fe5e0f7431c00d4438eaed35825cb6a33dbe05f.tar.gz gsoc2013-evolution-5fe5e0f7431c00d4438eaed35825cb6a33dbe05f.tar.zst gsoc2013-evolution-5fe5e0f7431c00d4438eaed35825cb6a33dbe05f.zip |
i2000-03-20 Christopher James Lahey <clahey@helixcode.com>
* e-table-group-container.c, e-table-group-container.h,
e-table-group-leaf.c: Updated these to use the new ECanvas reflow
infrastructure.
* e-table-item.c, e-table-item.h: Updated these to use the new
ECanvas reflow infrastructure. Fixed the bounding box.
* e-table.c, e-table.h: Made the header have no extra space around it.
svn path=/trunk/; revision=2124
Diffstat (limited to 'widgets/table/e-table-group-leaf.c')
-rw-r--r-- | widgets/table/e-table-group-leaf.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 9d5f858c16..1746d4f075 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -14,6 +14,7 @@ #include "e-table-item.h" #include <libgnomeui/gnome-canvas-rect-ellipse.h> #include "e-util/e-util.h" +#include "e-util/e-canvas.h" #define TITLE_HEIGHT 16 #define GROUP_INDENT 10 @@ -76,23 +77,22 @@ e_table_group_leaf_new (GnomeCanvasGroup *parent, ETableHeader *full_heade } static void -etgl_resize (GtkObject *object, gpointer data) +etgl_row_selection (GtkObject *object, gint row, gboolean selected, ETableGroupLeaf *etgl) { - e_table_group_resize (E_TABLE_GROUP(data)); + if ( row < E_TABLE_SUBSET(etgl->subset)->n_map ) + e_table_group_row_selection (E_TABLE_GROUP(etgl), E_TABLE_SUBSET(etgl->subset)->map_table[row], selected); } static void -etgl_row_selection (GtkObject *object, gint row, gboolean selected, ETableGroupLeaf *etgl) +etgl_reflow (GnomeCanvasItem *item, gint flags) { - if ( row < E_TABLE_SUBSET(etgl->subset)->n_map ) - e_table_group_row_selection (E_TABLE_GROUP(etgl), E_TABLE_SUBSET(etgl->subset)->map_table[row], selected); + e_canvas_item_request_parent_reflow(item); } static void etgl_realize (GnomeCanvasItem *item) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF(item); - gdouble height; if ( GNOME_CANVAS_ITEM_CLASS (etgl_parent_class)->realize ) GNOME_CANVAS_ITEM_CLASS (etgl_parent_class)->realize (item); @@ -109,13 +109,7 @@ etgl_realize (GnomeCanvasItem *item) gtk_signal_connect(GTK_OBJECT(etgl->item), "row_selection", GTK_SIGNAL_FUNC(etgl_row_selection), etgl); - gtk_signal_connect(GTK_OBJECT(etgl->item), - "resize", etgl_resize, etgl); - gtk_object_get(GTK_OBJECT(etgl->item), - "height", &height, - NULL); - if ( height != 1 ) - e_table_group_resize(E_TABLE_GROUP(etgl)); + e_canvas_item_request_parent_reflow(item); } static int @@ -303,6 +297,8 @@ etgl_init (GtkObject *object) etgl->width = 1; etgl->subset = NULL; etgl->item = NULL; + + e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(object), etgl_reflow); } E_MAKE_TYPE (e_table_group_leaf, "ETableGroupLeaf", ETableGroupLeaf, etgl_class_init, etgl_init, PARENT_TYPE); |