From f704f45bbf6561376cb41236d3fa205689718c58 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 27 Jun 2000 20:54:14 +0000 Subject: Added an unsort command. 2000-06-27 Christopher James Lahey * e-table-header-item.c: Added an unsort command. * e-table-item.c: leave_edit when you loose the cursor. svn path=/trunk/; revision=3766 --- widgets/table/e-table-header-item.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'widgets/table/e-table-header-item.c') diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 1ff89a306d..3ef0a80b35 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -1075,6 +1075,18 @@ ethi_popup_sort_descending(GtkWidget *widget, EthiHeaderInfo *info) } } +static void +ethi_popup_unsort(GtkWidget *widget, EthiHeaderInfo *info) +{ + int length; + int i; + int found = FALSE; + ETableHeaderItem *ethi = info->ethi; + + e_table_sort_info_grouping_truncate(ethi->sort_info, 0); + e_table_sort_info_sorting_truncate(ethi->sort_info, 0); +} + static void ethi_popup_group_field(GtkWidget *widget, EthiHeaderInfo *info) { @@ -1137,6 +1149,7 @@ ethi_popup_customize_view(GtkWidget *widget, EthiHeaderInfo *info) static EPopupMenu ethi_context_menu [] = { { "Sort Ascending", NULL, GTK_SIGNAL_FUNC(ethi_popup_sort_ascending), 0}, { "Sort Descending", NULL, GTK_SIGNAL_FUNC(ethi_popup_sort_descending), 0}, + { "Unsort", NULL, GTK_SIGNAL_FUNC(ethi_popup_unsort), 0}, { "", NULL, GTK_SIGNAL_FUNC(NULL), 0}, { "Group By This Field", NULL, GTK_SIGNAL_FUNC(ethi_popup_group_field), 0}, { "Group By Box", NULL, GTK_SIGNAL_FUNC(ethi_popup_group_box), 1}, -- cgit v1.2.3