aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-item.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-11 04:49:24 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-11 04:49:24 +0800
commit1580b0527cab9b93c15a899dd83031ee65fc64d2 (patch)
treeff9f876c3028b9d18e0ef916bb561550c7767b86 /widgets/table/e-table-header-item.c
parentacdfbcd161c23f9b5b043e3dd6829e5dbd48a2f0 (diff)
downloadgsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar.gz
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar.bz2
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar.lz
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar.xz
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.tar.zst
gsoc2013-evolution-1580b0527cab9b93c15a899dd83031ee65fc64d2.zip
If the sort_info can't group, hide the grouping button and label.
2001-08-10 Christopher James Lahey <clahey@ximian.com> * e-table-config.c (setup_gui): If the sort_info can't group, hide the grouping button and label. * e-table-header-item.c (ethi_header_context_menu): Removed the Group By This Field menu item if the sort_info doesn't support grouping. * e-table-sort-info.c, e-table-sort-info.h (e_table_sort_info_get_can_group, e_table_sort_info_set_can_group): Added these functions. * e-tree.c (e_tree_set_state_object, et_real_construct): Set can_group to FALSE for all our sort infos. (e_tree_get_state_object): Fixed a potential gtk_object_ref (NULL) here. svn path=/trunk/; revision=11896
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r--widgets/table/e-table-header-item.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index d3a28c8f69..e089cb5fa6 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -1277,15 +1277,15 @@ static EPopupMenu ethi_context_menu [] = {
{ N_("Sort Descending"), NULL, GTK_SIGNAL_FUNC(ethi_popup_sort_descending), NULL, 2},
{ N_("Unsort"), NULL, GTK_SIGNAL_FUNC(ethi_popup_unsort), NULL, 0},
{ "", NULL, GTK_SIGNAL_FUNC(NULL), NULL, 0},
- { N_("Group By This Field"), NULL, GTK_SIGNAL_FUNC(ethi_popup_group_field), NULL, 0},
- { N_("Group By Box"), NULL, GTK_SIGNAL_FUNC(ethi_popup_group_box), NULL, 16},
+ { N_("Group By This Field"), NULL, GTK_SIGNAL_FUNC(ethi_popup_group_field), NULL, 16},
+ { N_("Group By Box"), NULL, GTK_SIGNAL_FUNC(ethi_popup_group_box), NULL, 128},
{ "", NULL, GTK_SIGNAL_FUNC(NULL), NULL, 1},
{ N_("Remove This Column"), NULL, GTK_SIGNAL_FUNC(ethi_popup_remove_column), NULL, 8},
{ N_("Add a Column..."), NULL, GTK_SIGNAL_FUNC(ethi_popup_field_chooser), NULL, 0},
{ "", NULL, GTK_SIGNAL_FUNC(NULL), NULL, 1},
- { N_("Alignment"), NULL, GTK_SIGNAL_FUNC(ethi_popup_alignment), NULL, 16},
+ { N_("Alignment"), NULL, GTK_SIGNAL_FUNC(ethi_popup_alignment), NULL, 128},
{ N_("Best Fit"), NULL, GTK_SIGNAL_FUNC(ethi_popup_best_fit), NULL, 2},
- { N_("Format Columns..."), NULL, GTK_SIGNAL_FUNC(ethi_popup_format_columns), NULL, 16},
+ { N_("Format Columns..."), NULL, GTK_SIGNAL_FUNC(ethi_popup_format_columns), NULL, 128},
{ "", NULL, GTK_SIGNAL_FUNC(NULL), NULL, 1},
{ N_("Customize Current View..."), NULL, GTK_SIGNAL_FUNC(ethi_popup_customize_view), NULL, 4},
{ NULL, NULL, NULL, NULL, 0 }
@@ -1304,7 +1304,8 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
(col->sortable ? 0 : 2) +
(ethi->table ? 0 : 4) +
((e_table_header_count (ethi->eth) > 1) ? 0 : 8),
- 16, info);
+ ((e_table_sort_info_get_can_group (ethi->sort_info)) ? 0 : 16) +
+ 128, info);
}
static void