diff options
-rw-r--r-- | widgets/e-table/ChangeLog | 5 | ||||
-rw-r--r-- | widgets/e-table/TODO | 2 | ||||
-rw-r--r-- | widgets/e-table/e-table.c | 12 | ||||
-rw-r--r-- | widgets/table/e-table.c | 12 |
4 files changed, 28 insertions, 3 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index 2271e568a5..be5b2fad0a 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,5 +1,10 @@ 2000-03-04 Christopher James Lahey <clahey@helixcode.com> + * e-table.c: Added saving of frozen_columns count. Added a + vertical scrollbar to ETable. + +2000-03-04 Christopher James Lahey <clahey@helixcode.com> + * e-table.c: Push the proper visual and colormap for ETable to work. 2000-03-04 Christopher James Lahey <clahey@helixcode.com> diff --git a/widgets/e-table/TODO b/widgets/e-table/TODO index 051a31e370..bbad34e6ef 100644 --- a/widgets/e-table/TODO +++ b/widgets/e-table/TODO @@ -27,7 +27,7 @@ mouse grabbing for scrolling * Add an ETable::get_specification method to get the current layout information. - * Add frozen_columns output. ++ * Add frozen_columns output. * Add input and output of column widths and minimum column widths. * Add GUI sort diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c index 1cfae378e3..4bd4417cd0 100644 --- a/widgets/e-table/e-table.c +++ b/widgets/e-table/e-table.c @@ -674,10 +674,12 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm, xmlNode *xmlRoot; xmlNode *xmlColumns; xmlNode *xmlGrouping; + + GtkWidget *vscrollbar; GTK_TABLE (e_table)->homogeneous = FALSE; - gtk_table_resize (GTK_TABLE (e_table), 1, 2); + gtk_table_resize (GTK_TABLE (e_table), 2, 2); e_table->full_header = full_header; gtk_object_ref (GTK_OBJECT (full_header)); @@ -699,6 +701,12 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm, e_table_setup_table (e_table, full_header, e_table->header, etm, xmlGrouping); e_table_fill_table (e_table, etm); + vscrollbar = gtk_vscrollbar_new(gtk_layout_get_vadjustment(GTK_LAYOUT(e_table->table_canvas))); + gtk_widget_show (vscrollbar); + gtk_table_attach ( + GTK_TABLE (e_table), vscrollbar, + 1, 2, 1, 2, 0, GTK_FILL | GTK_EXPAND, 0, 0); + gtk_widget_pop_colormap (); gtk_widget_pop_visual (); } @@ -765,6 +773,8 @@ et_build_column_spec(ETable *e_table) xmlNewChild(columns_shown, NULL, "column", text); g_free(text); } + if ( e_table->header->frozen_count != 0 ) + e_xml_set_integer_prop_by_name(columns_shown, "frozen_columns", e_table->header->frozen_count); return columns_shown; } diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 1cfae378e3..4bd4417cd0 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -674,10 +674,12 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm, xmlNode *xmlRoot; xmlNode *xmlColumns; xmlNode *xmlGrouping; + + GtkWidget *vscrollbar; GTK_TABLE (e_table)->homogeneous = FALSE; - gtk_table_resize (GTK_TABLE (e_table), 1, 2); + gtk_table_resize (GTK_TABLE (e_table), 2, 2); e_table->full_header = full_header; gtk_object_ref (GTK_OBJECT (full_header)); @@ -699,6 +701,12 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm, e_table_setup_table (e_table, full_header, e_table->header, etm, xmlGrouping); e_table_fill_table (e_table, etm); + vscrollbar = gtk_vscrollbar_new(gtk_layout_get_vadjustment(GTK_LAYOUT(e_table->table_canvas))); + gtk_widget_show (vscrollbar); + gtk_table_attach ( + GTK_TABLE (e_table), vscrollbar, + 1, 2, 1, 2, 0, GTK_FILL | GTK_EXPAND, 0, 0); + gtk_widget_pop_colormap (); gtk_widget_pop_visual (); } @@ -765,6 +773,8 @@ et_build_column_spec(ETable *e_table) xmlNewChild(columns_shown, NULL, "column", text); g_free(text); } + if ( e_table->header->frozen_count != 0 ) + e_xml_set_integer_prop_by_name(columns_shown, "frozen_columns", e_table->header->frozen_count); return columns_shown; } |