From 54141f67b759d3533605a06305ead06d1d3ec4f7 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Tue, 18 Sep 2001 20:56:38 +0000 Subject: Fixes bug #2830. 2001-09-18 Federico Mena Quintero Fixes bug #2830. * gui/calendar-config.c (calendar_config_get_confirm_delete): New function. (calendar_config_set_confirm_delete): New function. (config_read): Get the default value for the ConfirmDelete option. (calendar_config_write): Set the value of ConfirmDelete. * gui/dialogs/delete-comp.c (delete_component_dialog): Handle the configuration option for confirmation. * gui/dialogs/cal-prefs-dialog.c (CalPrefsDialogPrivate): Added the fields for the Other page. (get_widgets): Handle the new widgets. (cal_prefs_dialog_show_config): Likewise. (cal_prefs_dialog_update_config): Likewise. svn path=/trunk/; revision=12953 --- calendar/gui/dialogs/delete-comp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'calendar/gui/dialogs/delete-comp.c') diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index a5ba1162db..39755832cb 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -45,10 +45,13 @@ * @widget: A widget to use as a basis for conversion from UTF8 into font * encoding. * - * Pops up a dialog box asking the user whether he wants to delete a number - * of calendar components. + * Pops up a dialog box asking the user whether he wants to delete a number of + * calendar components. The dialog will not appear, however, if the + * configuration option for confirmation is turned off. * - * Return value: TRUE if the user clicked Yes, FALSE otherwise. + * Return value: TRUE if the user clicked Yes, FALSE otherwise. If the + * configuration option for confirmation is turned off, this function will + * unconditionally return TRUE. **/ gboolean delete_component_dialog (CalComponent *comp, @@ -69,6 +72,9 @@ delete_component_dialog (CalComponent *comp, g_return_val_if_fail (widget != NULL, FALSE); g_return_val_if_fail (GTK_IS_WIDGET (widget), FALSE); + if (!calendar_config_get_confirm_delete ()) + return TRUE; + if (comp) { CalComponentText summary; char *tmp; -- cgit v1.2.3