aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-table-group-container.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-28 22:11:21 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:10 +0800
commitad5ed0d603b0b915865bef3c4edc996378696187 (patch)
tree828eca186260e34b8f9c106b46519981437bdbd4 /e-util/e-table-group-container.c
parentce3e2091c2ff7a581bfa959d71050a059d48ee94 (diff)
downloadgsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar.gz
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar.bz2
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar.lz
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar.xz
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.tar.zst
gsoc2013-evolution-ad5ed0d603b0b915865bef3c4edc996378696187.zip
ETableSortInfo: Rework API to avoid exposing ETableSortColumn.
Replace ETableSortColumn with separate ETableColumnSpecification and GtkSortType parameters in the "get_nth" and "set_nth" functions. Makes some other parts of the code simpler since it no longer has to translate a column number to a column specification.
Diffstat (limited to 'e-util/e-table-group-container.c')
-rw-r--r--e-util/e-table-group-container.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/e-util/e-table-group-container.c b/e-util/e-table-group-container.c
index 68239b123f..d828ddec3e 100644
--- a/e-util/e-table-group-container.c
+++ b/e-util/e-table-group-container.c
@@ -150,12 +150,15 @@ e_table_group_container_construct (GnomeCanvasGroup *parent,
ETableSortInfo *sort_info,
gint n)
{
+ ETableColumnSpecification *spec;
ETableCol *col;
- ETableSortColumn column = e_table_sort_info_grouping_get_nth (sort_info, n);
GtkWidget *widget;
GtkStyle *style;
+ GtkSortType sort_type;
+
+ spec = e_table_sort_info_grouping_get_nth (sort_info, n, &sort_type);
+ col = e_table_header_get_column_by_spec (full_header, spec);
- col = e_table_header_get_column_by_col_idx (full_header, column.column);
if (col == NULL) {
gint last = e_table_header_count (full_header) - 1;
col = e_table_header_get_column (full_header, last);
@@ -166,7 +169,7 @@ e_table_group_container_construct (GnomeCanvasGroup *parent,
etgc->ecol = g_object_ref (col);
etgc->sort_info = g_object_ref (sort_info);
etgc->n = n;
- etgc->ascending = column.ascending;
+ etgc->ascending = (sort_type == GTK_SORT_ASCENDING);
widget = GTK_WIDGET (GNOME_CANVAS_ITEM (etgc)->canvas);
style = gtk_widget_get_style (widget);