aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-01-28 02:06:57 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-01-28 02:06:57 +0800
commit6b1b5d30fd4dd6e02513947a1d706554ff2a9fec (patch)
tree41cd8e6291f2941582245c9e5f1fe40037662ff9 /mail
parent143ba4162a04d8a623245c8965b7cce54326cd0b (diff)
downloadgsoc2013-evolution-6b1b5d30fd4dd6e02513947a1d706554ff2a9fec.tar.gz
gsoc2013-evolution-6b1b5d30fd4dd6e02513947a1d706554ff2a9fec.tar.zst
gsoc2013-evolution-6b1b5d30fd4dd6e02513947a1d706554ff2a9fec.zip
Fixed a #warning by converting a local path into a file: uri before
2003-01-27 Jeffrey Stedfast <fejj@ximian.com> * mail-identify.c (mail_identify_mime_part): Fixed a #warning by converting a local path into a file: uri before feeding it to gnome-vfs. * message-list.c (message_list_set_folder): Removed a FIXME that I've decided is no longer needed. 2003-01-22 Jeffrey Stedfast <fejj@ximian.com> * mail-config.c (mail_config_add_account): Emit the account-added event. (mail_config_remove_account): Emit the account-removed event. * mail-account-gui.c (mail_account_gui_save): Emit the changed event on the account-list for the changed account. svn path=/trunk/; revision=19655
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog13
-rw-r--r--mail/mail-account-gui.c7
-rw-r--r--mail/mail-config.c4
-rw-r--r--mail/mail-display.c2
-rw-r--r--mail/mail-identify.c11
5 files changed, 31 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d48c5a7bda..b66d0c6edf 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,8 +1,21 @@
2003-01-27 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-identify.c (mail_identify_mime_part): Fixed a #warning by
+ converting a local path into a file: uri before feeding it to
+ gnome-vfs.
+
* message-list.c (message_list_set_folder): Removed a FIXME that
I've decided is no longer needed.
+2003-01-22 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-config.c (mail_config_add_account): Emit the account-added
+ event.
+ (mail_config_remove_account): Emit the account-removed event.
+
+ * mail-account-gui.c (mail_account_gui_save): Emit the changed
+ event on the account-list for the changed account.
+
2003-01-24 Jeffrey Stedfast <fejj@ximian.com>
* folder-browser-ui.c (folder_browser_ui_add_global): Set the
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 11587f886c..607a0015ef 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1823,6 +1823,7 @@ add_new_store (char *uri, CamelStore *store, void *user_data)
gboolean
mail_account_gui_save (MailAccountGui *gui)
{
+ EAccountList *accounts;
EAccount *account, *new;
CamelProvider *provider = NULL;
CamelURL *source_url = NULL, *url;
@@ -1953,8 +1954,12 @@ mail_account_gui_save (MailAccountGui *gui)
e_account_import (account, new);
g_object_unref (new);
- if (is_new)
+ if (is_new) {
mail_config_add_account (account);
+ } else {
+ accounts = mail_config_get_accounts ();
+ g_signal_emit_by_name (accounts, "account-changed", account);
+ }
/* if the account provider is something we can stick
in the folder-tree and not added by some other
diff --git a/mail/mail-config.c b/mail/mail-config.c
index ee3e5121e6..895a0d89b3 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -766,6 +766,7 @@ void
mail_config_add_account (EAccount *account)
{
e_list_append ((EList *) config->accounts, account);
+ g_signal_emit_by_name (config->accounts, "account-added", account);
mail_config_save_accounts ();
}
@@ -802,7 +803,10 @@ mail_config_remove_account (EAccount *account)
gconf_client_set_int (config->gconf, "/apps/evolution/mail/default_account", cur - 1, NULL);
}
+ g_object_ref (account);
e_list_remove ((EList *) config->accounts, account);
+ g_signal_emit_by_name (config->accounts, "account-removed", account);
+ g_object_unref (account);
mail_config_save_accounts ();
}
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 4531555449..bafc0bc019 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -506,7 +506,7 @@ pixmap_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
name = prop->v._u.value_string;
else
name = "bonobo";
- menu[1].name = g_strdup_printf(_("View Inline (via %s)"), name);
+ menu[1].name = g_strdup_printf (_("View Inline (via %s)"), name);
} else
menu[1].name = g_strdup (_(menu[1].name));
} else
diff --git a/mail/mail-identify.c b/mail/mail-identify.c
index e2f614f059..0ef8b7e9e3 100644
--- a/mail/mail-identify.c
+++ b/mail/mail-identify.c
@@ -30,6 +30,7 @@
#include <string.h>
#include <glib.h>
+#include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-mime-utils.h>
#include "mail.h"
@@ -52,15 +53,17 @@ mail_identify_mime_part (CamelMimePart *part, MailDisplay *md)
const char *filename, *magic_type = NULL;
CamelDataWrapper *data;
char *name_type = NULL;
-
+ char *uri;
+
filename = camel_mime_part_get_filename (part);
if (filename) {
/* GNOME-VFS will misidentify TNEF attachments as MPEG */
if (!strcmp (filename, "winmail.dat"))
return g_strdup ("application/vnd.ms-tnef");
-
-#warning "does gnome_vfs_get_mime_type handle a plain filename as the 'text_uri'?"
- name_type = gnome_vfs_get_mime_type(filename);
+
+ uri = gnome_vfs_get_uri_from_local_path (filename);
+ name_type = gnome_vfs_get_mime_type (uri);
+ g_free (uri);
}
data = camel_medium_get_content_object (CAMEL_MEDIUM (part));