# HG changeset patch # User Christian Hammond # Date 1055124245 0 # Node ID eb9cfee31244fe183029e622fc3af2afefaf6c6f # Parent 571e895bf6ba0f1dd1510642065bf7f4c2403c37 [gaim-migrate @ 6248] I absolutely hate doing this, but as deleting a whole lot of text from a GtkTextView is slower than anything, we now delete the text view and re-add it when we want to clear the debug window. committer: Tailor Script diff -r 571e895bf6ba -r eb9cfee31244 src/gtkdebug.c --- a/src/gtkdebug.c Mon Jun 09 01:54:51 2003 +0000 +++ b/src/gtkdebug.c Mon Jun 09 02:04:05 2003 +0000 @@ -77,7 +77,16 @@ static void clear_cb(GtkWidget *w, DebugWindow *win) { - gtk_imhtml_clear(GTK_IMHTML(win->text)); + GtkWidget *parent; + + /* I HATE THIS! It's necessary though... Clearing a GtkTextView is SLOW. */ + parent = gtk_widget_get_parent(win->text); + + gtk_container_remove(GTK_CONTAINER(parent), win->text); + + win->text = gtk_imhtml_new(NULL, NULL); + gtk_container_add(GTK_CONTAINER(parent), win->text); + gtk_widget_show(win->text); } static void