[arch-commits] Commit in libfm/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Mon Oct 6 14:54:56 UTC 2014


    Date: Monday, October 6, 2014 @ 16:54:56
  Author: foutrelis
Revision: 120278

upgpkg: libfm 1.2.2.1-2

Fix default app detection in App chooser combo box.

(Patch also sent upstream.)

Added:
  libfm/trunk/0001-Fix-default-app-detection-in-App-chooser-combo-box.patch
Modified:
  libfm/trunk/PKGBUILD

---------------------------------------------------------------+
 0001-Fix-default-app-detection-in-App-chooser-combo-box.patch |   39 ++++++++++
 PKGBUILD                                                      |   17 +++-
 2 files changed, 52 insertions(+), 4 deletions(-)

Added: 0001-Fix-default-app-detection-in-App-chooser-combo-box.patch
===================================================================
--- 0001-Fix-default-app-detection-in-App-chooser-combo-box.patch	                        (rev 0)
+++ 0001-Fix-default-app-detection-in-App-chooser-combo-box.patch	2014-10-06 14:54:56 UTC (rev 120278)
@@ -0,0 +1,39 @@
+From 1a3f8dd076b119c685614ffe68a9cb732e2eeaee Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Mon, 6 Oct 2014 16:41:09 +0300
+Subject: [PATCH] Fix default app detection in App chooser combo box
+
+Beginning with glib >= 2.41, g_app_info_get_all_for_type() no longer
+puts the default application in front of the list.
+
+So now we have to use g_app_info_get_default_for_type().
+---
+ src/gtk/fm-app-chooser-combo-box.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/gtk/fm-app-chooser-combo-box.c b/src/gtk/fm-app-chooser-combo-box.c
+index a9d544e..f8c5cb9 100644
+--- a/src/gtk/fm-app-chooser-combo-box.c
++++ b/src/gtk/fm-app-chooser-combo-box.c
+@@ -179,8 +179,7 @@ void fm_app_chooser_combo_box_setup(GtkComboBox* combo, FmMimeType* mime_type, G
+     {
+         data->mime_type = fm_mime_type_ref(mime_type);
+         apps = g_app_info_get_all_for_type(fm_mime_type_get_type(data->mime_type));
+-        if(apps)
+-            sel = G_APP_INFO(apps->data); /* default app is the first one in the list. */
++        sel =  g_app_info_get_default_for_type(fm_mime_type_get_type(data->mime_type), FALSE);
+     }
+ 
+     for(l = apps; l; l = l->next)
+@@ -205,6 +204,8 @@ void fm_app_chooser_combo_box_setup(GtkComboBox* combo, FmMimeType* mime_type, G
+             g_list_foreach(apps, (GFunc)g_object_unref, NULL);
+             g_list_free(apps);
+         }
++        if(sel)
++            g_object_unref(sel);
+     }
+ 
+     gtk_list_store_append(store, &it); /* separator */
+-- 
+2.1.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-10-06 14:52:42 UTC (rev 120277)
+++ PKGBUILD	2014-10-06 14:54:56 UTC (rev 120278)
@@ -1,5 +1,6 @@
 # $Id$
-# Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
+# Maintainer:
+# Contributor: Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
 # Contributor: Unknown47 <unknown47r at gmail.com>
 # Contributor: Angel Velasquez <angvp at archlinux.org>
 # Contributor: Juergen Hoetzel <juergen at archlinux.org>
@@ -6,7 +7,7 @@
 
 pkgname=libfm
 pkgver=1.2.2.1
-pkgrel=1
+pkgrel=2
 pkgdesc='Library for file management'
 url='http://pcmanfm.sourceforge.net/'
 arch=('i686' 'x86_64')
@@ -17,9 +18,17 @@
 provides=('lxshortcut')
 conflicts=('lxshortcut')
 install=libfm.install
-source=(http://downloads.sourceforge.net/pcmanfm/libfm-$pkgver.tar.xz)
-md5sums=('f898c480b142b56471377ef3a2810f2d')
+source=(http://downloads.sourceforge.net/pcmanfm/libfm-$pkgver.tar.xz
+        0001-Fix-default-app-detection-in-App-chooser-combo-box.patch)
+md5sums=('f898c480b142b56471377ef3a2810f2d'
+         '10ece6d3a98f1244a82929b7c7ceba2a')
 
+prepare() {
+  cd $pkgname-$pkgver
+
+  patch -Np1 -i ../0001-Fix-default-app-detection-in-App-chooser-combo-box.patch
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --prefix=/usr \



More information about the arch-commits mailing list