aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@src.gnome.org>2000-02-08 09:43:02 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2000-02-08 09:43:02 +0800
commit8287590461ca0577afdf6cfa4475ccbbe05a42d9 (patch)
tree14c98128322bfe03912fce2d5ceec0fd150c6ffd /widgets/e-table
parentd6de7b88f5f8575fa20bacb2bc31dfdb54d4ab99 (diff)
downloadgsoc2013-evolution-8287590461ca0577afdf6cfa4475ccbbe05a42d9.tar.gz
gsoc2013-evolution-8287590461ca0577afdf6cfa4475ccbbe05a42d9.tar.zst
gsoc2013-evolution-8287590461ca0577afdf6cfa4475ccbbe05a42d9.zip
Sync for Chris to use
svn path=/trunk/; revision=1689
Diffstat (limited to 'widgets/e-table')
-rw-r--r--widgets/e-table/e-table-group.c9
-rw-r--r--widgets/e-table/e-table.c21
2 files changed, 18 insertions, 12 deletions
diff --git a/widgets/e-table/e-table-group.c b/widgets/e-table/e-table-group.c
index 8783fbaa02..5652d2623f 100644
--- a/widgets/e-table/e-table-group.c
+++ b/widgets/e-table/e-table-group.c
@@ -171,9 +171,16 @@ e_table_group_add (ETableGroup *etg, GnomeCanvasItem *item)
GnomeCanvasItem *child = l->data;
height += child->y2 - child->y1;
+
+ printf ("Height\n");
+ if (E_IS_TABLE_ITEM (item)){
+ printf (" Item: ");
+ } else {
+ printf (" Group: ");
+ }
+ printf ("%d\n", child->y2-child->y1);
}
- printf ("Positioning item %p at %d\n", item, height);
gnome_canvas_item_set (
item,
"y", (double) height,
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index c9a85b87b6..efda8931d2 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -260,7 +260,6 @@ static Node *
e_table_create_leaf (ETable *e_table, ETableModel *etm, Node *parent)
{
GnomeCanvasItem *table_item;
- static double last_y;
Node *leaf;
table_item = gnome_canvas_item_new (
@@ -339,8 +338,6 @@ e_table_create_nodes (ETable *e_table, ETableModel *model, ETableHeader *header,
group = node_new (group_item, model, parent);
for (i = 0; tables [i] != NULL; i++){
- Node *node;
-
/*
* Leafs
*/
@@ -450,7 +447,6 @@ e_table_canvas_unrealize (GtkWidget *widget)
ETable *e_table = e_table_canvas->e_table;
gtk_object_destroy (GTK_OBJECT (e_table->root));
- e_table->root = NULL;
GTK_WIDGET_CLASS (e_table_canvas_parent_class)->unrealize (widget);
}
@@ -469,15 +465,11 @@ e_table_canvas_class_init (GtkObjectClass *object_class)
static void
e_table_canvas_init (GtkObject *canvas)
{
+ ETableCanvas *e_table_canvas = (ETableCanvas *) (canvas);
+ ETable *e_table = e_table_canvas->e_table;
+
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);
- e_table->root = gnome_canvas_item_new (
- GNOME_CANVAS_GROUP (e_table->table_canvas->root),
- gnome_canvas_group_get_type (),
- "x", 0.0,
- "y", 0.0,
- NULL);
-
}
GtkType e_table_canvas_get_type (void);
@@ -492,6 +484,13 @@ e_table_canvas_new (ETable *e_table)
e_table_canvas = gtk_type_new (e_table_canvas_get_type ());
e_table_canvas->e_table = e_table;
+
+ e_table->root = gnome_canvas_item_new (
+ GNOME_CANVAS_GROUP (GNOME_CANVAS (e_table_canvas)->root),
+ gnome_canvas_group_get_type (),
+ "x", 0.0,
+ "y", 0.0,
+ NULL);
return GNOME_CANVAS (e_table_canvas);
}