aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view-private.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-26 20:36:24 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-30 23:30:19 +0800
commitaec33928b7b77fe64b0afdf13b5db126e7f5dfac (patch)
tree04236fce76b859c96dc977741106aa06e28aa977 /modules/mail/e-mail-shell-view-private.c
parent2214b6049d9402f91567d1bea66259b29993ae9f (diff)
downloadgsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.gz
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.tar.zst
gsoc2013-evolution-aec33928b7b77fe64b0afdf13b5db126e7f5dfac.zip
Adapt to Camel API changes.
Diffstat (limited to 'modules/mail/e-mail-shell-view-private.c')
-rw-r--r--modules/mail/e-mail-shell-view-private.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 5c60071d15..8a45c4b853 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -821,12 +821,13 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
EShellView *shell_view;
EMailReader *reader;
CamelStore *local_store;
+ CamelStore *parent_store;
CamelFolder *folder;
GPtrArray *uids;
GString *buffer;
const gchar *display_name;
+ const gchar *folder_name;
const gchar *folder_uri;
- gchar *folder_name;
gchar *title;
guint32 num_deleted;
guint32 num_junked;
@@ -863,15 +864,14 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
return;
}
- camel_object_get (
- folder, NULL,
- CAMEL_FOLDER_NAME, &folder_name,
- CAMEL_FOLDER_DELETED, &num_deleted,
- CAMEL_FOLDER_JUNKED, &num_junked,
- CAMEL_FOLDER_JUNKED_NOT_DELETED, &num_junked_not_deleted,
- CAMEL_FOLDER_UNREAD, &num_unread,
- CAMEL_FOLDER_VISIBLE, &num_visible,
- NULL);
+ folder_name = camel_folder_get_name (folder);
+ parent_store = camel_folder_get_parent_store (folder);
+
+ num_deleted = folder->summary->deleted_count;
+ num_junked = folder->summary->junk_count;
+ num_junked_not_deleted = folder->summary->junk_not_deleted_count;
+ num_unread = folder->summary->unread_count;
+ num_visible = folder->summary->visible_count;
buffer = g_string_sized_new (256);
uids = e_mail_reader_get_selected_uids (reader);
@@ -942,7 +942,7 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
em_utils_uids_free (uids);
/* Choose a suitable folder name for displaying. */
- if (folder->parent_store == local_store && (
+ if (parent_store == local_store && (
strcmp (folder_name, "Drafts") == 0 ||
strcmp (folder_name, "Inbox") == 0 ||
strcmp (folder_name, "Outbox") == 0 ||
@@ -959,6 +959,5 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
e_shell_view_set_title (shell_view, title);
g_free (title);
- camel_object_free (folder, CAMEL_FOLDER_NAME, folder_name);
g_string_free (buffer, TRUE);
}