diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-06 04:09:48 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:09 +0800 |
commit | 62813b1e79b9b38df783f481e8dd1bdc54dbc779 (patch) | |
tree | bc5e4449b168f927e1581a9ed77bc81ddc22586e | |
parent | ebf7390977a456a303e5a599e4a34755a42a4490 (diff) | |
download | gsoc2013-evolution-62813b1e79b9b38df783f481e8dd1bdc54dbc779.tar.gz gsoc2013-evolution-62813b1e79b9b38df783f481e8dd1bdc54dbc779.tar.zst gsoc2013-evolution-62813b1e79b9b38df783f481e8dd1bdc54dbc779.zip |
EMFolderTreeModel: Use the new folder URI format.
Disregard CamelFolderInfo.uri strings.
-rw-r--r-- | mail/em-folder-tree-model.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index e3d3ba10f2..0f41d5f41d 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -650,6 +650,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, const gchar *icon_name; guint32 flags, add_flags = 0; EMEventTargetCustomIcon *target; + gchar *uri; /* Make sure we don't already know about it. */ if (g_hash_table_lookup (si->full_hash, fi->full_name)) @@ -669,8 +670,11 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, path_row = gtk_tree_row_reference_copy (uri_row); gtk_tree_path_free (path); + uri = e_mail_folder_uri_build (si->store, fi->full_name); + + /* Hash table takes ownership of the URI string. */ g_hash_table_insert ( - model->priv->uri_index, g_strdup (fi->uri), uri_row); + model->priv->uri_index, uri, uri_row); g_hash_table_insert ( si->full_hash, g_strdup (fi->full_name), path_row); @@ -681,7 +685,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, * be functionised. */ unread = fi->unread; if (mail_folder_cache_get_folder_from_uri ( - folder_cache, fi->uri, &folder) && folder) { + folder_cache, uri, &folder) && folder) { is_drafts = em_utils_folder_is_drafts (folder); if (is_drafts || em_utils_folder_is_outbox (folder)) { @@ -727,13 +731,13 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, if (si->account && (flags & CAMEL_FOLDER_TYPE_MASK) == 0) { if (!is_drafts && si->account->drafts_folder_uri) { is_drafts = e_mail_folder_uri_equal ( - CAMEL_SESSION (session), fi->uri, + CAMEL_SESSION (session), uri, si->account->drafts_folder_uri); } if (si->account->sent_folder_uri) { if (e_mail_folder_uri_equal ( - CAMEL_SESSION (session), fi->uri, + CAMEL_SESSION (session), uri, si->account->sent_folder_uri)) { add_flags = CAMEL_FOLDER_TYPE_SENT; } @@ -756,7 +760,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, COL_POINTER_CAMEL_STORE, si->store, COL_STRING_FULL_NAME, fi->full_name, COL_STRING_ICON_NAME, icon_name, - COL_STRING_URI, fi->uri, + COL_STRING_URI, uri, COL_UINT_FLAGS, flags, COL_BOOL_IS_STORE, FALSE, COL_BOOL_IS_FOLDER, TRUE, |