changeset 656:ef986f844d5c trunk

[svn] Ok, really fix this stupid bug.
author nenolod
date Wed, 22 Feb 2006 16:37:26 -0800
parents 8fee6432cd63
children 0fd4f4a28ce1
files audacious/textbox.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/textbox.c	Wed Feb 22 16:30:23 2006 -0800
+++ b/audacious/textbox.c	Wed Feb 22 16:37:26 2006 -0800
@@ -470,16 +470,26 @@
 
     tb->tb_scroll_enabled = s;
     if (tb->tb_scroll_enabled && tb->tb_is_scrollable
-        && tb->tb_scroll_allowed && !tb->tb_timeout_tag) {
+        && tb->tb_scroll_allowed) {
         gint tag;
         tag = TEXTBOX_SCROLL_SMOOTH_TIMEOUT;
+
+	if (tb->tb_timeout_tag)
+        {
+	    gtk_timeout_remove(tb->tb_timeout_tag);
+            tb->tb_timeout_tag = 0;
+	}
+
         tb->tb_timeout_tag = gtk_timeout_add(tag, textbox_scroll, tb);
     }
-    else {
-        if (tb->tb_timeout_tag) {
+    else
+    {
+        if (tb->tb_timeout_tag)
+        {
             gtk_timeout_remove(tb->tb_timeout_tag);
             tb->tb_timeout_tag = 0;
         }
+
         tb->tb_offset = 0;
         widget_draw(WIDGET(tb));
     }