aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-vfolder-rule.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-29 23:50:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-30 09:22:57 +0800
commit21ab8044dab93b6367463593628ec42befda4f67 (patch)
tree50948c4b0675041b615b5113d7b9176f2d71db99 /mail/em-vfolder-rule.c
parent8fade835168c511a89813019aef6d0ee02d63b5d (diff)
downloadgsoc2013-evolution-21ab8044dab93b6367463593628ec42befda4f67.tar.gz
gsoc2013-evolution-21ab8044dab93b6367463593628ec42befda4f67.tar.zst
gsoc2013-evolution-21ab8044dab93b6367463593628ec42befda4f67.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail/em-vfolder-rule.c')
-rw-r--r--mail/em-vfolder-rule.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 1bb7830aec..088c6c761f 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -79,8 +79,17 @@ static void
vfolder_rule_set_session (EMVFolderRule *rule,
EMailSession *session)
{
- if (!session)
- session = e_mail_backend_get_session (E_MAIL_BACKEND (e_shell_get_backend_by_name (e_shell_get_default(), "mail")));
+ if (session == NULL) {
+ EShell *shell;
+ EShellBackend *shell_backend;
+ EMailBackend *backend;
+
+ shell = e_shell_get_default ();
+ shell_backend = e_shell_get_backend_by_name (shell, "mail");
+
+ backend = E_MAIL_BACKEND (shell_backend);
+ session = e_mail_backend_get_session (backend);
+ }
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_return_if_fail (rule->priv->session == NULL);
@@ -376,7 +385,8 @@ xml_decode (EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f)
EMVFolderRule *vr =(EMVFolderRule *)fr;
gchar *tmp;
- result = E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)->xml_decode (fr, node, f);
+ result = E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)->
+ xml_decode (fr, node, f);
if (result != 0)
return result;
@@ -668,7 +678,8 @@ get_widget (EFilterRule *fr, ERuleContext *rc)
GObject *object;
gint i;
- widget = E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)->get_widget (fr, rc);
+ widget = E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)->
+ get_widget (fr, rc);
data = g_malloc0 (sizeof (*data));
data->rc = rc;