diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-25 01:00:51 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-25 01:00:51 +0800 |
commit | 4e99cbb3f7fdc41ec5aa85af3ddc41ab3534883b (patch) | |
tree | 5f2bc1bd1eed440bb1c0043ed0693cffc95ecb07 | |
parent | 9df62496ce15134feb6be056de86649c2259460b (diff) | |
download | gsoc2013-evolution-4e99cbb3f7fdc41ec5aa85af3ddc41ab3534883b.tar.gz gsoc2013-evolution-4e99cbb3f7fdc41ec5aa85af3ddc41ab3534883b.tar.zst gsoc2013-evolution-4e99cbb3f7fdc41ec5aa85af3ddc41ab3534883b.zip |
Use the new camel_store_folder_uri_equal() function.
2004-02-24 Jeffrey Stedfast <fejj@ximian.com>
* em-utils.c (em_utils_folder_is_drafts): Use the new
camel_store_folder_uri_equal() function.
(em_utils_folder_is_sent): Same.
svn path=/trunk/; revision=24848
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/em-utils.c | 40 |
2 files changed, 9 insertions, 37 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 123419220e..e5dbd93f3b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2004-02-24 Jeffrey Stedfast <fejj@ximian.com> + + * em-utils.c (em_utils_folder_is_drafts): Use the new + camel_store_folder_uri_equal() function. + (em_utils_folder_is_sent): Same. + 2004-02-23 Jeffrey Stedfast <fejj@ximian.com> Fix for bug #54057 diff --git a/mail/em-utils.c b/mail/em-utils.c index dd8aed5444..4cf0abac4a 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -2116,27 +2116,6 @@ em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part) return path; } -static int -emu_provider_uri_equal (CamelProvider *provider, const char *uri0, const char *uri1) -{ - CamelURL *url0, *url1; - int equal; - - if (!(url0 = camel_url_new (uri0, NULL))) - return FALSE; - - if (!(url1 = camel_url_new (uri1, NULL))) { - camel_url_free (url0); - return FALSE; - } - - equal = provider->url_equal (url0, url1); - - camel_url_free (url0); - camel_url_free (url1); - - return equal; -} /** * em_utils_folder_is_drafts: @@ -2150,7 +2129,6 @@ emu_provider_uri_equal (CamelProvider *provider, const char *uri0, const char *u gboolean em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) { - CamelProvider *provider; EAccountList *accounts; EAccount *account; EIterator *iter; @@ -2163,9 +2141,6 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) if (uri == NULL) return FALSE; - if (!(provider = ((CamelService *) folder->parent_store)->provider)) - return FALSE; - accounts = mail_config_get_accounts(); iter = e_list_get_iterator((EList *)accounts); while (e_iterator_is_valid(iter)) { @@ -2173,7 +2148,7 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) if (account->drafts_folder_uri) { drafts_uri = em_uri_to_camel (account->drafts_folder_uri); - if (emu_provider_uri_equal (provider, drafts_uri, uri)) { + if (camel_store_folder_uri_equal (folder->parent_store, drafts_uri, uri)) { g_free (drafts_uri); is = TRUE; break; @@ -2201,22 +2176,16 @@ em_utils_folder_is_drafts(CamelFolder *folder, const char *uri) gboolean em_utils_folder_is_sent(CamelFolder *folder, const char *uri) { - CamelProvider *provider; EAccountList *accounts; EAccount *account; EIterator *iter; int is = FALSE; char *sent_uri; - printf ("checking if %s is a Sent folder\n", uri); - if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT)) return TRUE; - - if (uri == NULL) - return FALSE; - if (!(provider = ((CamelService *) folder->parent_store)->provider)) + if (uri == NULL) return FALSE; accounts = mail_config_get_accounts(); @@ -2226,8 +2195,7 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri) if (account->sent_folder_uri) { sent_uri = em_uri_to_camel (account->sent_folder_uri); - printf ("\tcomparing %s to %s\n", sent_uri, uri); - if (emu_provider_uri_equal (provider, sent_uri, uri)) { + if (camel_store_folder_uri_equal (folder->parent_store, sent_uri, uri)) { g_free (sent_uri); is = TRUE; break; @@ -2240,8 +2208,6 @@ em_utils_folder_is_sent(CamelFolder *folder, const char *uri) g_object_unref(iter); - printf ("%s\n", is ? "yup" : "nup"); - return is; } |