[evolution] Bug #314599 - Recurrence Tab Should Not Default To Forever
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution] Bug #314599 - Recurrence Tab Should Not Default To Forever
- Date: Mon, 3 Aug 2009 11:34:30 +0000 (UTC)
commit 80374b7b6268707696124329c5e64e260e41c090
Author: Milan Crha <mcrha redhat com>
Date: Mon Aug 3 13:32:55 2009 +0200
Bug #314599 - Recurrence Tab Should Not Default To Forever
Added a GConf schema key definition.
Special value, -1, means forever.
calendar/gui/apps_evolution_calendar.schemas.in | 12 ++++++++++++
calendar/gui/calendar-config.c | 2 +-
calendar/gui/dialogs/recurrence-page.c | 4 +++-
3 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/calendar/gui/apps_evolution_calendar.schemas.in b/calendar/gui/apps_evolution_calendar.schemas.in
index 7a0ed9f..210a6fc 100644
--- a/calendar/gui/apps_evolution_calendar.schemas.in
+++ b/calendar/gui/apps_evolution_calendar.schemas.in
@@ -575,6 +575,18 @@
</schema>
<schema>
+ <key>/schemas/apps/evolution/calendar/other/def_recur_count</key>
+ <applyto>/apps/evolution/calendar/other/def_recur_count</applyto>
+ <owner>evolution-calendar</owner>
+ <type>int</type>
+ <default>2</default>
+ <locale name="C">
+ <short>Default recurrence count</short>
+ <long>Count of default recurrence for a new event. -1 means forever.</long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/apps/evolution/calendar/display/day_view_show_week_number</key>
<applyto>/apps/evolution/calendar/display/day_view_show_week_number</applyto>
<owner>evolution-calendar</owner>
diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c
index 2bc7357..9262836 100644
--- a/calendar/gui/calendar-config.c
+++ b/calendar/gui/calendar-config.c
@@ -1736,7 +1736,7 @@ calendar_config_get_default_count (void)
calendar_config_init ();
res = gconf_client_get_int (config, CALENDAR_CONFIG_DEF_RECUR_COUNT, NULL);
- if (res <= 0)
+ if (res <= 0 && res != -1)
res = 2;
return res;
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index bbc7caa..385b4ee 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -443,9 +443,11 @@ clear_widgets (RecurrencePage *rpage)
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,
- ENDING_FOR,
+ priv->ending_count == -1 ? ENDING_FOREVER : ENDING_FOR,
ending_types_map);
g_signal_handlers_unblock_matched (priv->ending_combo, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, rpage);
+ if (priv->ending_count == -1)
+ priv->ending_count = 2;
make_ending_special (rpage);
/* Exceptions list */
e_date_time_list_clear (priv->exception_list_store);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]