From d870ec752c2ae51843e5b8f07cef39ff619f75d7 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Fri, 14 Apr 2000 19:46:55 +0000 Subject: Switch the parent object to be a GtkTable. (et_real_construct): apply 2000-04-14 Miguel de Icaza * e-table.c, e-table.h: Switch the parent object to be a GtkTable. (et_real_construct): apply massaging and some loving action to make the thing behave as a GtkTable. (e_table_init): More love. svn path=/trunk/; revision=2431 --- widgets/table/e-table.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index bf3f2127ba..6906f3af84 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -31,7 +31,7 @@ #define TITLE_HEIGHT 16 #define GROUP_INDENT 10 -#define PARENT_TYPE gtk_hbox_get_type () +#define PARENT_TYPE gtk_table_get_type () static GtkObjectClass *e_table_parent_class; @@ -83,6 +83,9 @@ static void e_table_init (GtkObject *object) { ETable *e_table = E_TABLE (object); + GtkTable *gtk_table = GTK_TABLE (object); + + gtk_table->homogeneous = FALSE; e_table->sort_info = NULL; e_table->sort_info_change_id = 0; @@ -780,20 +783,34 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm, e_table_setup_header (e_table); e_table_setup_table (e_table, full_header, e_table->header, etm); e_table_fill_table (e_table, etm); - - vbox = gtk_vbox_new (FALSE, 0); - - gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (e_table->header_canvas), FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (e_table->table_canvas), TRUE, TRUE, 0); - gtk_widget_show (vbox); - - gtk_box_pack_start (GTK_BOX (e_table), vbox, TRUE, TRUE, 0); + /* + * The header + */ + gtk_table_attach ( + GTK_TABLE (e_table), GTK_WIDGET (e_table->header_canvas), + 1, 2, 1, 2, + GTK_FILL | GTK_EXPAND, + GTK_FILL, 0, 0); + /* + * The body + */ + gtk_table_attach ( + GTK_TABLE (e_table), GTK_WIDGET (e_table->table_canvas), + 1, 2, 2, 3, + GTK_FILL | GTK_EXPAND, + GTK_FILL | GTK_EXPAND, 0, 0); + vscrollbar = gtk_vscrollbar_new (gtk_layout_get_vadjustment (GTK_LAYOUT (e_table->table_canvas))); gtk_widget_show (vscrollbar); - gtk_box_pack_start (GTK_BOX (e_table), vscrollbar, FALSE, FALSE, 0); + gtk_table_attach ( + GTK_TABLE (e_table), vscrollbar, + 2, 3, 2, 3, + GTK_FILL, + GTK_FILL | GTK_EXPAND, 0, 0); + gtk_widget_pop_colormap (); gtk_widget_pop_visual (); } -- cgit