aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-25 21:00:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-09-01 20:06:32 +0800
commitd89e767a1cde7b3349182e713085241e58a30fe8 (patch)
tree2c054ebfdc252d71a774b6be11fdaa2a5ee64494 /mail
parentcaff4060d5542aec79b8e27d0a35f8097c5fdfc0 (diff)
downloadgsoc2013-evolution-d89e767a1cde7b3349182e713085241e58a30fe8.tar.gz
gsoc2013-evolution-d89e767a1cde7b3349182e713085241e58a30fe8.tar.zst
gsoc2013-evolution-d89e767a1cde7b3349182e713085241e58a30fe8.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index ae6aebba9a..5eb408105b 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -562,6 +562,7 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
ESource *source = E_SOURCE (link->data);
ESourceExtension *extension;
const gchar *drafts_folder_uri;
+ gboolean need_update;
extension = e_source_get_extension (source, extension_name);
@@ -569,7 +570,11 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
e_source_mail_composition_get_drafts_folder (
E_SOURCE_MAIL_COMPOSITION (extension));
- if (class->equal_folder_name (drafts_folder_uri, old_uri)) {
+ need_update =
+ (drafts_folder_uri != NULL) &&
+ class->equal_folder_name (drafts_folder_uri, old_uri);
+
+ if (need_update) {
GError *error = NULL;
e_source_mail_composition_set_drafts_folder (
@@ -593,6 +598,7 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
ESource *source = E_SOURCE (link->data);
ESourceExtension *extension;
const gchar *sent_folder_uri;
+ gboolean need_update;
extension = e_source_get_extension (source, extension_name);
@@ -600,7 +606,11 @@ mail_backend_folder_renamed_cb (MailFolderCache *folder_cache,
e_source_mail_submission_get_sent_folder (
E_SOURCE_MAIL_SUBMISSION (extension));
- if (sent_folder_uri && class->equal_folder_name (sent_folder_uri, old_uri)) {
+ need_update =
+ (sent_folder_uri != NULL) &&
+ class->equal_folder_name (sent_folder_uri, old_uri);
+
+ if (need_update) {
GError *error = NULL;
e_source_mail_submission_set_sent_folder (