aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt McCutchen <matt@mattmccutchen.net>2010-04-07 16:19:32 +0800
committerMilan Crha <mcrha@redhat.com>2010-04-07 16:19:32 +0800
commit09390f2a916e7b89aa8af579002471ffa48021b5 (patch)
tree57c488011d0d57c2e152025dfa0256b73d01bdb3
parent879b8753ff91abec1d47da262582dc6ad8c73c49 (diff)
downloadgsoc2013-evolution-09390f2a916e7b89aa8af579002471ffa48021b5.tar.gz
gsoc2013-evolution-09390f2a916e7b89aa8af579002471ffa48021b5.tar.zst
gsoc2013-evolution-09390f2a916e7b89aa8af579002471ffa48021b5.zip
Bug #614647 - Don't reset names and colors of default mail labels
-rw-r--r--mail/e-mail-label-list-store.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index bad13c99fd..6930e210aa 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -96,17 +96,15 @@ mail_label_list_store_ensure_defaults (EMailLabelListStore *store)
label_color = label_defaults[ii].label_color;
label_tag = label_defaults[ii].label_tag;
+ if (e_mail_label_list_store_lookup (store, label_tag, &iter))
+ continue;
+
encoded = mail_label_list_store_encode_label (
label_name, label_color, label_tag);
- if (e_mail_label_list_store_lookup (store, label_tag, &iter))
- gtk_list_store_set (
- GTK_LIST_STORE (store),
- &iter, 0, encoded, -1);
- else
- gtk_list_store_insert_with_values (
- GTK_LIST_STORE (store),
- NULL, -1, 0, encoded, -1);
+ gtk_list_store_insert_with_values (
+ GTK_LIST_STORE (store),
+ NULL, -1, 0, encoded, -1);
g_free (encoded);
}