diff options
author | Milan Crha <mcrha@redhat.com> | 2009-07-29 01:56:11 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-11 04:26:11 +0800 |
commit | 78c34e905d5689f72276c323cc06c12fc65d9cc1 (patch) | |
tree | e87b88c422a88d6b7c895632e7da59d829e53003 | |
parent | 3d62dcf4cb08e8acb98693561037d35fd8741c73 (diff) | |
download | gsoc2013-evolution-78c34e905d5689f72276c323cc06c12fc65d9cc1.tar.gz gsoc2013-evolution-78c34e905d5689f72276c323cc06c12fc65d9cc1.tar.zst gsoc2013-evolution-78c34e905d5689f72276c323cc06c12fc65d9cc1.zip |
Bug #314599 - Recurrence Tab Should Not Default To Forever
-rw-r--r-- | calendar/gui/calendar-config-keys.h | 3 | ||||
-rw-r--r-- | calendar/gui/calendar-config.c | 15 | ||||
-rw-r--r-- | calendar/gui/calendar-config.h | 3 | ||||
-rw-r--r-- | calendar/gui/dialogs/recurrence-page.c | 2 |
4 files changed, 22 insertions, 1 deletions
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h index b12b3b2b92..61044f577b 100644 --- a/calendar/gui/calendar-config-keys.h +++ b/calendar/gui/calendar-config-keys.h @@ -92,6 +92,9 @@ G_BEGIN_DECLS #define CALENDAR_CONFIG_BA_REMINDER CALENDAR_CONFIG_PREFIX "/other/use_ba_reminder" #define CALENDAR_CONFIG_BA_REMINDER_INTERVAL CALENDAR_CONFIG_PREFIX "/other/ba_reminder_interval" #define CALENDAR_CONFIG_BA_REMINDER_UNITS CALENDAR_CONFIG_PREFIX "/other/ba_reminder_units" + +#define CALENDAR_CONFIG_DEF_RECUR_COUNT CALENDAR_CONFIG_PREFIX "/other/def_recur_count" + G_END_DECLS #endif diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 5ebd7e93e0..6b458adf58 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -1002,3 +1002,18 @@ calendar_config_add_notification_day_second_zone (GConfClientNotifyFunc func, gp return id; } + +/* default count for recurring events */ +gint +calendar_config_get_default_count (void) +{ + gint res; + + calendar_config_init (); + + res = gconf_client_get_int (config, CALENDAR_CONFIG_DEF_RECUR_COUNT, NULL); + if (res <= 0) + res = 2; + + return res; +} diff --git a/calendar/gui/calendar-config.h b/calendar/gui/calendar-config.h index d0b2598892..950cb50862 100644 --- a/calendar/gui/calendar-config.h +++ b/calendar/gui/calendar-config.h @@ -181,4 +181,7 @@ gboolean calendar_config_get_month_scroll_by_week (void); void calendar_config_set_month_scroll_by_week (gboolean value); guint calendar_config_add_notification_month_scroll_by_week (GConfClientNotifyFunc func, gpointer data); +/* default count for recurring events */ +gint calendar_config_get_default_count (void); + #endif /* _CALENDAR_CONFIG_H_ */ diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index bd9152afc7..272be77cd9 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -431,7 +431,7 @@ clear_widgets (RecurrencePage *rpage) g_signal_handlers_unblock_matched (priv->interval_unit_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); priv->ending_date_tt = icaltime_today (); - priv->ending_count = 1; + priv->ending_count = calendar_config_get_default_count (); g_signal_handlers_block_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage); e_dialog_combo_box_set (priv->ending_combo, |