diff options
author | Damon Chaplin <damon@ximian.com> | 2001-11-15 05:22:59 +0800 |
---|---|---|
committer | Damon Chaplin <damon@src.gnome.org> | 2001-11-15 05:22:59 +0800 |
commit | e23b289ac095c32ad706f019f4642ad69760fa64 (patch) | |
tree | bedbe994b1f4b710f5fc0d25a7f2a52358b3a37b /calendar | |
parent | dff44718d931a6619c78745adcdc6308cb9db96e (diff) | |
download | gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar.gz gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar.bz2 gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar.lz gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar.xz gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.tar.zst gsoc2013-evolution-e23b289ac095c32ad706f019f4642ad69760fa64.zip |
don't abort when e_table_selected_count() returns odd values. There seems
2001-11-14 Damon Chaplin <damon@ximian.com>
* gui/e-calendar-table.c: don't abort when e_table_selected_count()
returns odd values. There seems to be a bug in ETable. This is to
avoid bug #13843.
svn path=/trunk/; revision=14705
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/e-calendar-table.c | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 51d42e9c97..50272c8224 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2001-11-14 Damon Chaplin <damon@ximian.com> + + * gui/e-calendar-table.c: don't abort when e_table_selected_count() + returns odd values. There seems to be a bug in ETable. This is to + avoid bug #13843. + 2001-11-13 Federico Mena Quintero <federico@ximian.com> (committed to CVS by Damon) diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 545a5a146f..d475f4a603 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -659,7 +659,8 @@ get_selected_comp (ECalendarTable *cal_table) int row; etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable)); - g_assert (e_table_selected_count (etable) == 1); + if (e_table_selected_count (etable) != 1) + return NULL; row = -1; e_table_selected_row_foreach (etable, @@ -755,7 +756,8 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table) etable = e_table_scrolled_get_table (E_TABLE_SCROLLED (cal_table->etable)); n_selected = e_table_selected_count (etable); - g_assert (n_selected > 0); + if (n_selected <= 0) + return; if (n_selected == 1) comp = get_selected_comp (cal_table); @@ -974,7 +976,8 @@ e_calendar_table_on_right_click (ETable *table, int disable_mask = 0; n_selected = e_table_selected_count (table); - g_assert (n_selected > 0); + if (n_selected <= 0) + return TRUE; if (n_selected == 1) hide_mask = MASK_MULTIPLE; @@ -998,7 +1001,8 @@ e_calendar_table_on_open_task (GtkWidget *menuitem, cal_table = E_CALENDAR_TABLE (data); comp = get_selected_comp (cal_table); - open_task (cal_table, comp); + if (comp) + open_task (cal_table, comp); } static void |