aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mail')
-rw-r--r--modules/mail/e-mail-attachment-handler.c14
-rw-r--r--modules/mail/e-mail-shell-view-private.c23
-rw-r--r--modules/mail/e-mail-shell-view.c2
3 files changed, 14 insertions, 25 deletions
diff --git a/modules/mail/e-mail-attachment-handler.c b/modules/mail/e-mail-attachment-handler.c
index 790f4336a8..55de059d12 100644
--- a/modules/mail/e-mail-attachment-handler.c
+++ b/modules/mail/e-mail-attachment-handler.c
@@ -347,26 +347,16 @@ mail_attachment_handler_x_uid_list (EAttachmentView *view,
exit:
if (camel_exception_is_set (&ex)) {
- gchar *folder_name;
+ const gchar *folder_name = data;
if (folder != NULL)
- camel_object_get (
- folder, NULL, CAMEL_FOLDER_NAME,
- &folder_name, NULL);
- else
- folder_name = g_strdup (data);
+ folder_name = camel_folder_get_name (folder);
e_alert_run_dialog_for_args (
parent, "mail-composer:attach-nomessages",
folder_name, camel_exception_get_description (&ex),
NULL);
- if (folder != NULL)
- camel_object_free (
- folder, CAMEL_FOLDER_NAME, folder_name);
- else
- g_free (folder_name);
-
camel_exception_clear (&ex);
}
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);
}
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index acfcbdfb7d..e69ae55220 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -664,7 +664,7 @@ current_account:
/* Create a new search folder. */
- store = folder->parent_store;
+ store = camel_folder_get_parent_store (folder);
list = NULL; /* list of CamelFolders */
if (store->folders != NULL) {