evolution r37312 - in trunk: calendar calendar/gui mail



Author: mcrha
Date: Mon Feb 23 15:12:28 2009
New Revision: 37312
URL: http://svn.gnome.org/viewvc/evolution?rev=37312&view=rev

Log:
2009-02-23  Milan Crha  <mcrha redhat com>

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



Modified:
   trunk/calendar/ChangeLog
   trunk/calendar/gui/e-cal-popup.c
   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	Mon Feb 23 15:12:28 2009
@@ -401,13 +401,14 @@
 		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);
 			}

Modified: trunk/mail/em-popup.c
==============================================================================
--- trunk/mail/em-popup.c	(original)
+++ trunk/mail/em-popup.c	Mon Feb 23 15:12:28 2009
@@ -799,13 +799,14 @@
 		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);
 			}



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