From 4660d0fcad7ca0e6ad74241d3133a37b82e4e9de Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 7 May 2011 10:29:37 -0400 Subject: Adapt to CamelFolderInfo.name -> display_name. --- mail/em-folder-tree-model.c | 27 ++++++++++++++------------- mail/em-subscription-editor.c | 2 +- mail/mail-vfolder.c | 4 +++- 3 files changed, 18 insertions(+), 15 deletions(-) (limited to 'mail') diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 0f41d5f41d..72cd4ccf70 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -646,8 +646,8 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, gboolean is_templates = FALSE; CamelFolder *folder; gboolean emitted = FALSE; - const gchar *name; const gchar *icon_name; + const gchar *display_name; guint32 flags, add_flags = 0; EMEventTargetCustomIcon *target; gchar *uri; @@ -705,26 +705,27 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, } flags = fi->flags; - name = fi->name; + display_name = fi->display_name; + if (si->store == e_mail_local_get_store ()) { - if (!strcmp(fi->full_name, "Drafts")) { - name = _("Drafts"); + if (strcmp (fi->full_name, "Drafts") == 0) { is_drafts = TRUE; - } else if (!strcmp(fi->full_name, "Templates")) { - name = _("Templates"); + display_name = _("Drafts"); + } else if (strcmp (fi->full_name, "Templates") == 0) { is_templates = TRUE; - } else if (!strcmp(fi->full_name, "Inbox")) { + display_name = _("Templates"); + } else if (strcmp (fi->full_name, "Inbox") == 0) { flags = (flags & ~CAMEL_FOLDER_TYPE_MASK) | CAMEL_FOLDER_TYPE_INBOX; - name = _("Inbox"); - } else if (!strcmp(fi->full_name, "Outbox")) { + display_name = _("Inbox"); + } else if (strcmp (fi->full_name, "Outbox") == 0) { flags = (flags & ~CAMEL_FOLDER_TYPE_MASK) | CAMEL_FOLDER_TYPE_OUTBOX; - name = _("Outbox"); - } else if (!strcmp(fi->full_name, "Sent")) { - name = _("Sent"); + display_name = _("Outbox"); + } else if (strcmp (fi->full_name, "Sent") == 0) { flags = (flags & ~CAMEL_FOLDER_TYPE_MASK) | CAMEL_FOLDER_TYPE_SENT; + display_name = _("Sent"); } } @@ -756,7 +757,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, gtk_tree_store_set ( tree_store, iter, - COL_STRING_DISPLAY_NAME, name, + COL_STRING_DISPLAY_NAME, display_name, COL_POINTER_CAMEL_STORE, si->store, COL_STRING_FULL_NAME, fi->full_name, COL_STRING_ICON_NAME, icon_name, diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c index 368abcbe50..d2027dc01b 100644 --- a/mail/em-subscription-editor.c +++ b/mail/em-subscription-editor.c @@ -178,7 +178,7 @@ subscription_editor_populate (EMSubscriptionEditor *editor, tree_store, &iter, COL_CASEFOLDED, NULL, /* not needed */ COL_FOLDER_ICON, icon_name, - COL_FOLDER_NAME, folder_info->name, + COL_FOLDER_NAME, folder_info->display_name, COL_FOLDER_INFO, folder_info, -1); if (FOLDER_SUBSCRIBED (folder_info)) { diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 082c8427ca..b867bf485b 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -945,7 +945,9 @@ store_folder_deleted_cb (CamelStore *store, e_rule_context_save ((ERuleContext *)context, user); g_free (user); } else { - g_warning("Cannot find rule for deleted vfolder '%s'", info->name); + g_warning ( + "Cannot find rule for deleted vfolder '%s'", + info->display_name); } G_UNLOCK (vfolder); -- cgit v1.2.3