aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-07-29 01:56:11 +0800
committerMilan Crha <mcrha@redhat.com>2009-07-29 01:57:34 +0800
commit135b14779eed39d6f4373212ba6ebf0683e5a6dc (patch)
tree3e8547cbb1c7fa15b5c42ae712620c3fe24c12c7
parentb4ede9dea9df3e698536f224c6c3e515ab63fc24 (diff)
downloadgsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar.gz
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar.bz2
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar.lz
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar.xz
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.tar.zst
gsoc2013-evolution-135b14779eed39d6f4373212ba6ebf0683e5a6dc.zip
Bug #314599 - Recurrence Tab Should Not Default To Forever
-rw-r--r--calendar/gui/calendar-config-keys.h3
-rw-r--r--calendar/gui/calendar-config.c15
-rw-r--r--calendar/gui/calendar-config.h3
-rw-r--r--calendar/gui/dialogs/recurrence-page.c2
4 files changed, 22 insertions, 1 deletions
diff --git a/calendar/gui/calendar-config-keys.h b/calendar/gui/calendar-config-keys.h
index 9b2bd1c644..deac5d595c 100644
--- a/calendar/gui/calendar-config-keys.h
+++ b/calendar/gui/calendar-config-keys.h
@@ -100,6 +100,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 f1730d5bc7..86c771ff3e 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -1721,3 +1721,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 a009ed73d7..bbee7e6da1 100644
--- a/calendar/gui/calendar-config.h
+++ b/calendar/gui/calendar-config.h
@@ -277,4 +277,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 092a44db15..4b28856e82 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -437,7 +437,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,