GNOME Bugzilla – Bug 572543
Doesn't show correct application for pdf attachments
Last modified: 2013-09-13 01:00:13 UTC
It shows me 'gedit' to open a pdf attachment instead of evince or pdf viewer. Message source --=-AMEP4L5GCFURxYZaBoSK Content-Disposition: attachment; filename="sample-1 day report.pdf" Content-Type: application/octet-stream %PDF-1.3 % 4 0 obj << /Type /Info /Producer (FOP 0.20.5rc) >> endobj 5 0 obj << /Length 4327 /Filter [ /ASCII85Decode /FlateDecode ] >>
Created attachment 129144 [details] test mail could you try with this mail, please? it works fine to me for all of them, I see a "Document Viewer" with all those attachments.
Created attachment 129149 [details] [review] proposed evo patch for evolution; gedit is registered for application/octet-stream, which prevented to look for alternative apps before this patch. After the patch you'll see both, just those alternative apps will be first.
Looks okay except for the g_list_free (apps). g_list_concat: Adds the second GList onto the end of the first GList. Note that the elements of the second GList are not copied. They are used directly. So you could do away with the 'if' block and just say: alt_apps = g_app_info_get_all_for_type (cp ? cp : name_type); apps = g_list_concat (alt_apps, apps); Either argument can be NULL since NULL is still a valid GList. Adding note to myself to adapt this for kill-bonobo.
Created attachment 129312 [details] [review] proposed evo patch ][ for evolution; Err, I read that documentation, but I really wasn't sure, it's quite unclear to me how the g_list_concat works, and I was lazy to open sources for that. Anyway, this patch does the work properly.
That looks better.
Committed to trunk. Committed revision 37312. Committed to gnome-2-24. Committed revision 37313.
*** Bug 574629 has been marked as a duplicate of this bug. ***
Akhil, I see the patch is in evo master, thus seems like something new. Could you check whether your content-type of a pdf part is "application/octet-stream" or some different? it compares case sensitively, thus the exact value matters. Thanks.
I re-fixed this for 2.27 in http://git.gnome.org/cgit/evolution/commit/?id=2c3ca95413624723d717cf0f8876b88b5df3c12e It got dropped in the attachment rewrite.
(In reply to comment #9) > I re-fixed this for 2.27 in > http://git.gnome.org/cgit/evolution/commit/?id=2c3ca95413624723d717cf0f8876b88b5df3c12e Left there one g_debug :)
Yeah, I caught that in the followup commit.
*** Bug 586372 has been marked as a duplicate of this bug. ***