From 8b23032f2fde03d2cde5cba32e8b4dbd53a05e49 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 5 May 2011 14:18:38 -0400 Subject: 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 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index c9a020e761..25d3d993e4 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, -- cgit