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



commit 98bec02d2b93bef702d3463bdf36ab3388ea8596
Author: Matt McCutchen <matt mattmccutchen net>
Date:   Wed Apr 7 10:21:08 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 ed0d4cd..6b317b6 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]