[Xfce4-commits] <xfburn:master> Bugfix: Do use {} for if with several statements
David Mohr
noreply at xfce.org
Sun Aug 5 07:04:01 CEST 2012
Updating branch refs/heads/master
to e1d6bfc2b2554c57c04dd301541c9db19fb4f30c (commit)
from 2c2e0ea02d82edac97ca39c5c99b4912a6ad087d (commit)
commit e1d6bfc2b2554c57c04dd301541c9db19fb4f30c
Author: David Mohr <david at mcbf.net>
Date: Sat Aug 4 23:02:29 2012 -0600
Bugfix: Do use {} for if with several statements
xfburn/xfburn-data-composition.c | 7 ++++---
xfburn/xfburn-utils.h | 5 +++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/xfburn/xfburn-data-composition.c b/xfburn/xfburn-data-composition.c
index d1a72da..cd3cd5f 100644
--- a/xfburn/xfburn-data-composition.c
+++ b/xfburn/xfburn-data-composition.c
@@ -1150,7 +1150,9 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc
/* 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);
@@ -1191,9 +1193,7 @@ thread_add_file_to_list_with_name (const gchar *name, XfburnDataComposition * dc
} 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_dialog_show_error (NULL, NULL, _("A file with the same name is already present in the composition."));
@@ -1878,10 +1878,11 @@ thread_add_files_drag (ThreadAddFilesDragParams *params)
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 --git a/xfburn/xfburn-utils.h b/xfburn/xfburn-utils.h
index 27dc679..dde32db 100644
--- a/xfburn/xfburn-utils.h
+++ b/xfburn/xfburn-utils.h
@@ -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 *);
More information about the Xfce4-commits
mailing list