Hello community,

here is the log from the commit of package thunar for openSUSE:Factory checked 
in at 2017-03-02 19:38:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/thunar (Old)
 and      /work/SRC/openSUSE:Factory/.thunar.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "thunar"

Thu Mar  2 19:38:09 2017 rev:67 rq:460764 version:1.6.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/thunar/thunar.changes    2016-02-08 
09:48:44.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.thunar.new/thunar.changes       2017-03-02 
19:38:10.344530822 +0100
@@ -1,0 +2,11 @@
+Wed Feb 22 22:08:46 UTC 2017 - [email protected]
+
+- Created patch thunar-bugfixes.patch fixing the following upstream bugs:
+  - Fix a crash for on cut/pasting of multiple files (bxo #12260)
+  - Fix a crash when renaming files (boo #1011518, bxo #12264)
+  - Fix missing return value for debug in thunar_file_reload (bxo #12827)
+  - Fix thunar history being deleted after view change (bxo #12708)
+  - Fixing missing return value in standard view
+  - Fix crashes when reloading target file after move (bxo #11983)
+
+-------------------------------------------------------------------

New:
----
  thunar-bugfixes.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ thunar.spec ++++++
--- /var/tmp/diff_new_pack.QispAs/_old  2017-03-02 19:38:11.168414237 +0100
+++ /var/tmp/diff_new_pack.QispAs/_new  2017-03-02 19:38:11.168414237 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package thunar
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,9 @@
 Patch0:         thunar-use-xdg-icon-spec-icons.patch
 # fix mismatched names between thunar.desktop and thunar.appdata.xml.
 Patch1:         thunar-appdata.patch
+# fix rename crashing, filemovement crashing and some small other bugs
+# PATCH-FIX-UPSTREAM thunar-bugfixes.patch [email protected], 
[email protected] -- avoid crashes, boo#1011518
+Patch2:         thunar-bugfixes.patch
 BuildRequires:  fdupes
 BuildRequires:  intltool
 BuildRequires:  perl-XML-Parser
@@ -98,6 +101,7 @@
 %setup -q -n Thunar-%{version}
 %patch0 -p1
 %patch1
+%patch2 -p2
 
 %build
 %configure \

++++++ thunar-bugfixes.patch ++++++
diff -ur old/Thunar-1.6.10/thunar/thunar-file.c 
new/Thunar-1.6.10/thunar/thunar-file.c
--- old/Thunar-1.6.10/thunar/thunar-file.c      2015-05-22 15:25:36.000000000 
+0200
+++ new/Thunar-1.6.10/thunar/thunar-file.c      2017-02-23 06:44:06.968364077 
+0100
@@ -121,6 +121,7 @@
 
 G_LOCK_DEFINE_STATIC (file_cache_mutex);
 G_LOCK_DEFINE_STATIC (file_content_type_mutex);
+G_LOCK_DEFINE_STATIC (file_rename_mutex);
 
 
 
@@ -220,6 +221,22 @@
     G_IMPLEMENT_INTERFACE (THUNARX_TYPE_FILE_INFO, thunar_file_info_init))
 
 
+static GWeakRef*
+weak_ref_new (GObject *obj)
+{
+  GWeakRef *ref;
+  ref = g_slice_new (GWeakRef);
+  g_weak_ref_init (ref, obj);
+  return ref;
+}
+
+static void
+weak_ref_free (GWeakRef *ref)
+{
+  g_weak_ref_clear (ref);
+  g_slice_free (GWeakRef, ref);
+}
+
 
 #ifdef G_ENABLE_DEBUG
 #ifdef HAVE_ATEXIT
@@ -235,7 +252,7 @@
   gchar *uri;
 
   uri = g_file_get_uri (key);
-  g_print ("--> %s (%u)\n", uri, G_OBJECT (value)->ref_count);
+  g_print ("--> %s\n", uri);
   if (G_OBJECT (key)->ref_count > 2)
     g_print ("    GFile (%u)\n", G_OBJECT (key)->ref_count - 2);
   g_free (uri);
@@ -277,7 +294,7 @@
   gchar *name;
 
   name = g_file_get_parse_name (G_FILE (gfile));
-  g_print ("    %s (%u)\n", name, G_OBJECT (value)->ref_count);
+  g_print ("    %s\n", name);
   g_free (name);
 }
 
@@ -728,7 +745,9 @@
   g_object_unref (previous_file);
 
   /* insert the new entry */
-  g_hash_table_insert (file_cache, g_object_ref (file->gfile), file);
+  g_hash_table_insert (file_cache,
+                       g_object_ref (file->gfile),
+                       weak_ref_new (G_OBJECT (file)));
 
   G_UNLOCK (file_cache_mutex);
 }
@@ -780,7 +799,9 @@
       /* the event occurred for the monitored ThunarFile */
       if (event_type == G_FILE_MONITOR_EVENT_MOVED)
         {
+          G_LOCK (file_rename_mutex);
           thunar_file_monitor_moved (file, other_path);
+          G_UNLOCK (file_rename_mutex);
           return;
         }
 
@@ -795,13 +816,18 @@
       if (event_type == G_FILE_MONITOR_EVENT_MOVED)
         {
           /* reload the target file if cached */
+          if (other_path == NULL)
+            return;
+
+          G_LOCK (file_rename_mutex);
+
           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 */
@@ -811,13 +837,14 @@
           thunar_file_reload_parent (other_file);
 
           g_object_unref (other_file);
+
+          G_UNLOCK (file_rename_mutex);
         }
       return;
     }
 }
 
 
