aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-selection-button.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2007-11-23 17:42:41 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-11-23 17:42:41 +0800
commit906aa2cf6afa48c8431c62c0e9632434d6776086 (patch)
tree10818b60a4997687e05cba2342d31cab800dcf00 /mail/em-folder-selection-button.c
parent614642401ca9368814f29978dbbbda988d6df18c (diff)
downloadgsoc2013-evolution-906aa2cf6afa48c8431c62c0e9632434d6776086.tar.gz
gsoc2013-evolution-906aa2cf6afa48c8431c62c0e9632434d6776086.tar.zst
gsoc2013-evolution-906aa2cf6afa48c8431c62c0e9632434d6776086.zip
** Fix for bug #494414
2007-11-23 Milan Crha <mcrha@redhat.com> ** Fix for bug #494414 * em-folder-selection-button.c: (set_contents): If used uri points to an account, then prepend account's name to folder name. svn path=/trunk/; revision=34574
Diffstat (limited to 'mail/em-folder-selection-button.c')
-rw-r--r--mail/em-folder-selection-button.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index 1a6406943f..a88095082d 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -34,6 +34,7 @@
#include <glib/gi18n.h>
#include "mail-component.h"
+#include "mail-config.h"
#include "em-folder-tree.h"
#include "em-folder-selector.h"
#include "em-utils.h"
@@ -130,7 +131,16 @@ set_contents (EMFolderSelectionButton *button)
char *folder_name = em_utils_folder_name_from_uri (priv->uri);
if (folder_name) {
- gtk_label_set_text (GTK_LABEL (priv->label), _(folder_name));
+ EAccount *account = mail_config_get_account_by_source_url (priv->uri);
+
+ if (account) {
+ char *tmp = folder_name;
+ folder_name = g_strdup_printf ("%s/%s", e_account_get_string (account, E_ACCOUNT_NAME), _(folder_name));
+ g_free (tmp);
+ gtk_label_set_text (GTK_LABEL (priv->label), folder_name);
+ } else
+ gtk_label_set_text (GTK_LABEL (priv->label), _(folder_name));
+
g_free (folder_name);
} else {
set_contents_unselected (button);