[evolution-data-server] Camel: Use folder display name is status messages when possible.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Camel: Use folder display name is status messages when possible.
- Date: Sun, 8 Jul 2012 19:58:12 +0000 (UTC)
commit ce9e529a99d60ffb659f7289afaccdcc55ca57ff
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Jul 8 15:56:22 2012 -0400
Camel: Use folder display name is status messages when possible.
And also put the folder name in quotes.
camel/camel-disco-folder.c | 8 ++++--
camel/camel-folder.c | 20 ++++++++-------
camel/camel-imapx-server.c | 55 +++++++++++++++++++++++-------------------
camel/camel-offline-folder.c | 8 ++++--
camel/camel-vee-folder.c | 7 +++--
5 files changed, 55 insertions(+), 43 deletions(-)
---
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
index 11798d7..9f54f68 100644
--- a/camel/camel-disco-folder.c
+++ b/camel/camel-disco-folder.c
@@ -409,12 +409,14 @@ disco_prepare_for_offline (CamelDiscoFolder *disco_folder,
{
CamelFolder *folder = CAMEL_FOLDER (disco_folder);
GPtrArray *uids;
+ const gchar *display_name;
+ const gchar *message;
gint i;
gboolean success = TRUE;
- camel_operation_push_message (
- cancellable, _("Preparing folder '%s' for offline"),
- camel_folder_get_full_name (folder));
+ message = _("Preparing folder '%s' for offline");
+ display_name = camel_folder_get_display_name (folder);
+ camel_operation_push_message (cancellable, message, display_name);
if (expression)
uids = camel_folder_search_by_expression (folder, expression, cancellable, error);
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 44fbff9..4fbec65 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -250,9 +250,9 @@ folder_filter (CamelSession *session,
gint i, status = 0;
CamelJunkFilter *junk_filter;
gboolean synchronize = FALSE;
- const gchar *full_name;
+ const gchar *display_name;
- full_name = camel_folder_get_full_name (data->folder);
+ display_name = camel_folder_get_display_name (data->folder);
parent_store = camel_folder_get_parent_store (data->folder);
junk_filter = camel_session_get_junk_filter (session);
@@ -269,7 +269,7 @@ folder_filter (CamelSession *session,
cancellable, ngettext (
"Learning new spam message in '%s'",
"Learning new spam messages in '%s'",
- data->junk->len), full_name);
+ data->junk->len), display_name);
for (i = 0; success && i < data->junk->len; i++) {
CamelMimeMessage *message;
@@ -309,7 +309,7 @@ folder_filter (CamelSession *session,
cancellable, ngettext (
"Learning new ham message in '%s'",
"Learning new ham messages in '%s'",
- data->notjunk->len), full_name);
+ data->notjunk->len), display_name);
for (i = 0; success && i < data->notjunk->len; i++) {
CamelMimeMessage *message;
@@ -357,7 +357,7 @@ folder_filter (CamelSession *session,
cancellable, ngettext (
"Filtering new message in '%s'",
"Filtering new messages in '%s'",
- data->recents->len), full_name);
+ data->recents->len), display_name);
service = CAMEL_SERVICE (parent_store);
store_uid = camel_service_get_uid (service);
@@ -373,7 +373,7 @@ folder_filter (CamelSession *session,
if (info == NULL) {
g_warning (
"uid '%s' vanished from folder '%s'",
- uid, full_name);
+ uid, display_name);
continue;
}
@@ -3742,15 +3742,17 @@ camel_folder_get_quota_info_sync (CamelFolder *folder,
{
CamelFolderClass *class;
CamelFolderQuotaInfo *quota_info;
+ const gchar *display_name;
+ const gchar *message;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->get_quota_info_sync != NULL, NULL);
- camel_operation_push_message (
- cancellable, _("Retrieving quota information for '%s'"),
- camel_folder_get_display_name (folder));
+ message = _("Retrieving quota information for '%s'");
+ display_name = camel_folder_get_display_name (folder);
+ camel_operation_push_message (cancellable, message, display_name);
quota_info = class->get_quota_info_sync (folder, cancellable, error);
CAMEL_CHECK_GERROR (
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 6db6635..a9a52ae 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -4414,7 +4414,7 @@ imapx_job_scan_changes_done (CamelIMAPXServer *is,
camel_operation_push_message (
job->cancellable,
- _("Fetching summary information for new messages in %s"),
+ _("Fetching summary information for new messages in '%s'"),
camel_folder_get_display_name (job->folder));
imapx_uidset_init (&data->uidset, uidset_size, 0);
@@ -4473,7 +4473,7 @@ imapx_job_scan_changes_start (CamelIMAPXJob *job,
camel_operation_push_message (
job->cancellable,
- _("Scanning for changed messages in %s"),
+ _("Scanning for changed messages in '%s'"),
camel_folder_get_display_name (job->folder));
e('E', "Scanning from %s in %s\n", uid ? uid : "start",
@@ -4619,7 +4619,7 @@ imapx_job_fetch_new_messages_start (CamelIMAPXJob *job,
camel_operation_push_message (
job->cancellable,
- _("Fetching summary information for new messages in %s"),
+ _("Fetching summary information for new messages in '%s'"),
camel_folder_get_display_name (folder));
//printf("Fetch order: %d/%d\n", fetch_order, CAMEL_SORT_DESCENDING);
@@ -4721,10 +4721,13 @@ imapx_job_fetch_messages_start (CamelIMAPXJob *job,
}
camel_operation_push_message (
- job->cancellable,
- ngettext ("Fetching summary information for %d message in %s",
- "Fetching summary information for %d messages in %s", data->fetch_msg_limit),
- data->fetch_msg_limit, camel_folder_get_full_name (folder));
+ job->cancellable, ngettext (
+ "Fetching summary information for %d message in '%s'",
+ "Fetching summary information for %d messages in '%s'",
+ data->fetch_msg_limit),
+ data->fetch_msg_limit,
+ camel_folder_get_display_name (folder));
+
/* New account and fetching old messages, we would return just the limited number of newest messages */
ic = camel_imapx_command_new (
is, "FETCH", job->folder,
@@ -4747,27 +4750,29 @@ imapx_job_fetch_messages_start (CamelIMAPXJob *job,
imapx_command_queue (is, ic);
} else if (ftype == CAMEL_FETCH_OLD_MESSAGES && total > 0) {
- guint64 uidl;
- start_uid = imapx_get_uid_from_index (folder->summary, 0);
- uidl = strtoull (start_uid, NULL, 10);
- end_uid = g_strdup_printf ("%" G_GINT64_MODIFIER "d", (((int)uidl)-fetch_limit > 0) ? (uidl-fetch_limit) : 1);
-
- camel_operation_push_message (
- job->cancellable,
- ngettext ("Fetching summary information for %d message in %s",
- "Fetching summary information for %d messages in %s", data->fetch_msg_limit),
- data->fetch_msg_limit, camel_folder_get_full_name (folder));
+ guint64 uidl;
+ start_uid = imapx_get_uid_from_index (folder->summary, 0);
+ uidl = strtoull (start_uid, NULL, 10);
+ end_uid = g_strdup_printf ("%" G_GINT64_MODIFIER "d", (((int)uidl)-fetch_limit > 0) ? (uidl-fetch_limit) : 1);
- ic = camel_imapx_command_new (is, "FETCH", job->folder,
- "UID FETCH %s:%s (RFC822.SIZE RFC822.HEADER FLAGS)", start_uid, end_uid);
- ic->pri = job->pri;
- ic->complete = imapx_command_fetch_new_messages_done;
+ camel_operation_push_message (
+ job->cancellable, ngettext (
+ "Fetching summary information for %d message in '%s'",
+ "Fetching summary information for %d messages in '%s'",
+ data->fetch_msg_limit),
+ data->fetch_msg_limit,
+ camel_folder_get_display_name (folder));
+
+ ic = camel_imapx_command_new (is, "FETCH", job->folder,
+ "UID FETCH %s:%s (RFC822.SIZE RFC822.HEADER FLAGS)", start_uid, end_uid);
+ ic->pri = job->pri;
+ ic->complete = imapx_command_fetch_new_messages_done;
- g_free (start_uid);
- g_free (end_uid);
+ g_free (start_uid);
+ g_free (end_uid);
- camel_imapx_command_set_job (ic, job);
- imapx_command_queue (is, ic);
+ camel_imapx_command_set_job (ic, job);
+ imapx_command_queue (is, ic);
} else {
g_error ("Shouldn't reach here. Incorrect fetch type");
diff --git a/camel/camel-offline-folder.c b/camel/camel-offline-folder.c
index 178616d..e092117 100644
--- a/camel/camel-offline-folder.c
+++ b/camel/camel-offline-folder.c
@@ -200,11 +200,13 @@ offline_folder_downsync_sync (CamelOfflineFolder *offline,
{
CamelFolder *folder = (CamelFolder *) offline;
GPtrArray *uids, *uncached_uids = NULL;
+ const gchar *display_name;
+ const gchar *message;
gint i;
- camel_operation_push_message (
- cancellable, _("Syncing messages in folder '%s' to disk"),
- camel_folder_get_full_name (folder));
+ message = _("Syncing messages in folder '%s' to disk");
+ display_name = camel_folder_get_display_name (folder);
+ camel_operation_push_message (cancellable, message, display_name);
if (expression)
uids = camel_folder_search_by_expression (folder, expression, cancellable, NULL);
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index a8a5d91..c46cea0 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -475,14 +475,15 @@ vee_folder_process_changes (CamelSession *session,
FolderChangedData *data;
GAsyncQueue *change_queue;
const gchar *display_name;
+ const gchar *message;
folder = CAMEL_FOLDER (vee_folder);
- display_name = camel_folder_get_display_name (folder);
change_queue = vee_folder->priv->change_queue;
- camel_operation_push_message (
- cancellable, _("Updating %s folder"), display_name);
+ message = _("Updating folder '%s'");
+ display_name = camel_folder_get_display_name (folder);
+ camel_operation_push_message (cancellable, message, display_name);
while ((data = g_async_queue_try_pop (change_queue)) != NULL) {
vee_folder_subfolder_changed (vee_folder, data->subfolder, data->changes, cancellable, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]