aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-06 05:25:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-06 05:25:08 +0800
commitee06c4a5e6bd4e7a683ae97f9b996360e362ba93 (patch)
treefb7d01726f032f357a40d26ed47c10fa28bbc194
parentb700aaf9aa14a2634f926f2385b1bc8d663bfd31 (diff)
downloadgsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar.gz
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar.bz2
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar.lz
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar.xz
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.tar.zst
gsoc2013-evolution-ee06c4a5e6bd4e7a683ae97f9b996360e362ba93.zip
mail-vfolder.c: Coding style cleanups.
-rw-r--r--mail/mail-vfolder.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c
index 9295f8b718..ede4f61546 100644
--- a/mail/mail-vfolder.c
+++ b/mail/mail-vfolder.c
@@ -339,7 +339,6 @@ mv_find_folder (GList *l, EMailSession *session, const gchar *uri)
return l;
}
-/* uri is a camel uri */
static gint
uri_is_ignore (EMailSession *session, const gchar *uri)
{
@@ -352,9 +351,12 @@ uri_is_ignore (EMailSession *session, const gchar *uri)
const gchar *local_sent_uri;
gint found = FALSE;
- local_drafts_uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_DRAFTS);
- local_outbox_uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_OUTBOX);
- local_sent_uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_SENT);
+ local_drafts_uri =
+ e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_DRAFTS);
+ local_outbox_uri =
+ e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_OUTBOX);
+ local_sent_uri =
+ e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_SENT);
camel_session = CAMEL_SESSION (session);
@@ -368,27 +370,21 @@ uri_is_ignore (EMailSession *session, const gchar *uri)
return TRUE;
accounts = e_get_account_list ();
- iter = e_list_get_iterator ((EList *) accounts);
- while (e_iterator_is_valid (iter)) {
- gchar *curi;
+ iter = e_list_get_iterator (E_LIST (accounts));
+ while (!found && e_iterator_is_valid (iter)) {
+ /* XXX EIterator misuses const. */
account = (EAccount *) e_iterator_get (iter);
- d(printf("checking sent_folder_uri '%s' == '%s'\n",
- account->sent_folder_uri ? account->sent_folder_uri : "empty", uri));
-
- if (account->sent_folder_uri != NULL) {
- curi = em_uri_to_camel (account->sent_folder_uri);
+ if (account->sent_folder_uri != NULL)
found = e_mail_folder_uri_equal (
- camel_session, uri, curi);
- g_free (curi);
- }
- if (!found && account->drafts_folder_uri != NULL) {
- curi = em_uri_to_camel (account->drafts_folder_uri);
+ camel_session, uri,
+ account->sent_folder_uri);
+
+ if (!found && account->drafts_folder_uri != NULL)
found = e_mail_folder_uri_equal (
- camel_session, uri, curi);
- g_free (curi);
- }
+ camel_session, uri,
+ account->drafts_folder_uri);
if (found)
break;