GNOME Bugzilla – Bug 532987
Evolution doesn't allow me to open mbox attachments inline
Last modified: 2009-06-15 15:51:09 UTC
evolution-2.22.1-2.fc9.x86_64 evolution-data-server-2.22.1-2.fc9.x86_64 The attached mail was sent by me using Evolution. The patches are marked as mbox files (which they are), but Evolution doesn't allow me to look into them, even though they're sub-class of text/plain in shared-mime-info. The only action that Evolution allows me to take is to save the file, but they could also be opened by: 1) Evolution itself (as messages) 2) Any text editor (as they support text/plain)
Created attachment 110863 [details] mbox-files.mbox
Bastien, Evolution doesn't register itself as a handler. Another thing is that Evolution uses GIO to get the apps for mime types. This bug may have to go GIO then.
Nothing to do with GIO, the applications don't have a separate mime-types list for GIO. Where does that code to determine which application handles the mime-type live?
Bastien, Look at em-popup.c apps = g_app_info_get_all_for_type (mime_type); ... ... ... for (l = apps, i = 0; l; l = l->next, i++) { GAppInfo *app = l->data; EPopupItem *item; if (!g_app_info_should_show (app)) { g_object_unref (app); l->data = NULL; continue; } ... ... THis is how we get the list of apps for the mime type. Mime type is extracted from the mail content-type which is application/mbox.
$ cat test.c #include <gio/gio.h> int main (int argc, char **argv) { GList *list, *l; g_type_init (); list = g_app_info_get_all_for_type ("application/mbox"); for (l = list; l != NULL; l = l->next) { GAppInfo *info = l->data; g_message ("name: %s (show? %d)", g_app_info_get_name (info), g_app_info_should_show (info)); } return 0; } $ gcc -o test test.c `pkg-config --cflags --libs gio-2.0` $ ./test ** Message: name: Text Editor (show? 1) ** Message: name: AbiWord (show? 1) So the text editor and abiword should show up in the list on my system, but they don't. I guess this is a problem with gnome-vfs as I'm using evo 2.22. Can you confirm it works as expected with 2.23? (popup offers to open in text editor, *and* can be opened using the disclosure triangle)
Dropdown gives gedit and a huge list of editors. But it doesn't allow to view inline. May be, this can be handled in evolution. text/plain handler should be registered for application/mbox also, which should solve it.
(In reply to comment #6) > Dropdown gives gedit and a huge list of editors. > > But it doesn't allow to view inline. May be, this can be handled in evolution. > text/plain handler should be registered for application/mbox also, which should > solve it. The easiest way is to use: if (g_content_type_is_a (mimetype, "text/plain") != FALSE) { /* Do stuff to allow showing the attachment inline */ } Obviously that needs to be the last resort option, otherwise vCards and the likes would be handled as text. Doing it that way all the text type files would be showing up without any special casing code (compared to adding application/mbox as a special type). Additionally, application/mbox files should appear the same way forwarded messages do, as they contain From:, Subject:, etc. headers already.
Working on this under bug #464131. *** This bug has been marked as a duplicate of 464131 ***