-
 static void
 thunar_file_watch_destroyed (gpointer data)
 {
@@ -1113,11 +1140,9 @@
 
   /* insert the file into the cache */
   G_LOCK (file_cache_mutex);
-#ifdef G_ENABLE_DEBUG
-  /* check if there is no instance created in the meantime */
-  _thunar_assert (g_hash_table_lookup (file_cache, file->gfile) == NULL);
-#endif
-  g_hash_table_insert (file_cache, g_object_ref (file->gfile), file);
+  g_hash_table_insert (file_cache,
+                       g_object_ref (file->gfile),
+                       weak_ref_new (G_OBJECT (file)));
   G_UNLOCK (file_cache_mutex);
 
   /* pass the loaded file and possible errors to the return function */
@@ -1239,7 +1264,9 @@
           G_LOCK (file_cache_mutex);
 
           /* insert the file into the cache */
-          g_hash_table_insert (file_cache, g_object_ref (file->gfile), file);
+          g_hash_table_insert (file_cache,
+                               g_object_ref (file->gfile),
+                               weak_ref_new (G_OBJECT (file)));
 
           /* done inserting in the cache */
           G_UNLOCK (file_cache_mutex);
@@ -1316,7 +1343,9 @@
       G_LOCK (file_cache_mutex);
 
       /* insert the file into the cache */
-      g_hash_table_insert (file_cache, g_object_ref (file->gfile), file);
+      g_hash_table_insert (file_cache,
+                           g_object_ref (file->gfile),
+                           weak_ref_new (G_OBJECT (file)));
 
       /* done inserting in the cache */
       G_UNLOCK (file_cache_mutex);
@@ -1926,6 +1955,7 @@
     }
   else
     {
+      G_LOCK (file_rename_mutex);
       /* try to rename the file */
       renamed_file = g_file_set_display_name (file->gfile, name, cancellable, 
error);
 
@@ -1942,11 +1972,12 @@
               /* emit the file changed signal */
               thunar_file_changed (file);
             }
-
+          G_UNLOCK (file_rename_mutex);
           return TRUE;
         }
       else
         {
+          G_UNLOCK (file_rename_mutex);
           return FALSE;
         }
     }
@@ -3918,7 +3949,7 @@
 gboolean
 thunar_file_reload (ThunarFile *file)
 {
-  _thunar_return_if_fail (THUNAR_IS_FILE (file));
+  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
 
   /* clear file pxmap cache */
   thunar_icon_factory_clear_pixmap_cache (file);
@@ -3957,6 +3988,28 @@
 
 
 /**
+ * thunar_file_reload_idle_unref:
+ * @file : a #ThunarFile instance.
+ *
+ * Schedules a reload of the @file by calling thunar_file_reload
+ * when idle. When scheduled function returns @file object will be
+ * unreferenced.
+ *
+ **/
+void
+thunar_file_reload_idle_unref (ThunarFile *file)
+{
+  _thunar_return_if_fail (THUNAR_IS_FILE (file));
+
+  g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+                   (GSourceFunc) thunar_file_reload,
+                   file,
+                   (GDestroyNotify) g_object_unref);
+}
+
+
+
+/**
  * thunar_file_destroy:
  * @file : a #ThunarFile instance.
  *
@@ -4085,6 +4138,7 @@
 ThunarFile *
 thunar_file_cache_lookup (const GFile *file)
 {
+  GWeakRef   *ref;
   ThunarFile *cached_file;
 
   _thunar_return_val_if_fail (G_IS_FILE (file), NULL);
@@ -4097,18 +4151,15 @@
       file_cache = g_hash_table_new_full (g_file_hash, 
                                           (GEqualFunc) g_file_equal, 
                                           (GDestroyNotify) g_object_unref, 
-                                          NULL);
+                                          (GDestroyNotify) weak_ref_free);
     }
 
-  cached_file = g_hash_table_lookup (file_cache, file);
+  ref = g_hash_table_lookup (file_cache, file);
 
-  if (cached_file != NULL)
-    {
-      /* take a reference to avoid too-early releases outside the
-       * file_cache_mutex, resuling in destroyed files being used
-       * in running code */
-      g_object_ref (cached_file);
-    }
+  if (ref == NULL)
+    cached_file = NULL;
+  else
+    cached_file = g_weak_ref_get (ref);
 
   G_UNLOCK (file_cache_mutex);
 
