diff options
author | Not Zed <NotZed@Ximian.com> | 2004-05-13 11:12:09 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-05-13 11:12:09 +0800 |
commit | 6c7aa314e8c8e87ea3db30d5d935ea45e95b7543 (patch) | |
tree | 1663d86fca3054af20e51038795dd6f30a91cb7b /mail | |
parent | 6653fc8be6ca8e43589662b188ec3cf7d3a6f478 (diff) | |
download | gsoc2013-evolution-6c7aa314e8c8e87ea3db30d5d935ea45e95b7543.tar.gz gsoc2013-evolution-6c7aa314e8c8e87ea3db30d5d935ea45e95b7543.tar.zst gsoc2013-evolution-6c7aa314e8c8e87ea3db30d5d935ea45e95b7543.zip |
added "email" to the uri_schema's attribute.
2004-05-13 Not Zed <NotZed@Ximian.com>
* GNOME_Evolution_Mail.server.in.in: added "email" to the
uri_schema's attribute.
* mail-component.c (impl_handleURI): handle email: uri's, specify
opening a message on a folder.
(handleuri_got_folder): open the message. For some 1337 s3Kr3t
ha0x.
svn path=/trunk/; revision=25893
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 10 | ||||
-rw-r--r-- | mail/GNOME_Evolution_Mail.server.in.in | 1 | ||||
-rw-r--r-- | mail/mail-component.c | 33 |
3 files changed, 44 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 948a11156f..23dd57e3e7 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2004-05-13 Not Zed <NotZed@Ximian.com> + + * GNOME_Evolution_Mail.server.in.in: added "email" to the + uri_schema's attribute. + + * mail-component.c (impl_handleURI): handle email: uri's, specify + opening a message on a folder. + (handleuri_got_folder): open the message. For some 1337 s3Kr3t + ha0x. + 2004-05-12 Not Zed <NotZed@Ximian.com> ** See bug #58302. diff --git a/mail/GNOME_Evolution_Mail.server.in.in b/mail/GNOME_Evolution_Mail.server.in.in index 8ddebd765a..7f30d64381 100644 --- a/mail/GNOME_Evolution_Mail.server.in.in +++ b/mail/GNOME_Evolution_Mail.server.in.in @@ -38,6 +38,7 @@ <oaf_attribute name="evolution:uri_schemas" type="stringv"> <item value="mailto"/> + <item value="email"/> </oaf_attribute> </oaf_server> diff --git a/mail/mail-component.c b/mail/mail-component.c index 9fa4eafb99..7310b12a35 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -41,6 +41,7 @@ #include "em-format.h" #include "em-folder-tree.h" #include "em-folder-browser.h" +#include "em-message-browser.h" #include "em-folder-selector.h" #include "em-folder-selection.h" #include "em-migrate.h" @@ -728,6 +729,26 @@ impl_requestCreateItem (PortableServer_Servant servant, } static void +handleuri_got_folder(char *uri, CamelFolder *folder, void *data) +{ + CamelURL *url = data; + EMMessageBrowser *emmb; + + if (folder != NULL) { + emmb = (EMMessageBrowser *)em_message_browser_window_new(); + /*message_list_set_threaded(((EMFolderView *)emmb)->list, emfv->list->threaded);*/ + /* FIXME: session needs to be passed easier than this */ + em_format_set_session((EMFormat *)((EMFolderView *)emmb)->preview, session); + em_folder_view_set_folder((EMFolderView *)emmb, folder, uri); + em_folder_view_set_message((EMFolderView *)emmb, camel_url_get_param(url, "uid"), FALSE); + gtk_widget_show(emmb->window); + } else { + g_warning("Couldn't open folder '%s'", uri); + } + camel_url_free(url); +} + +static void impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environment *ev) { if (!strncmp (uri, "mailto:", 7)) { @@ -735,6 +756,18 @@ impl_handleURI (PortableServer_Servant servant, const char *uri, CORBA_Environme return; em_utils_compose_new_message_with_mailto (uri, NULL); + } else if (!strncmp(uri, "email:", 6)) { + CamelURL *url = camel_url_new(uri, NULL); + + if (camel_url_get_param(url, "uid") != NULL) { + char *curi = em_uri_to_camel(uri); + + mail_get_folder(curi, 0, handleuri_got_folder, url, mail_thread_new); + g_free(curi); + } else { + g_warning("email uri's must include a uid parameter"); + camel_url_free(url); + } } } |