diff options
Diffstat (limited to 'calendar/gui/dialogs/cal-prefs-dialog.c')
-rw-r--r-- | calendar/gui/dialogs/cal-prefs-dialog.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 9372236d56..fc8d7b0c91 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -83,10 +83,15 @@ static const int time_division_map[] = { 60, 30, 15, 10, 5, -1 }; +/* The following two are kept separate in case we need to re-order each menu individually */ static const int hide_completed_units_map[] = { CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 }; +static const int default_reminder_units_map[] = { + CAL_MINUTES, CAL_HOURS, CAL_DAYS, -1 +}; + static void cal_prefs_dialog_class_init (CalPrefsDialogClass *class); static void cal_prefs_dialog_init (CalPrefsDialog *prefs); @@ -562,6 +567,14 @@ cal_prefs_dialog_show_config (CalPrefsDialog *prefs) /* Other page */ e_dialog_toggle_set (priv->confirm_delete, calendar_config_get_confirm_delete ()); + + e_dialog_toggle_set (priv->default_reminder, + calendar_config_get_use_default_reminder ()); + e_dialog_spin_set (priv->default_reminder_interval, + calendar_config_get_default_reminder_interval ()); + e_dialog_option_menu_set (priv->default_reminder_units, + calendar_config_get_default_reminder_units (), + default_reminder_units_map); } /* Returns a pointer to a static string with an X color spec for the current @@ -657,6 +670,14 @@ cal_prefs_dialog_update_config (CalPrefsDialog *prefs) calendar_config_set_confirm_delete (e_dialog_toggle_get (priv->confirm_delete)); + calendar_config_set_use_default_reminder (e_dialog_toggle_get (priv->default_reminder)); + + calendar_config_set_default_reminder_interval ( + e_dialog_spin_get_int (priv->default_reminder_interval)); + + calendar_config_set_default_reminder_units ( + e_dialog_option_menu_get (priv->default_reminder_units, default_reminder_units_map)); + /* Done */ calendar_config_write (); |