thunar: avoid trash polling
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 13 May 2016 00:28:51 +0000 (03:28 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 13 May 2016 00:30:56 +0000 (03:30 +0300)
Trash seems to work anyway?
On pandora, trash is disabled by default, so even if it breaks,
nobody should notice.

recipes/xfce-base/thunar/no_trash_polling.patch [new file with mode: 0644]
recipes/xfce-base/thunar_1.0.2.bb

diff --git a/recipes/xfce-base/thunar/no_trash_polling.patch b/recipes/xfce-base/thunar/no_trash_polling.patch
new file mode 100644 (file)
index 0000000..1074fde
--- /dev/null
@@ -0,0 +1,23 @@
+diff -ur Thunar-1.0.2_/thunar-vfs/thunar-vfs-io-trash.c Thunar-1.0.2/thunar-vfs/thunar-vfs-io-trash.c
+--- Thunar-1.0.2_/thunar-vfs/thunar-vfs-io-trash.c     2016-05-13 03:26:46.946372198 +0300
++++ Thunar-1.0.2/thunar-vfs/thunar-vfs-io-trash.c      2016-05-13 03:27:45.685969284 +0300
+@@ -429,11 +429,16 @@
+   /* check if we already scheduled the trash scan timer */
+   if (G_UNLIKELY (_thunar_vfs_io_trash_timer_id == 0))
+     {
+-      /* initially scan the active mount points */
+-      tvit_rescan_mount_points ();
++      static gboolean called;
++      if (!called)
++        {
++          /* initially scan the active mount points */
++          tvit_rescan_mount_points ();
++          called = TRUE;
++        }
+       /* schedule a timer to regularly scan the trash directories */
+-      _thunar_vfs_io_trash_timer_id = g_timeout_add (5 * 1000, (GSourceFunc) _thunar_vfs_io_trash_rescan, NULL);
++      //_thunar_vfs_io_trash_timer_id = g_timeout_add (5 * 1000, (GSourceFunc) _thunar_vfs_io_trash_rescan, NULL);
+     }
+   /* scan all known trash directories */
index d6b13cb..fff8469 100644 (file)
@@ -4,7 +4,7 @@ DEPENDS = "exo dbus-glib libexif xfce4-panel libice libsm gamin"
 RDEPENDS_${PN} = "libxfcegui4 exo dbus-glib libexif xfce4-panel libice libsm gamin"
 RRECOMMENDS_${PN} = "shared-mime-info"
 SECTION = "x11"
-PR = "r3"
+PR = "r4"
 
 inherit xfce46
 
@@ -14,6 +14,7 @@ SRC_URI = " \
        http://www.us.xfce.org/archive/xfce-${XFCE_VERSION}/src/Thunar-${PV}.tar.bz2 \
        file://Ability_to_disable_trash_on_Thunar.patch;patch=1 \
        file://fix_bad_use_of_g_cond_timed_wait.patch;patch=1 \
+       file://no_trash_polling.patch;patch=1 \
 "
 
 S = "${WORKDIR}/Thunar-${PV}/"