aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-config.c')
-rw-r--r--calendar/gui/calendar-config.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 57347709a4..e0313fe3a7 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -70,6 +70,7 @@ typedef struct
CalUnits hide_completed_tasks_units;
gint hide_completed_tasks_value;
gboolean confirm_delete;
+ gboolean confirm_expunge;
gboolean use_default_reminder;
int default_reminder_interval;
CalUnits default_reminder_units;
@@ -246,6 +247,8 @@ config_read (void)
/* Confirmation */
config->confirm_delete = bonobo_config_get_boolean_with_default (
db, "/Calendar/Other/ConfirmDelete", TRUE, NULL);
+ config->confirm_expunge = bonobo_config_get_boolean_with_default (
+ db, "/Calendar/Other/ConfirmExpunge", TRUE, NULL);
/* Default reminders */
config->use_default_reminder = bonobo_config_get_boolean_with_default (
@@ -358,6 +361,7 @@ calendar_config_write (void)
config->hide_completed_tasks_value, NULL);
bonobo_config_set_boolean (db, "/Calendar/Other/ConfirmDelete", config->confirm_delete, NULL);
+ bonobo_config_set_boolean (db, "/Calendar/Other/ConfirmExpunge", config->confirm_expunge, NULL);
bonobo_config_set_boolean (db, "/Calendar/Other/UseDefaultReminder",
config->use_default_reminder, NULL);
@@ -403,6 +407,9 @@ calendar_config_write_on_exit (void)
bonobo_config_set_float (db, "/Calendar/Display/MonthVPanePosition",
config->month_vpane_pos, NULL);
+ bonobo_config_set_boolean (db, "/Calendar/Other/ConfirmExpunge",
+ config->confirm_expunge, NULL);
+
Bonobo_ConfigDatabase_sync (db, &ev);
bonobo_object_release_unref (db, NULL);
@@ -798,6 +805,32 @@ calendar_config_set_confirm_delete (gboolean confirm)
config->confirm_delete = confirm;
}
+/**
+ * calendar_config_get_confirm_expunge:
+ *
+ * Queries the configuration value for whether a confirmation dialog is
+ * presented when expunging calendar/tasks items.
+ *
+ * Return value: Whether confirmation is required when expunging items.
+ **/
+gboolean
+calendar_config_get_confirm_expunge (void)
+{
+ return config->confirm_expunge;
+}
+
+/**
+ * calendar_config_set_confirm_expunge:
+ * @confirm: Whether confirmation is required when expunging items.
+ *
+ * Sets the configuration value for whether a confirmation dialog is presented
+ * when expunging calendar/tasks items.
+ **/
+void
+calendar_config_set_confirm_expunge (gboolean confirm)
+{
+ config->confirm_expunge = confirm;
+}
/* This sets all the common config settings for an ECalendar widget.
These are the week start day, and whether we show week numbers. */