Commit 07b58617 authored by Milan Crha's avatar Milan Crha
Browse files

Bug #655709 - Hide 'Group by' in views when not supported

parent 4b0603e0
<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"/>
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment