aboutsummaryrefslogtreecommitdiffstats
path: root/x11-fm
diff options
context:
space:
mode:
authorolivierd <olivierd@FreeBSD.org>2016-08-31 00:09:46 +0800
committerolivierd <olivierd@FreeBSD.org>2016-08-31 00:09:46 +0800
commitc73059309849632db3634c08926cd5f29590385b (patch)
treee2cbcc772b879a7bf13f28ec29fb110845c969c4 /x11-fm
parentd0b23aff438d757aac8ee7c1a474d14042cca97e (diff)
downloadfreebsd-ports-gnome-c73059309849632db3634c08926cd5f29590385b.tar.gz
freebsd-ports-gnome-c73059309849632db3634c08926cd5f29590385b.tar.zst
freebsd-ports-gnome-c73059309849632db3634c08926cd5f29590385b.zip
- 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
Diffstat (limited to 'x11-fm')
-rw-r--r--x11-fm/thunar/Makefile2
-rw-r--r--x11-fm/thunar/files/patch-thunar_thunar-file.c30
-rw-r--r--x11-fm/thunar/files/patch-thunar_thunar-folder.c49
3 files changed, 80 insertions, 1 deletions
diff --git a/x11-fm/thunar/Makefile b/x11-fm/thunar/Makefile
index ec03490a5c60..50ec82184f74 100644
--- a/x11-fm/thunar/Makefile
+++ b/x11-fm/thunar/Makefile
@@ -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
diff --git a/x11-fm/thunar/files/patch-thunar_thunar-file.c b/x11-fm/thunar/files/patch-thunar_thunar-file.c
new file mode 100644
index 000000000000..bc73151de506
--- /dev/null
+++ b/x11-fm/thunar/files/patch-thunar_thunar-file.c
@@ -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);
diff --git a/x11-fm/thunar/files/patch-thunar_thunar-folder.c b/x11-fm/thunar/files/patch-thunar_thunar-folder.c
new file mode 100644
index 000000000000..8abd0a99b943
--- /dev/null
+++ b/x11-fm/thunar/files/patch-thunar_thunar-folder.c
@@ -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 */