From 9a8b904d09027134c762a34f1ad961e05885f069 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 4 Feb 2001 20:00:00 +0000 Subject: Make this not error out if ecol is not found, but simply return -1. 2001-02-04 Christopher James Lahey * e-table-item.c (view_to_model_col): Make this not error out if ecol is not found, but simply return -1. (eti_event): Don't call view_to_model_col here as we already have a model column. svn path=/trunk/; revision=7960 --- widgets/table/e-table-item.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index f0d7713123..828aaf357a 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -125,8 +125,7 @@ inline static gint view_to_model_col(ETableItem *eti, int col) { ETableCol *ecol = e_table_header_get_column (eti->header, col); - g_return_val_if_fail (ecol != NULL, -1); - return ecol->col_idx; + return ecol ? ecol->col_idx : -1; } static gboolean @@ -1772,7 +1771,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) #endif gtk_signal_emit (GTK_OBJECT (eti), eti_signals [DOUBLE_CLICK], - row, view_to_model_col (eti, col), &button); + row, col, &button); g_print("Double click\n"); break; } -- cgit v1.2.3