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

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Mon Oct 6 12:09:03 UTC 2014


    Date: Monday, October 6, 2014 @ 14:09:03
  Author: bpiotrowski
Revision: 120232

upgpkg: pcmanfm 1.2.2-2

add patch to fix "Open With" default application with glib >= 2.41 (adapted from
Evangelos Foutras's patch for thunar)

Added:
  pcmanfm/trunk/0001-Fix-Open-With-default-application-with-glib-2.41.patch
Modified:
  pcmanfm/trunk/PKGBUILD

-------------------------------------------------------------+
 0001-Fix-Open-With-default-application-with-glib-2.41.patch |   56 ++++++++++
 PKGBUILD                                                    |   16 ++
 2 files changed, 68 insertions(+), 4 deletions(-)

Added: 0001-Fix-Open-With-default-application-with-glib-2.41.patch
===================================================================
--- 0001-Fix-Open-With-default-application-with-glib-2.41.patch	                        (rev 0)
+++ 0001-Fix-Open-With-default-application-with-glib-2.41.patch	2014-10-06 12:09:03 UTC (rev 120232)
@@ -0,0 +1,56 @@
+From dffe9a095a788c879f5c8b4561516a5478361166 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <b at bpiotrowski.pl>
+Date: Mon, 6 Oct 2014 14:02:01 +0200
+Subject: [PATCH] Fix "Open With" default application with glib >= 2.41
+
+---
+ src/volume-manager.c | 26 +++++++++++++++++++++++++-
+ 1 file changed, 25 insertions(+), 1 deletion(-)
+
+diff --git a/src/volume-manager.c b/src/volume-manager.c
+index 8df1b36..6dd4263 100644
+--- a/src/volume-manager.c
++++ b/src/volume-manager.c
+@@ -138,6 +138,30 @@ static void on_dlg_response(GtkDialog* dlg, int res, gpointer user_data)
+     pcmanfm_unref();
+ }
+ 
++static GList * pcmanfm_g_app_info_get_all_for_type(const char *content_type)
++{
++    GList    *infos, *info;
++    GAppInfo *default_info;
++
++    infos = g_app_info_get_all_for_type(content_type);
++    default_info = g_app_info_get_default_for_type(content_type, FALSE);
++
++    if (default_info == NULL)
++        return infos;
++
++    for (info = infos; info; info = info->next) {
++        if (g_app_info_equal (info->data, default_info)) {
++            g_object_unref(info->data);
++            infos = g_list_delete_link(infos, info);
++            break;
++        }
++    }
++
++    infos = g_list_prepend(infos, default_info);
++
++    return infos;
++}
++
+ static void on_content_type_finished(GObject* src_obj, GAsyncResult* res, gpointer user_data)
+ {
+     AutoRun* data = (AutoRun*)user_data;
+@@ -185,7 +209,7 @@ static void on_content_type_finished(GObject* src_obj, GAsyncResult* res, gpoint
+ _do_types:
+             for(type=types;*type;++type)
+             {
+-                l = g_app_info_get_all_for_type(*type);
++                l = pcmanfm_g_app_info_get_all_for_type(*type);
+                 if(l)
+                     apps = g_list_concat(apps, l);
+             }
+-- 
+2.1.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-10-06 12:00:44 UTC (rev 120231)
+++ PKGBUILD	2014-10-06 12:09:03 UTC (rev 120232)
@@ -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=pcmanfm
 pkgver=1.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc='Extremely fast and lightweight file manager'
 arch=('i686' 'x86_64')
 url='http://pcmanfm.sourceforge.net/'
@@ -17,9 +18,16 @@
 optdepends=('gvfs: for trash support, mounting with udisks and remote filesystems'
             'udisks: alternative for mounting volumes')
 install=$pkgname.install
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz)
-md5sums=('ac0ba2f8e2b4d47014a62ccf43388e0f')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.xz
+        0001-Fix-Open-With-default-application-with-glib-2.41.patch)
+md5sums=('ac0ba2f8e2b4d47014a62ccf43388e0f'
+         'a63df1e714980eb4300f0028aa99f654')
 
+prepare() {
+  cd $pkgname-$pkgver
+  patch -p1 -i ../0001-Fix-Open-With-default-application-with-glib-2.41.patch
+}
+
 build() {
   cd $pkgname-$pkgver
   ./configure --sysconfdir=/etc --prefix=/usr



More information about the arch-commits mailing list