From ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 5 May 2000 00:10:32 +0000 Subject: Add an e_table_group_add_all function and implement it in the different 2000-05-04 Christopher James Lahey * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h: Add an e_table_group_add_all function and implement it in the different ETableGroup classes. * e-table-sort-info.c: Make set_nth not call changed twice if it needs to allocate more space. * e-table-sorted-variable.c, e-table-subset-variable.c, e-table-subset-variable.h: Add and implement an e_table_subset_variable_add_all command. * e-table.c: Use e_table_group_add_all as appropriate. Fix ETable grouping xml to work if there is a text element at the bottom of the grouping tree. svn path=/trunk/; revision=2806 --- widgets/table/e-table.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 515ca35f95..a05f0219e5 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -145,7 +145,6 @@ e_table_setup_header (ETable *e_table) } static void - table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, ETable *e_table) { @@ -295,6 +294,8 @@ e_table_fill_table (ETable *e_table, ETableModel *model) { int count, i; + e_table_group_add_all (e_table->group); +#if 0 count = e_table_model_row_count (model); gtk_object_set (GTK_OBJECT (e_table->group), "frozen", TRUE, NULL); @@ -303,6 +304,7 @@ e_table_fill_table (ETable *e_table, ETableModel *model) gtk_object_set (GTK_OBJECT (e_table->group), "frozen", FALSE, NULL); +#endif } static ETableHeader * @@ -344,14 +346,14 @@ et_grouping_xml_to_sort_info (ETable *table, xmlNode *grouping) gtk_object_sink (GTK_OBJECT (table->sort_info)); i = 0; - for (grouping = grouping->childs; grouping && strcmp (grouping->name, "leaf"); grouping = grouping->childs) { + for (grouping = grouping->childs; grouping && !strcmp (grouping->name, "group"); grouping = grouping->childs) { ETableSortColumn column; column.column = e_xml_get_integer_prop_by_name (grouping, "column"); column.ascending = e_xml_get_integer_prop_by_name (grouping, "ascending"); e_table_sort_info_grouping_set_nth(table->sort_info, i++, column); } i = 0; - for (; grouping; grouping = grouping->childs) { + for (; grouping && !strcmp (grouping->name, "leaf"); grouping = grouping->childs) { ETableSortColumn column; column.column = e_xml_get_integer_prop_by_name (grouping, "column"); column.ascending = e_xml_get_integer_prop_by_name (grouping, "ascending"); -- cgit