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
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:58 +0800
commitdb1a2dd8aad57fb222daa6f82838b33a26f8e742 (patch)
tree42d90c8e93a4cf035bb9c92de676ad8dcca36fe3 /mail/em-filter-source-element.c
parent629700ced0d5f84031e514cdb31cd97f985a2598 (diff)
downloadgsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.gz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.bz2
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.lz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.xz
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.tar.zst
gsoc2013-evolution-db1a2dd8aad57fb222daa6f82838b33a26f8e742.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);
}