aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
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 /modules/addressbook
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 'modules/addressbook')
-rw-r--r--modules/addressbook/addressbook-config.c5
-rw-r--r--modules/addressbook/e-book-shell-backend.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index e3120246b3..028b7508c7 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -564,12 +564,17 @@ name_changed_cb (GtkWidget *w,
{
const gchar *text;
gchar *stripped_name;
+ gboolean changed;
text = gtk_entry_get_text (GTK_ENTRY (sdialog->display_name));
stripped_name = g_strstrip (g_strdup (text));
+ changed = g_strcmp0 (stripped_name, e_source_peek_name (sdialog->source)) != 0;
e_source_set_name (sdialog->source, stripped_name);
g_free (stripped_name);
+
+ if (changed && g_strcmp0 ("system", e_source_peek_relative_uri (sdialog->source)) == 0)
+ e_source_set_property (sdialog->source, "name-changed", "true");
}
static GtkWidget *
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index 8ea434d344..ea65ce360f 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -128,7 +128,7 @@ book_shell_backend_ensure_sources (EShellBackend *shell_backend)
e_source_set_property (source, "completion", "true");
g_object_unref (source);
e_source_list_sync (priv->source_list, NULL);
- } else {
+ } else if (!e_source_get_property (personal, "name-changed")) {
/* Force the source name to the current locale. */
e_source_set_name (personal, name);
e_source_list_sync (priv->source_list, NULL);