[evolution] Bug #614647 - Don't reset names and colors of default mail labels



commit 09390f2a916e7b89aa8af579002471ffa48021b5
Author: Matt McCutchen <matt mattmccutchen net>
Date:   Wed Apr 7 10:19:32 2010 +0200

    Bug #614647 - Don't reset names and colors of default mail labels

 mail/e-mail-label-list-store.c |   14 ++++++--------
 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 bad13c9..6930e21 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);
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]