[evolution] EMFolderTreeModel: Check for vfolder store by its UID.



commit 194ab4aebcca2958d1d9f794086fa997310a6c07
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Dec 7 10:57:35 2011 -0500

    EMFolderTreeModel: Check for vfolder store by its UID.

 mail/em-folder-tree-model.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index e63d362..27fa44a 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -93,8 +93,6 @@ enum {
 	LAST_SIGNAL
 };
 
-extern CamelStore *vfolder_store;
-
 static gpointer parent_class;
 static guint signals[LAST_SIGNAL];
 
@@ -129,6 +127,7 @@ folder_tree_model_sort (GtkTreeModel *model,
 	gchar *aname, *bname;
 	CamelStore *store;
 	gboolean is_store;
+	const gchar *store_uid = NULL;
 	guint32 aflags, bflags;
 	guint asortorder, bsortorder;
 	gint rv = -2;
@@ -153,6 +152,9 @@ folder_tree_model_sort (GtkTreeModel *model,
 		COL_UINT_SORTORDER, &bsortorder,
 		-1);
 
+	if (CAMEL_IS_SERVICE (store))
+		store_uid = camel_service_get_uid (CAMEL_SERVICE (store));
+
 	if (is_store) {
 		EShell *shell;
 		EShellBackend *shell_backend;
@@ -202,7 +204,7 @@ folder_tree_model_sort (GtkTreeModel *model,
 			else
 				rv = 0;
 		}
-	} else if (store == vfolder_store) {
+	} else if (g_strcmp0 (store_uid, "vfolder") == 0) {
 		/* UNMATCHED is always last. */
 		if (aname && !strcmp (aname, _("UNMATCHED")))
 			rv = 1;



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