aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-07-03 11:50:27 +0800
committerChris Lahey <clahey@src.gnome.org>2001-07-03 11:50:27 +0800
commitae067f4ed99bf9ace5cbbdb2d36e1e13a6df9fa5 (patch)
tree1f7669bcf0744ea0a2c2948fa12cc85d84a54100
parent344dc8d241a15a56bb601ea5e1b500c4fc134040 (diff)
downloadgsoc2013-evolution-ae067f4ed99bf9ace5cbbdb2d36e1e13a6df9fa5.tar.gz
gsoc2013-evolution-ae067f4ed99bf9ace5cbbdb2d36e1e13a6df9fa5.tar.zst
gsoc2013-evolution-ae067f4ed99bf9ace5cbbdb2d36e1e13a6df9fa5.zip
Made the remove this column menu item greyed out if it's the last column.
2001-07-02 Christopher James Lahey <clahey@ximian.com> * e-table-header-item.c (ethi_header_context_menu): Made the remove this column menu item greyed out if it's the last column. svn path=/trunk/; revision=10725
-rw-r--r--widgets/table/e-table-header-item.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index f811b3c04b..cbf81d3753 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -1273,7 +1273,7 @@ static EPopupMenu ethi_context_menu [] = {
{ 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, 1},
{ "", NULL, GTK_SIGNAL_FUNC(NULL), NULL, 1},
- { N_("Remove This Column"), NULL, GTK_SIGNAL_FUNC(ethi_popup_remove_column), NULL, 0},
+ { 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, 1},
@@ -1295,7 +1295,9 @@ ethi_header_context_menu (ETableHeaderItem *ethi, GdkEventButton *event)
e_popup_menu_run (ethi_context_menu, (GdkEvent *) event,
1 +
(col->sortable ? 0 : 2) +
- (ethi->table ? 0 : 4), 0, info);
+ (ethi->table ? 0 : 4) +
+ ((e_table_header_count (ethi->eth) > 1) ? 0 : 8),
+ 0, info);
}
static void