aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-table.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-01-18 12:32:37 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-01-18 12:32:37 +0800
commit6871682614160a4cb7bd8f437945c9e99ace5c90 (patch)
treefc4cf8cc1737a37086e937727190614aa39f080d /calendar/gui/e-calendar-table.c
parenta18a9ee80ce04d891405a851b506148a00f7e154 (diff)
downloadgsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar.gz
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar.bz2
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar.lz
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar.xz
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.tar.zst
gsoc2013-evolution-6871682614160a4cb7bd8f437945c9e99ace5c90.zip
don't create the component if there is a multiple selection
2004-01-17 JP Rosevear <jpr@ximian.com> * gui/e-calendar-table.c (e_calendar_table_delete_selected): don't create the component if there is a multiple selection Fixes #52266 svn path=/trunk/; revision=24294
Diffstat (limited to 'calendar/gui/e-calendar-table.c')
-rw-r--r--calendar/gui/e-calendar-table.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c
index 455cbbba8b..eff99818ad 100644
--- a/calendar/gui/e-calendar-table.c
+++ b/calendar/gui/e-calendar-table.c
@@ -724,7 +724,7 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
ETable *etable;
int n_selected;
ECalModelComponent *comp_data;
- ECalComponent *comp;
+ ECalComponent *comp = NULL;
g_return_if_fail (cal_table != NULL);
g_return_if_fail (E_IS_CALENDAR_TABLE (cal_table));
@@ -742,16 +742,18 @@ e_calendar_table_delete_selected (ECalendarTable *cal_table)
/* FIXME: this may be something other than a TODO component */
- comp = e_cal_component_new ();
- if (comp_data)
+ if (comp_data) {
+ comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (comp_data->icalcomp));
-
+ }
+
if (delete_component_dialog (comp, FALSE, n_selected, E_CAL_COMPONENT_TODO,
GTK_WIDGET (cal_table)))
delete_selected_components (cal_table);
/* free memory */
- g_object_unref (comp);
+ if (comp)
+ g_object_unref (comp);
}
/**