aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-12-07 20:22:58 +0800
committerMilan Crha <mcrha@redhat.com>2011-12-07 20:22:58 +0800
commit16efd93e3d26759add0f30d4e33eb21094b29aa8 (patch)
tree8d22fbafd9b0765a83126eabbb579a5fb723d5f2 /calendar
parentfc359659ae7d14b337eca2f69197f3ff3d688373 (diff)
downloadgsoc2013-evolution-16efd93e3d26759add0f30d4e33eb21094b29aa8.tar.gz
gsoc2013-evolution-16efd93e3d26759add0f30d4e33eb21094b29aa8.tar.zst
gsoc2013-evolution-16efd93e3d26759add0f30d4e33eb21094b29aa8.zip
Bug #577322 - Rename of a system ESource doesn't persist
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/calendar-setup.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c
index 0ffdb4cf1f..8aa82c29e5 100644
--- a/calendar/gui/dialogs/calendar-setup.c
+++ b/calendar/gui/dialogs/calendar-setup.c
@@ -224,7 +224,21 @@ name_changed (GtkEntry *entry,
ECalConfigTargetSource *t)
{
ESource *source = t->source;
- e_source_set_name (source, gtk_entry_get_text (GTK_ENTRY (entry)));
+ ESourceGroup *group;
+ gboolean is_birthdays = FALSE;
+ gboolean changed;
+ const gchar *name;
+
+ name = gtk_entry_get_text (GTK_ENTRY (entry));
+
+ changed = g_strcmp0 (name, e_source_peek_name (source)) != 0;
+ e_source_set_name (source, name);
+
+ group = e_source_peek_group (source);
+ is_birthdays = group && g_strcmp0 (e_source_group_peek_base_uri (group), "contacts://") == 0;
+
+ if (changed && (g_strcmp0 ("system", e_source_peek_relative_uri (source)) == 0 || is_birthdays))
+ e_source_set_property (source, "name-changed", "true");
}
static GtkWidget *