Backport fix for upstream bug #11306, default application was not
respected with glib >= 2.41. (similar to the patch applied to thunar) Note that there's a pending 4.10.3 bugfix release but it needs more testing first.
This commit is contained in:
parent
2e49c904b0
commit
e6a46036c0
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.51 2014/04/14 19:52:46 matthieu Exp $
|
||||
# $OpenBSD: Makefile,v 1.52 2014/11/18 20:45:16 landry Exp $
|
||||
|
||||
COMMENT= Xfce4 desktop manager
|
||||
|
||||
XFCE_PROJECT= xfdesktop
|
||||
XFCE_VERSION = 4.10.2
|
||||
REVISION = 1
|
||||
REVISION = 2
|
||||
|
||||
# GPLv2
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
@ -0,0 +1,37 @@
|
||||
$OpenBSD: patch-src_xfdesktop-file-icon-manager_c,v 1.1 2014/11/18 20:45:17 landry Exp $
|
||||
|
||||
http://git.xfce.org/xfce/xfdesktop/commit/?id=a4d701b2836724f101d319c11205fa03201134fb
|
||||
https://bugzilla.xfce.org/show_bug.cgi?id=11306
|
||||
|
||||
Default application not respected with glib >= 2.41
|
||||
|
||||
--- src/xfdesktop-file-icon-manager.c.orig Sat Mar 2 17:37:34 2013
|
||||
+++ src/xfdesktop-file-icon-manager.c Tue Nov 18 21:39:57 2014
|
||||
@@ -1564,7 +1564,26 @@ xfdesktop_file_icon_manager_populate_context_menu(Xfce
|
||||
|
||||
app_infos = g_app_info_get_all_for_type(g_file_info_get_content_type(info));
|
||||
if(app_infos) {
|
||||
- GAppInfo *app_info = G_APP_INFO(app_infos->data);
|
||||
+ GAppInfo *app_info, *default_application;
|
||||
+ GList *ap;
|
||||
+
|
||||
+ /* move any default application in front of the list */
|
||||
+ default_application = g_app_info_get_default_for_type (g_file_info_get_content_type(info), FALSE);
|
||||
+ if (G_LIKELY (default_application != NULL))
|
||||
+ {
|
||||
+ for (ap = app_infos; ap != NULL; ap = ap->next)
|
||||
+ {
|
||||
+ if (g_app_info_equal (ap->data, default_application))
|
||||
+ {
|
||||
+ g_object_unref (ap->data);
|
||||
+ app_infos = g_list_delete_link (app_infos, ap);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ app_infos = g_list_prepend (app_infos, default_application);
|
||||
+ }
|
||||
+
|
||||
+ app_info = G_APP_INFO(app_infos->data);
|
||||
|
||||
mi = xfdesktop_menu_item_from_app_info(fmanager, file_icon,
|
||||
app_info, TRUE, TRUE);
|
Loading…
x
Reference in New Issue
Block a user