[Goodies-commits] r5033 - xfburn/trunk/xfburn

David Mohr squisher at xfce.org
Tue Jul 8 18:42:12 CEST 2008


Author: squisher
Date: 2008-07-08 16:42:12 +0000 (Tue, 08 Jul 2008)
New Revision: 5033

Modified:
   xfburn/trunk/xfburn/xfburn-data-composition.c
Log:
Small bugfix: correctly enter / exit gdk threads

Modified: xfburn/trunk/xfburn/xfburn-data-composition.c
===================================================================
--- xfburn/trunk/xfburn/xfburn-data-composition.c	2008-07-08 05:23:59 UTC (rev 5032)
+++ xfburn/trunk/xfburn/xfburn-data-composition.c	2008-07-08 16:42:12 UTC (rev 5033)
@@ -619,34 +619,34 @@
   GtkTreePath *current_path = NULL;
   GtkTreeIter current_iter;
   
+  gdk_threads_enter ();
   current_path = gtk_tree_path_copy (path);
   for (;gtk_tree_path_prev (current_path););
    
-  if (!gtk_tree_model_get_iter (model, &current_iter, current_path)) {
-    return FALSE;
-  }
-  
-  do {
-    gchar *current_filename = NULL;
-    
-    if (skip_path && gtk_tree_path_compare (path, current_path) == 0) {
-      gtk_tree_path_next (current_path);
-      continue;
-    }
+  if (gtk_tree_model_get_iter (model, &current_iter, current_path)) {
+    do {
+      gchar *current_filename = NULL;
+      
+      if (skip_path && gtk_tree_path_compare (path, current_path) == 0) {
+        gtk_tree_path_next (current_path);
+        continue;
+      }
 
-    gtk_tree_model_get (model, &current_iter, DATA_COMPOSITION_COLUMN_CONTENT, &current_filename, -1);
-    if (strcmp (current_filename, filename) == 0) {
+      gtk_tree_model_get (model, &current_iter, DATA_COMPOSITION_COLUMN_CONTENT, &current_filename, -1);
+      if (strcmp (current_filename, filename) == 0) {
+        g_free (current_filename);
+        gtk_tree_path_free (current_path);
+        gdk_threads_leave ();
+        return TRUE;
+      }
+      
       g_free (current_filename);
-      gtk_tree_path_free (current_path);
-      gdk_threads_leave ();
-      return TRUE;
-    }
-    
-    g_free (current_filename);
-    gtk_tree_path_next (current_path);
-  } while (gtk_tree_model_iter_next (model, &current_iter));
+      gtk_tree_path_next (current_path);
+    } while (gtk_tree_model_iter_next (model, &current_iter));
+  }
   
   gtk_tree_path_free (current_path);
+  gdk_threads_leave ();
   return FALSE;
 }
 




More information about the Goodies-commits mailing list