diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-03 23:55:52 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-04 00:00:01 +0800 |
commit | 2c3ca95413624723d717cf0f8876b88b5df3c12e (patch) | |
tree | 8007761f14ed3dd87f6333d160b8539afb5fbf4d /widgets/misc | |
parent | 5b1e05dbf5448251ea0dffc727233e52a2c2e518 (diff) | |
download | gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar.gz gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar.bz2 gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar.lz gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar.xz gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.tar.zst gsoc2013-evolution-2c3ca95413624723d717cf0f8876b88b5df3c12e.zip |
Bug 572543 – Doesn't show correct application for pdf attachments
This fix got dropped in the attachment rewrite. Also, ignore the
application's NoDisplay setting when building the "open with" menu.
That's mainly so "Document Viewer" shows up in the list.
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-attachment-view.c | 3 | ||||
-rw-r--r-- | widgets/misc/e-attachment.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/widgets/misc/e-attachment-view.c b/widgets/misc/e-attachment-view.c index 41e0b302a2..345510230b 100644 --- a/widgets/misc/e-attachment-view.c +++ b/widgets/misc/e-attachment-view.c @@ -635,9 +635,6 @@ attachment_view_update_actions (EAttachmentView *view) gchar *action_label; gchar *action_name; - if (!g_app_info_should_show (app_info)) - continue; - app_executable = g_app_info_get_executable (app_info); app_icon = g_app_info_get_icon (app_info); app_name = g_app_info_get_name (app_info); diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index e9df6024bc..e7a03950db 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -1320,9 +1320,11 @@ GList * e_attachment_list_apps (EAttachment *attachment) { GList *app_info_list; + GList *guessed_infos; GFileInfo *file_info; const gchar *content_type; const gchar *display_name; + gboolean type_is_unknown; gchar *allocated; g_return_val_if_fail (E_IS_ATTACHMENT (attachment), NULL); @@ -1336,18 +1338,22 @@ e_attachment_list_apps (EAttachment *attachment) g_return_val_if_fail (content_type != NULL, NULL); app_info_list = g_app_info_get_all_for_type (content_type); + type_is_unknown = g_content_type_is_unknown (content_type); - if (app_info_list != NULL || display_name == NULL) + if (app_info_list != NULL && !type_is_unknown) goto exit; - if (!g_content_type_is_unknown (content_type)) + if (display_name == NULL) goto exit; allocated = g_content_type_guess (display_name, NULL, 0, NULL); - app_info_list = g_app_info_get_all_for_type (allocated); + guessed_infos = g_app_info_get_all_for_type (allocated); + app_info_list = g_list_concat (guessed_infos, app_info_list); g_free (allocated); exit: + g_debug ("App List Length: %d", g_list_length (app_info_list)); + return app_info_list; } |