aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-06 00:20:38 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-06 00:20:38 +0800
commit07b58617f36d0061adf14046b4baf5299038d61c (patch)
tree6e578fe36f28331fa2e032b01ed0d8c5efca84fa /widgets/table
parent4b0603e0250204a51aa712ddb21c384c68662383 (diff)
downloadgsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.gz
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.bz2
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.lz
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.xz
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.zst
gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.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);