aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/delete-comp.c
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@ximian.com>2001-09-19 04:56:38 +0800
committerFederico Mena Quintero <federico@src.gnome.org>2001-09-19 04:56:38 +0800
commit54141f67b759d3533605a06305ead06d1d3ec4f7 (patch)
treeb8793851ff338d1e79e1bfa98ca4c5623e4caeed /calendar/gui/dialogs/delete-comp.c
parentcc2f35f2b15566cbd90f673ec2f7d3caa017a988 (diff)
downloadgsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar.gz
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar.bz2
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar.lz
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar.xz
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.tar.zst
gsoc2013-evolution-54141f67b759d3533605a06305ead06d1d3ec4f7.zip
Fixes bug #2830.
2001-09-18 Federico Mena Quintero <federico@ximian.com> 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
Diffstat (limited to 'calendar/gui/dialogs/delete-comp.c')
-rw-r--r--calendar/gui/dialogs/delete-comp.c12
1 files changed, 9 insertions, 3 deletions
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;