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



Author: mbarnes
Date: Fri May 23 14:41:30 2008
New Revision: 35534
URL: http://svn.gnome.org/viewvc/evolution?rev=35534&view=rev

Log:
2008-05-23  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #534476

	* configure.in:
	Require shared-mime-info >= 0.22 to make sure we pick up the fix
	for correctly identifying "winmail.dat" attachments.

	* calendar/gui/e-cal-popup.c (ecalp_standard_menu_factory):
	* mail/em-utils.c (em_utils_snoop_type):
	* mail/em-popup.c (emp_standard_menu_factory):
	Remove the special check for "winmail.dat".  GIO correctly
	identifies it as "application/ms-tnef".



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

Modified: trunk/calendar/gui/e-cal-popup.c
==============================================================================
--- trunk/calendar/gui/e-cal-popup.c	(original)
+++ trunk/calendar/gui/e-cal-popup.c	Fri May 23 14:41:30 2008
@@ -403,16 +403,11 @@
 
 		if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) {
 			if (filename) {
-				/* will gvfs misidentify TNEF attachments as MPEG? */
-				if (!strcmp (filename, "winmail.dat"))
-					apps = g_app_info_get_all_for_type ("application/vnd.ms-tnef");
-				else {
-					char *name_type = e_util_guess_mime_type (filename);
+				gchar *name_type;
 
-					apps = g_app_info_get_all_for_type (name_type);
-
-					g_free (name_type);
-				}
+				name_type = e_util_guess_mime_type (filename);
+				apps = g_app_info_get_all_for_type (name_type);
+				g_free (name_type);
 			}
 		}
 		g_free (mime_type);

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Fri May 23 14:41:30 2008
@@ -23,6 +23,7 @@
 m4_define([libgnomecanvas_minimum_version], [2.0.0])    # XXX Just a Guess
 m4_define([libgnomeui_minimum_version], [2.0.0])        # XXX Just a Guess
 m4_define([libxml_minimum_version], [2.0.0])            # XXX Just a Guess
+m4_define([shared_mime_info_minimum_version], [0.22])
 
 # Optional Packages
 #
@@ -171,7 +172,8 @@
          libglade-2.0 >= libglade_minimum_version
          libgnomecanvas-2.0 >= libgnomecanvas_minimum_version
          libgnomeui-2.0 >= libgnomeui_minimum_version
-         libxml-2.0 >= libxml_minimum_version])
+         libxml-2.0 >= libxml_minimum_version
+	 shared-mime-info >= shared_mime_info_minimum_version])
 AC_SUBST(GNOME_PLATFORM_CFLAGS)
 AC_SUBST(GNOME_PLATFORM_LIBS)
 

Modified: trunk/mail/em-popup.c
==============================================================================
--- trunk/mail/em-popup.c	(original)
+++ trunk/mail/em-popup.c	Fri May 23 14:41:30 2008
@@ -806,7 +806,7 @@
 	if (mime_type) {
                 gchar *cp;
 
-                /* does gvfs expect lowercase MIME types? */
+                /* GIO expects lowercase MIME types. */
                 for (cp = mime_type; *cp != '\0'; cp++)
                         *cp = g_ascii_tolower (*cp);
 
@@ -815,18 +815,13 @@
 		    these two soon. */
 		apps = g_app_info_get_all_for_type (mime_type);
 
-		if (apps == NULL && strcmp(mime_type, "application/octet-stream") == 0) {
-			if (filename) {
-				/* will gvfs misidentify TNEF attachments as MPEG? */
-				if (!strcmp (filename, "winmail.dat"))
-					apps = g_app_info_get_all_for_type ("application/vnd.ms-tnef");
-				else {
-					char *name_type = e_util_guess_mime_type (filename);
-
-					apps = g_app_info_get_all_for_type (name_type);
-
-					g_free (name_type);
-				}
+		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);
+				g_free (name_type);
 			}
 		}
 

Modified: trunk/mail/em-utils.c
==============================================================================
--- trunk/mail/em-utils.c	(original)
+++ trunk/mail/em-utils.c	Fri May 23 14:41:30 2008
@@ -2209,13 +2209,8 @@
 	CamelDataWrapper *dw;
 
 	filename = camel_mime_part_get_filename (part);
-	if (filename) {
-		/* will GVFS misidentify TNEF attachments as MPEG? */
-		if (!strcmp (filename, "winmail.dat"))
-			return "application/vnd.ms-tnef";
-
+	if (filename != NULL)
 		name_type = e_util_guess_mime_type (filename);
-	}
 
 	dw = camel_medium_get_content_object((CamelMedium *)part);
 	if (!camel_data_wrapper_is_offline(dw)) {



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