aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-06 00:20:38 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:09:01 +0800
commitac507b38df11d07fac9641469db16df9c972636e (patch)
treee44ec88fefce42c367d6e0c0f2caa9b1fd0d0d98 /widgets/table
parent7f42e35eb234d8bfb62e31c3e74f283969880df2 (diff)
downloadgsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar.gz
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar.bz2
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar.lz
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar.xz
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.tar.zst
gsoc2013-evolution-ac507b38df11d07fac9641469db16df9c972636e.zip
Bug #655709 - Hide 'Group by' in views when not supported
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-state.c6
-rw-r--r--widgets/table/e-tree.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c
index 785c807442..a3362819b4 100644
--- a/widgets/table/e-table-state.c
+++ b/widgets/table/e-table-state.c
@@ -164,6 +164,7 @@ e_table_state_load_from_node (ETableState *state,
GList *list = NULL, *iterator;
gdouble state_version;
gint i;
+ gboolean can_group = TRUE;
g_return_if_fail (E_IS_TABLE_STATE (state));
g_return_if_fail (node != NULL);
@@ -171,8 +172,10 @@ e_table_state_load_from_node (ETableState *state,
state_version = e_xml_get_double_prop_by_name_with_default (
node, (const guchar *)"state-version", STATE_VERSION);
- if (state->sort_info)
+ if (state->sort_info) {
+ can_group = e_table_sort_info_get_can_group (state->sort_info);
g_object_unref (state->sort_info);
+ }
state->sort_info = NULL;
children = node->xmlChildrenNode;
@@ -202,6 +205,7 @@ e_table_state_load_from_node (ETableState *state,
if (!state->sort_info)
state->sort_info = e_table_sort_info_new ();
+ e_table_sort_info_set_can_group (state->sort_info, can_group);
for (iterator = list, i = 0; iterator; i++) {
int_and_double *column_info = iterator->data;
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 770b2ad653..67d9020106 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -1677,6 +1677,7 @@ e_tree_construct (ETree *e_tree,
}
e_tree->priv->spec = specification;
+ e_tree->priv->spec->allow_grouping = FALSE;
g_object_unref (state);
@@ -1743,6 +1744,7 @@ e_tree_construct_from_spec_file (ETree *e_tree,
}
e_tree->priv->spec = specification;
+ e_tree->priv->spec->allow_grouping = FALSE;
g_object_unref (state);