summaryrefslogtreecommitdiffstats
path: root/gtk/src/settings.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2015-03-25 21:32:07 +0000
committerjstebbins <[email protected]>2015-03-25 21:32:07 +0000
commit9a096f1644decc529b00e5bbd288668cf6ed36b5 (patch)
treeff1c74aa5a3dcf98e1fff74998028e7c76ee7758 /gtk/src/settings.c
parent4ee00c554b11d543fb1ad1d27dcd0369e4a280b3 (diff)
LinGui: work around yet another gtk+-3 bug
GtkTextView gets confused if you try to set it's contents again while in a callback for a change to the TextView. So prevent such behavior by the app. Requires updating the x264Option TextView in the background (idle loop) rather than immediately. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7013 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r--gtk/src/settings.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c
index 91d95e761..26a622a61 100644
--- a/gtk/src/settings.c
+++ b/gtk/src/settings.c
@@ -561,9 +561,15 @@ ghb_update_widget(GtkWidget *widget, const GhbValue *value)
}
else if (type == GTK_TYPE_TEXT_VIEW)
{
+ static int text_view_busy = 0;
GtkTextBuffer *buffer = gtk_text_view_get_buffer(
GTK_TEXT_VIEW(widget));
- gtk_text_buffer_set_text (buffer, str, -1);
+ if (!text_view_busy)
+ {
+ text_view_busy = 1;
+ gtk_text_buffer_set_text (buffer, str, -1);
+ text_view_busy = 0;
+ }
}
else if (type == GTK_TYPE_LABEL)
{