From 24274985023bdb9e5f5a5e553d5f7b8f8ae742d8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 23 Feb 2009 15:12:28 +0000 Subject: ** Fix for bug #572543 2009-02-23 Milan Crha ** Fix for bug #572543 * calendar/gui/e-cal-popup.c: (ecalp_standard_menu_factory): * mail/em-popup.c: (emp_standard_menu_factory): Always look for alternative apps for application/octet-stream. svn path=/trunk/; revision=37312 --- calendar/ChangeLog | 7 +++++++ calendar/gui/e-cal-popup.c | 5 +++-- mail/ChangeLog | 7 +++++++ mail/em-popup.c | 5 +++-- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index f70dbacae6..2ec439b641 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,10 @@ +2009-02-23 Milan Crha + + ** Fix for bug #572543 + + * gui/e-cal-popup.c: (ecalp_standard_menu_factory): + Always look for alternative apps for application/octet-stream. + 2009-02-22 Tobias Mueller * gui/e-itip-control.c (refresh_options_object): diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 358fce90a1..94e488ec25 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -401,13 +401,14 @@ ecalp_standard_menu_factory (EPopup *ecalp, void *data) apps = g_app_info_get_all_for_type (cp ? cp : mime_type); g_free (cp); - if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) { + if (apps == NULL || strcmp(mime_type, "application/octet-stream") == 0) { if (filename) { gchar *name_type; name_type = e_util_guess_mime_type (filename, FALSE); cp = g_content_type_from_mime_type (name_type); - apps = g_app_info_get_all_for_type (cp ? cp : name_type); + /* show alternative apps first */ + apps = g_list_concat (g_app_info_get_all_for_type (cp ? cp : name_type), apps); g_free (cp); g_free (name_type); } diff --git a/mail/ChangeLog b/mail/ChangeLog index 3be6315b11..9c1b05cf28 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2009-02-23 Milan Crha + + ** Fix for bug #572543 + + * em-popup.c: (emp_standard_menu_factory): + Always look for alternative apps for application/octet-stream. + 2009-02-11 Andre Klapper * em-folder-browser.c: diff --git a/mail/em-popup.c b/mail/em-popup.c index 2c18d60041..9603a08a75 100644 --- a/mail/em-popup.c +++ b/mail/em-popup.c @@ -799,13 +799,14 @@ emp_standard_menu_factory(EPopup *emp, void *data) apps = g_app_info_get_all_for_type (cp ? cp : mime_type); g_free (cp); - if (apps == NULL && strcmp (mime_type, "application/octet-stream") == 0) { + if (apps == NULL || strcmp (mime_type, "application/octet-stream") == 0) { if (filename != NULL) { gchar *name_type; name_type = e_util_guess_mime_type (filename, FALSE); cp = g_content_type_from_mime_type (name_type); - apps = g_app_info_get_all_for_type (cp ? cp : name_type); + /* show alternative apps first */ + apps = g_list_concat (g_app_info_get_all_for_type (cp ? cp : name_type), apps); g_free (cp); g_free (name_type); } -- cgit v1.2.3