Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2016 16:09:46 +0000 (UTC)
From:      Olivier Duchateau <olivierd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r421122 - in head/x11-fm/thunar: . files
Message-ID:  <201608301609.u7UG9ktw044026@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: olivierd
Date: Tue Aug 30 16:09:46 2016
New Revision: 421122
URL: https://svnweb.freebsd.org/changeset/ports/421122

Log:
  - Add 2 patches, which avoid crashes:
   * When renaming files / folders [1] (we use the official patch)
   * When reloading target file after move
  - Bump PORTREVISION
  
  PR:		208341
  Submitted by:	Matthias Petermann [1] (obtained from Slackware repository)
  Tested by:	Vladimir Omelchuk
  Obtained from:	Upstream git repository
  MFH:		2016Q3

Added:
  head/x11-fm/thunar/files/patch-thunar_thunar-file.c   (contents, props changed)
  head/x11-fm/thunar/files/patch-thunar_thunar-folder.c   (contents, props changed)
Modified:
  head/x11-fm/thunar/Makefile

Modified: head/x11-fm/thunar/Makefile
==============================================================================
--- head/x11-fm/thunar/Makefile	Tue Aug 30 15:59:28 2016	(r421121)
+++ head/x11-fm/thunar/Makefile	Tue Aug 30 16:09:46 2016	(r421122)
@@ -3,7 +3,7 @@
 
 PORTNAME=	Thunar
 PORTVERSION=	1.6.10
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	x11-fm xfce
 MASTER_SITES=	XFCE/src/xfce/${PORTNAME:tl}/${PORTVERSION:R}
 DIST_SUBDIR=	xfce4

Added: head/x11-fm/thunar/files/patch-thunar_thunar-file.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fm/thunar/files/patch-thunar_thunar-file.c	Tue Aug 30 16:09:46 2016	(r421122)
@@ -0,0 +1,30 @@
+--- thunar/thunar-file.c.orig	2015-05-22 13:25:36 UTC
++++ thunar/thunar-file.c
+@@ -795,13 +795,15 @@ thunar_file_monitor (GFileMonitor     *m
+       if (event_type == G_FILE_MONITOR_EVENT_MOVED)
+         {
+           /* reload the target file if cached */
++          if (other_path == NULL)
++            return;
+           other_file = thunar_file_cache_lookup (other_path);
+           if (other_file)
+               thunar_file_reload (other_file);
+           else
+               other_file = thunar_file_get (other_path, NULL);
+ 
+-          if (!other_file)
++          if (other_file == NULL)
+               return;
+ 
+           /* notify the thumbnail cache that we can now also move the thumbnail */
+@@ -3918,7 +3920,9 @@ thunar_file_unwatch (ThunarFile *file)
+ gboolean
+ thunar_file_reload (ThunarFile *file)
+ {
+-  _thunar_return_if_fail (THUNAR_IS_FILE (file));
++  /* if the file has already been destroyed, break here */
++  if (!THUNAR_IS_FILE (file))
++      return FALSE;
+ 
+   /* clear file pxmap cache */
+   thunar_icon_factory_clear_pixmap_cache (file);

Added: head/x11-fm/thunar/files/patch-thunar_thunar-folder.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/x11-fm/thunar/files/patch-thunar_thunar-folder.c	Tue Aug 30 16:09:46 2016	(r421122)
@@ -0,0 +1,49 @@
+--- thunar/thunar-folder.c.orig	2015-05-22 13:25:36 UTC
++++ thunar/thunar-folder.c
+@@ -773,27 +773,30 @@ thunar_folder_monitor (GFileMonitor     
+             {
+               /* destroy the old file and update the new one */
+               thunar_file_destroy (lp->data);
+-              file = thunar_file_get(other_file, NULL);
+-              if (file != NULL && THUNAR_IS_FILE (file))
++              if (other_file != NULL)
+                 {
+-                  thunar_file_reload (file);
+-
+-                  /* if source and target folders are different, also tell
+-                     the target folder to reload for the changes */
+-                  if (thunar_file_has_parent (file))
++                  file = thunar_file_get(other_file, NULL);
++                  if (file != NULL && THUNAR_IS_FILE (file))
+                     {
+-                      other_parent = thunar_file_get_parent (file, NULL);
+-                      if (other_parent &&
+-                          !g_file_equal (thunar_file_get_file(folder->corresponding_file),
+-                                         thunar_file_get_file(other_parent)))
++                      thunar_file_reload (file);
++
++                      /* if source and target folders are different, also tell
++                         the target folder to reload for the changes */
++                      if (thunar_file_has_parent (file))
+                         {
+-                          thunar_file_reload (other_parent);
+-                          g_object_unref (other_parent);
++                          other_parent = thunar_file_get_parent (file, NULL);
++                          if (other_parent &&
++                              !g_file_equal (thunar_file_get_file(folder->corresponding_file),
++                                             thunar_file_get_file(other_parent)))
++                            {
++                              thunar_file_reload (other_parent);
++                              g_object_unref (other_parent);
++                            }
+                         }
+-                    }
+ 
+-                  /* drop reference on the other file */
+-                  g_object_unref (file);
++                      /* drop reference on the other file */
++                      g_object_unref (file);
++                    }
+                 }
+ 
+               /* reload the folder of the source file */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608301609.u7UG9ktw044026>