aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-08-02 09:24:47 +0800
committerChris Lahey <clahey@src.gnome.org>2001-08-02 09:24:47 +0800
commit108958944abcbb18fdd34d04a3503f53b3873343 (patch)
treed36160499d0d159620d64f79778ffb1dc40a0881 /widgets
parentddcc505dbf7893735bb02d971a6df1a411cdb646 (diff)
downloadgsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar.gz
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar.bz2
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar.lz
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar.xz
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.tar.zst
gsoc2013-evolution-108958944abcbb18fdd34d04a3503f53b3873343.zip
Make this function not crash if x somehow doesn't land on some column.
2001-08-01 Christopher James Lahey <clahey@ximian.com> * e-table-header-item.c (ethi_change_sort_state): Make this function not crash if x somehow doesn't land on some column. Fixes Ximian bug #5957. * e-table-header-item.c: Removed a bunch of menu items whose functionality won't be ready for 1.0. Fixes Ximian bug #154. svn path=/trunk/; revision=11560
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-table-header-item.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c
index de61653099..c4ad630a9e 100644
--- a/widgets/table/e-table-header-item.c
+++ b/widgets/table/e-table-header-item.c
@@ -1271,14 +1271,14 @@ static EPopupMenu ethi_context_menu [] = {
{ 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, 1},
+ { N_("Group By Box"), NULL, GTK_SIGNAL_FUNC(ethi_popup_group_box), NULL, 16},
{ "", 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, 1},
+ { N_("Alignment"), NULL, GTK_SIGNAL_FUNC(ethi_popup_alignment), NULL, 16},
{ 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, 1},
+ { N_("Format Columns..."), NULL, GTK_SIGNAL_FUNC(ethi_popup_format_columns), NULL, 16},
{ "", 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 }
@@ -1297,7 +1297,7 @@ 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),
- 0, info);
+ 16, info);
}
static void
@@ -1317,6 +1317,10 @@ ethi_change_sort_state (ETableHeaderItem *ethi, gdouble x)
int found = FALSE;
col = e_table_header_get_column (ethi->eth, ethi_find_col_by_x (ethi, x));
+
+ if (col == NULL)
+ return;
+
model_col = col->col_idx;
length = e_table_sort_info_grouping_get_count(ethi->sort_info);