aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-filter-source-element.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-08-31 07:05:30 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-31 08:35:11 +0800
commitf67a5f3d42aa9d743e6b78ace26a6ed1dbdc43e7 (patch)
tree98d3c6e13879d356ed0a4236ed9d2f5d48627980 /mail/em-filter-source-element.c
parent60383e0427e57bfb5e2fb836b450ec7cf9717b5f (diff)
downloadgsoc2013-evolution-f67a5f3d42aa9d743e6b78ace26a6ed1dbdc43e7.tar.gz
gsoc2013-evolution-f67a5f3d42aa9d743e6b78ace26a6ed1dbdc43e7.tar.zst
gsoc2013-evolution-f67a5f3d42aa9d743e6b78ace26a6ed1dbdc43e7.zip
Miscellaneous cleanups.
Reducing diff noise with the account-mgmt branch. Trying to erode our dependency on EAccount as much as possible, or at least isolate its usage, to make things easier for me on the branch.
Diffstat (limited to 'mail/em-filter-source-element.c')
-rw-r--r--mail/em-filter-source-element.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c
index fe64a7a6c8..b95c140c58 100644
--- a/mail/em-filter-source-element.c
+++ b/mail/em-filter-source-element.c
@@ -31,11 +31,11 @@
#include <gtk/gtk.h>
#include <camel/camel.h>
+
#include <libedataserver/e-sexp.h>
#include <e-util/e-account-utils.h>
-
-#include "filter/e-filter-part.h"
+#include <filter/e-filter-part.h>
#define EM_FILTER_SOURCE_ELEMENT_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -343,18 +343,28 @@ filter_source_element_get_widget (EFilterElement *fe)
for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) {
SourceInfo *info = (SourceInfo *) i->data;
+ const gchar *display_name;
+ const gchar *address;
+ const gchar *name;
+ const gchar *uid;
gchar *label;
- if (g_strcmp0 (info->account_name, info->address) == 0)
+ uid = info->uid;
+ display_name = info->account_name;
+
+ name = info->name;
+ address = info->address;
+
+ if (g_strcmp0 (display_name, address) == 0)
label = g_strdup_printf (
- "%s <%s>", info->name, info->address);
+ "%s <%s>", name, address);
else
label = g_strdup_printf (
- "%s <%s> (%s)", info->name,
- info->address, info->account_name);
+ "%s <%s> (%s)", name,
+ address, display_name);
gtk_combo_box_text_append (
- GTK_COMBO_BOX_TEXT (combo_box), info->uid, label);
+ GTK_COMBO_BOX_TEXT (combo_box), uid, label);
g_free (label);
}