[Xfce4-commits] <thunar-vcs-plugin:master> Don't call thread functions from svn diff dialog.

Stefan Sperling noreply at xfce.org
Fri Sep 7 14:22:01 CEST 2012


Updating branch refs/heads/master
         to 8a5b1fb3ca7346a544ec1e3f2e011e02fc5c257c (commit)
       from 938e836d61d02c46ea72b861c046b52f555da921 (commit)

commit 8a5b1fb3ca7346a544ec1e3f2e011e02fc5c257c
Author: Stefan Sperling <stsp at stsp.name>
Date:   Fri Sep 7 14:18:50 2012 +0200

    Don't call thread functions from svn diff dialog.
    
    Move calls to thread functions out of the svn diff dialog
    code into the main diff thread code, for consistency with
    implementations of other svn commands.

 tvp-svn-helper/tsh-diff-dialog.c |    4 ----
 tvp-svn-helper/tsh-diff.c        |    2 ++
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/tvp-svn-helper/tsh-diff-dialog.c b/tvp-svn-helper/tsh-diff-dialog.c
index 92a5672..595fec6 100644
--- a/tvp-svn-helper/tsh-diff-dialog.c
+++ b/tvp-svn-helper/tsh-diff-dialog.c
@@ -259,8 +259,6 @@ tsh_diff_dialog_add (TshDiffDialog *dialog, const char *line, gint len)
   else if (strncmp(line, "Index", 5) == 0)
     tag = dialog->tag_bold;
 
-  gdk_threads_enter();
-
   text_buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(dialog->text_view));
   gtk_text_buffer_get_iter_at_line(text_buffer, &line_start,
                                    dialog->current_line);
@@ -270,8 +268,6 @@ tsh_diff_dialog_add (TshDiffDialog *dialog, const char *line, gint len)
   else
     gtk_text_buffer_insert(text_buffer, &line_start, line, len);
 
-  gdk_threads_leave();
-
   dialog->current_line++;
 }
 
diff --git a/tvp-svn-helper/tsh-diff.c b/tvp-svn-helper/tsh-diff.c
index 6b05e7e..99966cd 100644
--- a/tvp-svn-helper/tsh-diff.c
+++ b/tvp-svn-helper/tsh-diff.c
@@ -160,7 +160,9 @@ static gpointer diff_thread (gpointer user_data)
         break;
 
       svn_stringbuf_appendcstr(buf, APR_EOL_STR);
+      gdk_threads_enter();
       tsh_diff_dialog_add(dialog, buf->data, buf->len);
+      gdk_threads_leave();
     }
     svn_pool_destroy(iterpool);
     err = svn_stream_close(stream);


More information about the Xfce4-commits mailing list