aboutsummaryrefslogtreecommitdiffstats
path: root/main/xfburn/xfburn-0.4.3-if-with-several-statements.patch
blob: 18de28f5896ef5d7bfc9a3f76495e7cd831e135e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
same as http://git.xfce.org/apps/xfburn/commit/?id=e1d6bfc2 but against 0.4.3
https://bugzilla.xfce.org/show_bug.cgi?id=7103

diff -dur xfburn-0.4.3.orig/xfburn/xfburn-data-composition.c xfburn-0.4.3/xfburn/xfburn-data-composition.c
--- xfburn-0.4.3.orig/xfburn/xfburn-data-composition.c	2009-12-04 08:46:43.000000000 +0100
+++ xfburn-0.4.3/xfburn/xfburn-data-composition.c	2012-09-28 21:59:01.975954901 +0200
@@ -1075,7 +1075,9 @@
     
     /* ensure that we can only drop on top of folders, not files */
     if (insertion) {
+      gdk_threads_enter ();
       gtk_tree_model_get (model, insertion, DATA_COMPOSITION_COLUMN_TYPE, &parent_type, -1);
+      gdk_threads_leave ();
 
       if (parent_type == DATA_COMPOSITION_TYPE_FILE) {
         DBG ("Parent is file, and we're dropping into %d", position);
@@ -1116,9 +1118,7 @@
     } else {
       tree_path = gtk_tree_path_new_first ();
     }
-    gdk_threads_leave ();
     
-    gdk_threads_enter ();
     if (file_exists_on_same_level (model, tree_path, FALSE, name)) {
       xfce_err (_("A file with the same name is already present in the composition."));
 
@@ -1821,10 +1821,11 @@
       
       if (thread_add_file_to_list (composition, model, full_path, &iter, &iter_where_insert, position)) {
         if (position == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE 
-            || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
+            || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) {
           gdk_threads_enter ();
           gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), priv->path_where_insert, FALSE);
           gdk_threads_leave ();
+        }
       }
       
     } else  {
diff -dur xfburn-0.4.3.orig/xfburn/xfburn-utils.h xfburn-0.4.3/xfburn/xfburn-utils.h
--- xfburn-0.4.3.orig/xfburn/xfburn-utils.h	2009-12-04 08:30:28.000000000 +0100
+++ xfburn-0.4.3/xfburn/xfburn-utils.h	2012-09-28 21:59:01.976954907 +0200
@@ -27,6 +27,11 @@
 
 #include "xfburn-global.h"
 
+/*
+#define XFBURN_GDK_ENTER() { DBG("gdk-thread-enter"); gdk_threads_enter(); }
+#define XFBURN_GDK_LEAVE() { DBG("gdk-thread-leave"); gdk_threads_leave(); }
+*/
+
 void xfburn_busy_cursor (GtkWidget *);
 void xfburn_default_cursor (GtkWidget *);