From 01d08b507450d89e1c8bfd5bb4862f21367adc3f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 1 Oct 2008 10:08:05 +0000 Subject: ** Fix for bug #554458 2008-10-01 Milan Crha ** Fix for bug #554458 * configure.in: Bump glib version to 2.18.0 because of g_content_type_from_mime_type. * mail/em-popup.c: (emp_standard_menu_factory): * calendar/gui/e-cal-popup.c: (ecalp_standard_menu_factory): Use content-type to call of g_app_info_get_all_for_type. svn path=/trunk/; revision=36526 --- calendar/gui/e-cal-popup.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'calendar/gui') diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 9a2c0aec15..bec0e9c94d 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -397,17 +397,18 @@ ecalp_standard_menu_factory (EPopup *ecalp, void *data) for (cp = mime_type; *cp != '\0'; cp++) *cp = g_ascii_tolower (*cp); - /* TODO: g_app_info_get_all_for_type expects content_type, not a mime_type, thus it will work fine - on Linux/Unix systems, but not on Win32. They will add hopefully some function to convert between - these two soon. */ - apps = g_app_info_get_all_for_type (mime_type); + cp = g_content_type_from_mime_type (mime_type); + 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 (filename) { gchar *name_type; name_type = e_util_guess_mime_type (filename); - apps = g_app_info_get_all_for_type (name_type); + cp = g_content_type_from_mime_type (name_type); + apps = g_app_info_get_all_for_type (cp ? cp : name_type); + g_free (cp); g_free (name_type); } } -- cgit v1.2.3