From 7794a1eb62ac24165bfa0268b49967bc7b76cca7 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 18 Oct 2000 11:15:55 +0000 Subject: Removed an unnecessary glade include file. 2000-10-18 Christopher James Lahey * e-table-field-chooser-dialog.h: Removed an unnecessary glade include file. * e-table-field-chooser.c: Make sure that glade is initialized. * e-table.c, e-table.h: Added a white background to the ETable. svn path=/trunk/; revision=5988 --- widgets/table/e-table-field-chooser-dialog.h | 1 - widgets/table/e-table-field-chooser.c | 2 ++ widgets/table/e-table.c | 25 +++++++++++++++++++++++++ widgets/table/e-table.h | 2 ++ 4 files changed, 29 insertions(+), 1 deletion(-) (limited to 'widgets/table') diff --git a/widgets/table/e-table-field-chooser-dialog.h b/widgets/table/e-table-field-chooser-dialog.h index ec151850f0..1cd7cae30c 100644 --- a/widgets/table/e-table-field-chooser-dialog.h +++ b/widgets/table/e-table-field-chooser-dialog.h @@ -22,7 +22,6 @@ #define __E_TABLE_FIELD_CHOOSER_DIALOG_H__ #include -#include #include #include diff --git a/widgets/table/e-table-field-chooser.c b/widgets/table/e-table-field-chooser.c index 52db886cda..db43deb1a0 100644 --- a/widgets/table/e-table-field-chooser.c +++ b/widgets/table/e-table-field-chooser.c @@ -74,6 +74,8 @@ e_table_field_chooser_class_init (ETableFieldChooserClass *klass) object_class = (GtkObjectClass*) klass; vbox_class = (GtkVBoxClass *) klass; + glade_gnome_init(); + parent_class = gtk_type_class (gtk_vbox_get_type ()); object_class->set_arg = e_table_field_chooser_set_arg; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 6a9b721547..0a02f86930 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -265,6 +265,10 @@ table_canvas_reflow_idle (ETable *e_table) gnome_canvas_set_scroll_region ( GNOME_CANVAS (e_table->table_canvas), 0, 0, width - 1, height - 1); + gtk_object_set (GTK_OBJECT (e_table->white_item), + "x2", width, + "y2", height, + NULL); e_table->reflow_idle_id = 0; return FALSE; } @@ -274,7 +278,13 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_table) { gdouble width; + gdouble height; + width = alloc->width; + gtk_object_get (GTK_OBJECT (e_table->canvas_vbox), + "height", &height, + NULL); + height = MAX ((int)height, alloc->height); gtk_object_set (GTK_OBJECT (e_table->canvas_vbox), "width", width, @@ -282,6 +292,10 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, gtk_object_set (GTK_OBJECT (e_table->header), "width", width, NULL); + gtk_object_set (GTK_OBJECT (e_table->white_item), + "x2", width, + "y2", height, + NULL); if (e_table->reflow_idle_id) g_source_remove(e_table->reflow_idle_id); table_canvas_reflow_idle(e_table); @@ -430,6 +444,9 @@ changed_idle (gpointer data) gtk_object_set (GTK_OBJECT (et->canvas_vbox), "width", (double) GTK_WIDGET (et->table_canvas)->allocation.width, NULL); + + if (GTK_WIDGET_REALIZED(et->table_canvas)) + table_canvas_size_allocate (GTK_WIDGET(et->table_canvas), >K_WIDGET(et->table_canvas)->allocation, et); } et->need_rebuild = 0; @@ -524,6 +541,14 @@ e_table_setup_table (ETable *e_table, ETableHeader *full_header, ETableHeader *h gtk_widget_show (GTK_WIDGET (e_table->table_canvas)); + e_table->white_item = gnome_canvas_item_new(gnome_canvas_root(e_table->table_canvas), + gnome_canvas_rect_get_type(), + "x1", (double) 0, + "y1", (double) 0, + "x2", (double) 100, + "y2", (double) 100, + "fill_color", "white", + NULL); e_table->canvas_vbox = gnome_canvas_item_new(gnome_canvas_root(e_table->table_canvas), e_canvas_vbox_get_type(), "spacing", 10.0, diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index 717272309e..e23939e746 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -63,6 +63,8 @@ typedef struct { GnomeCanvasItem *header_item, *root; + GnomeCanvasItem *white_item; + gint length_threshold; gint rebuild_idle_id; -- cgit