evolution r36526 - in trunk: . calendar calendar/gui mail



Author: mcrha
Date: Wed Oct  1 10:08:05 2008
New Revision: 36526
URL: http://svn.gnome.org/viewvc/evolution?rev=36526&view=rev

Log:
2008-10-01  Milan Crha  <mcrha redhat com>

	** 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.



Modified:
   trunk/ChangeLog
   trunk/calendar/ChangeLog
   trunk/calendar/gui/e-cal-popup.c
   trunk/configure.in
   trunk/mail/ChangeLog
   trunk/mail/em-popup.c

Modified: trunk/calendar/gui/e-cal-popup.c
==============================================================================
--- trunk/calendar/gui/e-cal-popup.c	(original)
+++ trunk/calendar/gui/e-cal-popup.c	Wed Oct  1 10:08:05 2008
@@ -397,17 +397,18 @@
                 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);
 			}
 		}

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Wed Oct  1 10:08:05 2008
@@ -11,7 +11,7 @@
 GTKHTML_PACKAGE=3.14
 
 # Required Packages
-m4_define([glib_minimum_version], [2.16.0])
+m4_define([glib_minimum_version], [2.18.0])
 m4_define([gtk_minimum_version], [2.12.0])
 m4_define([eds_minimum_version], [2.23.91])
 m4_define([gnome_icon_theme_minimum_version], [2.19.91])

Modified: trunk/mail/em-popup.c
==============================================================================
--- trunk/mail/em-popup.c	(original)
+++ trunk/mail/em-popup.c	Wed Oct  1 10:08:05 2008
@@ -799,17 +799,18 @@
                 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 != NULL) {
 				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);
 			}
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]