diff -ur old/Thunar-1.6.10/thunar/thunar-file.h 
new/Thunar-1.6.10/thunar/thunar-file.h
--- old/Thunar-1.6.10/thunar/thunar-file.h      2015-05-22 15:25:36.000000000 
+0200
+++ new/Thunar-1.6.10/thunar/thunar-file.h      2017-02-23 06:46:15.929328754 
+0100
@@ -241,6 +241,7 @@
 
 gboolean          thunar_file_reload                     (ThunarFile           
   *file);
 void              thunar_file_reload_idle                (ThunarFile           
   *file);
+void              thunar_file_reload_idle_unref          (ThunarFile           
   *file);
 void              thunar_file_reload_parent              (ThunarFile           
   *file);
 
 void              thunar_file_destroy                    (ThunarFile           
   *file);
diff -ur old/Thunar-1.6.10/thunar/thunar-folder.c 
new/Thunar-1.6.10/thunar/thunar-folder.c
--- old/Thunar-1.6.10/thunar/thunar-folder.c    2015-05-22 15:25:36.000000000 
+0200
+++ new/Thunar-1.6.10/thunar/thunar-folder.c    2017-02-23 06:46:15.929328754 
+0100
@@ -276,6 +276,9 @@
 {
   ThunarFolder *folder = THUNAR_FOLDER (object);
 
+  if (folder->corresponding_file)
+    thunar_file_unwatch (folder->corresponding_file);
+
   /* disconnect from the ThunarFileMonitor instance */
   g_signal_handlers_disconnect_matched (folder->file_monitor, 
G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, folder);
   g_object_unref (folder->file_monitor);
@@ -356,7 +359,11 @@
   switch (prop_id)
     {
     case PROP_CORRESPONDING_FILE:
+      if (folder->corresponding_file)
+        thunar_file_unwatch (folder->corresponding_file);
       folder->corresponding_file = g_value_dup_object (value);
+      if (folder->corresponding_file)
+        thunar_file_watch (folder->corresponding_file);
       break;
 
     case PROP_LOADING:
@@ -773,27 +780,30 @@
             {
               /* 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 */
diff -ur old/Thunar-1.6.10/thunar/thunar-job.c 
new/Thunar-1.6.10/thunar/thunar-job.c
--- old/Thunar-1.6.10/thunar/thunar-job.c       2015-05-22 15:25:36.000000000 
+0200
+++ new/Thunar-1.6.10/thunar/thunar-job.c       2017-02-23 06:49:04.278653070 
+0100
@@ -578,8 +578,7 @@
           file = thunar_file_cache_lookup (lp->data);
           if (file != NULL)
             {
-              thunar_file_reload_idle (file);
-              g_object_unref (file);
+              thunar_file_reload_idle_unref (file);
             }
         }
 
diff -ur old/Thunar-1.6.10/thunar/thunar-standard-view.c 
new/Thunar-1.6.10/thunar/thunar-standard-view.c
--- old/Thunar-1.6.10/thunar/thunar-standard-view.c     2015-05-22 
15:25:36.000000000 +0200
+++ new/Thunar-1.6.10/thunar/thunar-standard-view.c     2017-02-23 
06:49:04.278653070 +0100
@@ -2167,7 +2167,7 @@
   GFile      *path;
   GFile      *tmp;
 
-  _thunar_return_if_fail (THUNAR_IS_FILE (directory));
+  _thunar_return_val_if_fail (THUNAR_IS_FILE (directory), NULL);
 
   /* determine the path of the directory */
   path = g_object_ref (thunar_file_get_file (directory));
diff -ur old/Thunar-1.6.10/thunar/thunar-window.c 
new/Thunar-1.6.10/thunar/thunar-window.c
--- old/Thunar-1.6.10/thunar/thunar-window.c    2015-05-22 15:25:36.000000000 
+0200
+++ new/Thunar-1.6.10/thunar/thunar-window.c    2017-02-23 06:49:04.278653070 
+0100
@@ -2759,7 +2759,6 @@
 {
   ThunarFile     *file = NULL;
   ThunarFile     *current_directory = NULL;
-  ThunarHistory  *history = NULL;
   GtkWidget      *old_view;
   GList          *selected_files = NULL;
 
@@ -2779,9 +2778,6 @@
       /* remember the file selection */
       selected_files = thunar_g_file_list_copy 
(thunar_component_get_selected_files (THUNAR_COMPONENT (old_view)));
 
-      /* get a copy of the history */
-      history = thunar_standard_view_copy_history (THUNAR_STANDARD_VIEW 
(old_view));
-
       /* update the UI (else GtkUIManager will crash on merging) */
       gtk_ui_manager_ensure_update (window->ui_manager);
     }
@@ -2822,10 +2818,6 @@
   if (gtk_widget_get_visible (GTK_WIDGET (window)))
     g_object_set (G_OBJECT (window->preferences), "last-view", g_type_name 
(window->view_type), NULL);
 
-  /* use the copy of the old history if available */
-  if (history != NULL)
-    thunar_standard_view_set_history (THUNAR_STANDARD_VIEW (window->view), 
history);
-
   /* release the file references */
   if (G_UNLIKELY (file != NULL))
     g_object_unref (G_OBJECT (file));

Reply via email to