diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-06 00:20:38 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-09-06 00:20:38 +0800 |
commit | 07b58617f36d0061adf14046b4baf5299038d61c (patch) | |
tree | 6e578fe36f28331fa2e032b01ed0d8c5efca84fa | |
parent | 4b0603e0250204a51aa712ddb21c384c68662383 (diff) | |
download | gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.gz gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.tar.zst gsoc2013-evolution-07b58617f36d0061adf14046b4baf5299038d61c.zip |
Bug #655709 - Hide 'Group by' in views when not supported
-rw-r--r-- | mail/message-list.etspec | 2 | ||||
-rw-r--r-- | widgets/table/e-table-state.c | 6 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/mail/message-list.etspec b/mail/message-list.etspec index 08f51bfa3e..d54390fcd0 100644 --- a/mail/message-list.etspec +++ b/mail/message-list.etspec @@ -1,4 +1,4 @@ -<ETableSpecification cursor-mode="line" draw-grid="false" draw-focus="true" selection-mode="browse"> +<ETableSpecification cursor-mode="line" draw-grid="false" draw-focus="true" selection-mode="browse" allow-grouping="false"> <ETableColumn model_col="0" _title="Status" pixbuf="status" expansion="0.0" minimum_width="18" resizable="false" cell="render_message_status" compare="integer" /> <ETableColumn model_col="1" _title="Flagged" pixbuf="flagged" expansion="0.0" minimum_width="18" resizable="false" cell="render_flagged" compare="integer"/> 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); |