Thunar: add patch from upstream to fix bug with glib>=2.41
This commit is contained in:
parent
a7b03c7999
commit
cb330a1146
|
@ -0,0 +1,43 @@
|
|||
$OpenBSD: patch-thunar_thunar-file_c,v 1.1 2014/11/18 20:43:28 landry Exp $
|
||||
|
||||
https://bugzilla.xfce.org/show_bug.cgi?id=11212
|
||||
|
||||
Fix default application handling with glib >= 2.41
|
||||
|
||||
--- thunar/thunar-file.c.orig Sun May 5 18:37:23 2013
|
||||
+++ thunar/thunar-file.c Tue Nov 18 21:38:05 2014
|
||||
@@ -3963,6 +3963,7 @@ thunar_file_list_get_applications (GList *file_list)
|
||||
GList *next;
|
||||
GList *ap;
|
||||
GList *lp;
|
||||
+ GAppInfo *default_application;
|
||||
const gchar *previous_type = NULL;
|
||||
const gchar *current_type;
|
||||
|
||||
@@ -3981,7 +3982,25 @@ thunar_file_list_get_applications (GList *file_list)
|
||||
|
||||
/* determine the list of applications that can open this file */
|
||||
if (G_UNLIKELY (current_type != NULL))
|
||||
- list = g_app_info_get_all_for_type (current_type);
|
||||
+ {
|
||||
+ list = g_app_info_get_all_for_type (current_type);
|
||||
+
|
||||
+ /* move any default application in front of the list */
|
||||
+ default_application = g_app_info_get_default_for_type (current_type, FALSE);
|
||||
+ if (G_LIKELY (default_application != NULL))
|
||||
+ {
|
||||
+ for (ap = list; ap != NULL; ap = ap->next)
|
||||
+ {
|
||||
+ if (g_app_info_equal (ap->data, default_application))
|
||||
+ {
|
||||
+ g_object_unref (ap->data);
|
||||
+ list = g_list_delete_link (list, ap);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ list = g_list_prepend (list, default_application);
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
list = NULL;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'Thunar'
|
||||
pkgname=Thunar
|
||||
version=1.6.3
|
||||
revision=3
|
||||
revision=4
|
||||
build_style=gnu-configure
|
||||
configure_args="--enable-gio-unix --enable-dbus --enable-gudev
|
||||
--enable-exif --enable-pcre --disable-static --enable-notifications"
|
||||
|
@ -12,13 +12,17 @@ license="GPL-2, LGPL-2.1"
|
|||
distfiles="http://archive.xfce.org/src/xfce/thunar/${version%.*}/${pkgname}-${version}.tar.bz2"
|
||||
checksum=9a2706f6881ac29cda9f0b0325d179153bc09e37bcbafcab9823c1c1ec89579d
|
||||
|
||||
hostmakedepends="pkg-config intltool"
|
||||
hostmakedepends="pkg-config intltool libtool"
|
||||
makedepends="pcre-devel>=8.30 libglib-devel>=2.32.3_2
|
||||
libgudev-devel libnotify-devel libxfce4util-devel libxfce4ui-devel
|
||||
gtk+-devel dbus-glib-devel libexif-devel exo-devel>=0.10.2 xfce4-panel-devel
|
||||
startup-notification-devel libgudev-devel gvfs-devel"
|
||||
depends="hicolor-icon-theme desktop-file-utils"
|
||||
|
||||
pre_configure() {
|
||||
libtoolize -f
|
||||
}
|
||||
|
||||
Thunar-devel_package() {
|
||||
depends="libglib-devel gtk+-devel ${sourcepkg}>=${version}_${revision}"
|
||||
short_desc+=" - development files"
|
||||
|
|
Loading…
Reference in New Issue