aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/em-utils.c40
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;
}