[evolution/wip/gsettings] EMFolderTreeModel: Always populate the CamelStore column.



commit f904b972f1b4540a55d2045c122f252f16092c9a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu May 5 14:18:38 2011 -0400

    EMFolderTreeModel: Always populate the CamelStore column.
    
    Even in 'Loading...' rows.  This way we know the CamelStore is present
    in all rows, and don't have to test for NULL.

 mail/em-folder-tree-model.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index c9a020e..25d3d99 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -783,7 +783,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model,
 		gtk_tree_store_set (
 			tree_store, &sub,
 			COL_STRING_DISPLAY_NAME, _("Loading..."),
-			COL_POINTER_CAMEL_STORE, NULL,
+			COL_POINTER_CAMEL_STORE, si->store,
 			COL_STRING_FULL_NAME, NULL,
 			COL_STRING_ICON_NAME, NULL,
 			COL_BOOL_LOAD_SUBDIRS, FALSE,
@@ -1038,8 +1038,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model,
 
 	si = g_new (EMFolderTreeModelStoreInfo, 1);
 	si->display_name = g_strdup (display_name);
-	g_object_ref (store);
-	si->store = store;
+	si->store = g_object_ref (store);
 	si->account = account;
 	si->row = gtk_tree_row_reference_copy (reference);
 	si->full_hash = g_hash_table_new_full (
@@ -1059,7 +1058,7 @@ em_folder_tree_model_add_store (EMFolderTreeModel *model,
 	gtk_tree_store_set (
 		tree_store, &iter,
 		COL_STRING_DISPLAY_NAME, _("Loading..."),
-		COL_POINTER_CAMEL_STORE, NULL,
+		COL_POINTER_CAMEL_STORE, store,
 		COL_STRING_FULL_NAME, NULL,
 		COL_BOOL_LOAD_SUBDIRS, FALSE,
 		COL_BOOL_IS_STORE, FALSE,



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