[arch-commits] Commit in thunar/trunk (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Nov 3 06:32:00 UTC 2012
Date: Saturday, November 3, 2012 @ 02:32:00
Author: foutrelis
Revision: 170121
upgpkg: thunar 1.4.0-3
Backport upstream fix for FS#32325: [gvfs] Duplicate entries for mounted volumes in file manager
Added:
thunar/trunk/thunar-1.4.0-dont-add-duplicates-of-devices.patch
Modified:
thunar/trunk/PKGBUILD
---------------------------------------------------+
PKGBUILD | 8 ++
thunar-1.4.0-dont-add-duplicates-of-devices.patch | 59 ++++++++++++++++++++
2 files changed, 66 insertions(+), 1 deletion(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-11-03 05:44:49 UTC (rev 170120)
+++ PKGBUILD 2012-11-03 06:32:00 UTC (rev 170121)
@@ -4,7 +4,7 @@
pkgname=thunar
pkgver=1.4.0
-pkgrel=2
+pkgrel=3
pkgdesc="Modern file manager for Xfce"
arch=('i686' 'x86_64')
url="http://thunar.xfce.org"
@@ -23,13 +23,19 @@
options=('!libtool')
install=$pkgname.install
source=(http://archive.xfce.org/src/xfce/$pkgname/1.4/Thunar-$pkgver.tar.bz2
+ thunar-1.4.0-dont-add-duplicates-of-devices.patch
thunar-1.4.0-show-loop-devices-hack.patch)
sha256sums=('2c11a19e64cef708a264fb4d5d933389899c3d132fe7b1e313dd6e37bfe4c8ba'
+ 'c25f86a4c298c24327b0681702167aea9f9d712a738c8f3883f5d66da7f08f19'
'185c44db9bdf578d22cb69b81dce7fcc3e2ee6031b1547de6453ff0752dbc97e')
build() {
cd "$srcdir/Thunar-$pkgver"
+ # https://bugzilla.xfce.org/show_bug.cgi?id=9440
+ # Backport of http://git.xfce.org/xfce/thunar/commit/?id=70a4301
+ patch -Np1 -i "$srcdir/thunar-1.4.0-dont-add-duplicates-of-devices.patch"
+
# Fix: Loop devices not appearing in Thunar side pane
# https://bugs.archlinux.org/task/29894
# https://bugzilla.xfce.org/show_bug.cgi?id=8947
Added: thunar-1.4.0-dont-add-duplicates-of-devices.patch
===================================================================
--- thunar-1.4.0-dont-add-duplicates-of-devices.patch (rev 0)
+++ thunar-1.4.0-dont-add-duplicates-of-devices.patch 2012-11-03 06:32:00 UTC (rev 170121)
@@ -0,0 +1,59 @@
+diff -uprb Thunar-1.4.0.orig/thunar/thunar-shortcuts-model.c Thunar-1.4.0/thunar/thunar-shortcuts-model.c
+--- Thunar-1.4.0.orig/thunar/thunar-shortcuts-model.c 2012-11-03 07:42:39.000000000 +0200
++++ Thunar-1.4.0/thunar/thunar-shortcuts-model.c 2012-11-03 08:13:25.000000000 +0200
+@@ -1221,11 +1221,25 @@ thunar_shortcuts_model_volume_added (GVo
+ GVolume *volume,
+ ThunarShortcutsModel *model)
+ {
++ GList *lp;
++ gint idx;
++
+ _thunar_return_if_fail (G_IS_VOLUME_MONITOR (volume_monitor));
+ _thunar_return_if_fail (model->volume_monitor == volume_monitor);
+ _thunar_return_if_fail (G_IS_VOLUME (volume));
+ _thunar_return_if_fail (THUNAR_IS_SHORTCUTS_MODEL (model));
+
++ /* check that the volume is not in the internal list already */
++ if (g_list_find (model->hidden_volumes, volume) != NULL)
++ return;
++
++ /* nor in the list of visible volumes */
++ for (idx = 0, lp = model->shortcuts; lp != NULL; ++idx, lp = lp->next)
++ {
++ if (THUNAR_SHORTCUT (lp->data)->volume == volume)
++ return;
++ }
++
+ /* place the volume on the hidden list */
+ model->hidden_volumes = g_list_prepend (model->hidden_volumes, g_object_ref (volume));
+
+diff -uprb Thunar-1.4.0.orig/thunar/thunar-tree-model.c Thunar-1.4.0/thunar/thunar-tree-model.c
+--- Thunar-1.4.0.orig/thunar/thunar-tree-model.c 2012-11-03 07:42:39.000000000 +0200
++++ Thunar-1.4.0/thunar/thunar-tree-model.c 2012-11-03 08:09:36.000000000 +0200
+@@ -1127,11 +1127,26 @@ thunar_tree_model_volume_added (GVolumeM
+ GVolume *volume,
+ ThunarTreeModel *model)
+ {
++ ThunarTreeModelItem *item = NULL;
++ GNode *node;
++
+ _thunar_return_if_fail (G_IS_VOLUME_MONITOR (volume_monitor));
+ _thunar_return_if_fail (model->volume_monitor == volume_monitor);
+ _thunar_return_if_fail (G_IS_VOLUME (volume));
+ _thunar_return_if_fail (THUNAR_IS_TREE_MODEL (model));
+
++ /* check that the volume is not in the internal list already */
++ if (g_list_find (model->hidden_volumes, volume) != NULL)
++ return;
++
++ /* nor in the list of visible volumes */
++ for (node = model->root->children; node != NULL; node = node->next)
++ {
++ item = THUNAR_TREE_MODEL_ITEM (node->data);
++ if (item->volume == volume)
++ return;
++ }
++
+ /* place the volume on the hidden list */
+ model->hidden_volumes = g_list_prepend (model->hidden_volumes, g_object_ref (volume));
+
More information about the arch-commits
mailing list