[Pkg-xfce-commits] r2518 - in desktop/branches/svn-snapshots/thunar/debian: . patches

corsac at alioth.debian.org corsac at alioth.debian.org
Fri Nov 14 05:54:10 UTC 2008


Author: corsac
Date: 2008-11-14 05:54:10 +0000 (Fri, 14 Nov 2008)
New Revision: 2518

Added:
   desktop/branches/svn-snapshots/thunar/debian/patches/02_fix-fam-closing-treeview.patch
Modified:
   desktop/branches/svn-snapshots/thunar/debian/changelog
Log:
* debian/patches:
  - 02_fix-fam-closing-treeview added, fix file monitoring in treeview.
                                                          closes: #478566 

Modified: desktop/branches/svn-snapshots/thunar/debian/changelog
===================================================================
--- desktop/branches/svn-snapshots/thunar/debian/changelog	2008-11-14 05:51:55 UTC (rev 2517)
+++ desktop/branches/svn-snapshots/thunar/debian/changelog	2008-11-14 05:54:10 UTC (rev 2518)
@@ -25,8 +25,11 @@
     - update build-deps for Hopper.
   * debian/libthunar-vfs-1-2.shlibs
     - bump shlibs for Hopper.
+  * debian/patches:
+    - 02_fix-fam-closing-treeview added, fix file monitoring in treeview.
+                                                            closes: #478566 
 
- -- Yves-Alexis Perez <corsac at debian.org>  Wed, 12 Nov 2008 07:22:52 +0100
+ -- Yves-Alexis Perez <corsac at debian.org>  Fri, 14 Nov 2008 00:09:34 +0100
 
 thunar (0.9.0-10) unstable; urgency=low
 

Added: desktop/branches/svn-snapshots/thunar/debian/patches/02_fix-fam-closing-treeview.patch
===================================================================
--- desktop/branches/svn-snapshots/thunar/debian/patches/02_fix-fam-closing-treeview.patch	                        (rev 0)
+++ desktop/branches/svn-snapshots/thunar/debian/patches/02_fix-fam-closing-treeview.patch	2008-11-14 05:54:10 UTC (rev 2518)
@@ -0,0 +1,85 @@
+Index: thunar/thunar-tree-model.c
+===================================================================
+--- thunar/thunar-tree-model.c	(revision 28788)
++++ thunar/thunar-tree-model.c	(working copy)
+@@ -178,6 +178,12 @@
+   gboolean                sort_case_sensitive;
+ 
+   GNode                  *root;
++  
++  /* when this setting is enabled, we do not ref nodes. this is
++   * used to avoid a race condition when gtk traverses the tree
++   * and reads the iter data. See bug #2502.
++   */
++  gboolean                lock_ref_node;
+ };
+ 
+ struct _ThunarTreeModelItem
+@@ -307,6 +313,7 @@
+ 
+   /* initialize the model data */
+   model->sort_case_sensitive = TRUE;
++  model->lock_ref_node = FALSE;
+ 
+   /* connect to the file monitor */
+   model->file_monitor = thunar_file_monitor_get_default ();
+@@ -760,6 +767,10 @@
+   _thunar_return_if_fail (iter->user_data != NULL);
+   _thunar_return_if_fail (iter->stamp == model->stamp);
+ 
++  /* leave when locked */
++  if (model->lock_ref_node)
++    return;
++
+   /* determine the node for the iterator */
+   node = G_NODE (iter->user_data);
+   if (G_UNLIKELY (node == model->root))
+@@ -1699,3 +1710,13 @@
+     }
+ }
+ 
++
++
++void
++thunar_tree_model_set_lock_ref_node (ThunarTreeModel *model,
++                                     gboolean         lock_ref_node)
++{
++  _thunar_return_if_fail (THUNAR_IS_TREE_MODEL (model));
++  
++  model->lock_ref_node = !!lock_ref_node;
++}
+Index: thunar/thunar-tree-model.h
+===================================================================
+--- thunar/thunar-tree-model.h	(revision 28788)
++++ thunar/thunar-tree-model.h	(working copy)
+@@ -61,6 +61,9 @@
+ void             thunar_tree_model_set_case_sensitive (ThunarTreeModel *model,
+                                                        gboolean         case_sensitive);
+ 
++void             thunar_tree_model_set_lock_ref_node  (ThunarTreeModel *model,
++                                                       gboolean         lock_ref_node);
++
+ G_END_DECLS;
+ 
+ #endif /* !__THUNAR_TREE_MODEL_H__ */
+Index: thunar/thunar-tree-view.c
+===================================================================
+--- thunar/thunar-tree-view.c	(revision 28788)
++++ thunar/thunar-tree-view.c	(working copy)
+@@ -2133,10 +2133,16 @@
+       /* apply the new setting */
+       view->show_hidden = show_hidden;
+ 
++      /* lock loading nodes in the tree, see bug #2505 */
++      thunar_tree_model_set_lock_ref_node (THUNAR_TREE_MODEL (view->model), TRUE);
++
+       /* update the filter */
+       filter = gtk_tree_view_get_model (GTK_TREE_VIEW (view));
+       gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (filter));
+ 
++      /* release the lock */
++      thunar_tree_model_set_lock_ref_node (THUNAR_TREE_MODEL (view->model), FALSE);
++
+       /* notify listeners */
+       g_object_notify (G_OBJECT (view), "show-hidden");
+     }




More information about the Pkg-xfce-commits mailing list