# HG changeset patch # User Christian Hammond # Date 1058908287 0 # Node ID d330afe3ccf05ed7b76a493489ab13db04385655 # Parent eb6feb00e6f34a1be429326b99537fd2303bc217 [gaim-migrate @ 6779] Deleting the gtkimhtml in the debug window may have sped up widget clearing, but it seems that never killed the buffer, so it didn't help anyway, and leaked a lot of memory. Now it uses gtk_imhtml_clear() again. Clicking Clear is slow, but that's GtkTextBuffer's fault I think.. testing some experimental code here. I may commit it in time if it speeds things up. committer: Tailor Script diff -r eb6feb00e6f3 -r d330afe3ccf0 src/gtkdebug.c --- a/src/gtkdebug.c Tue Jul 22 20:37:26 2003 +0000 +++ b/src/gtkdebug.c Tue Jul 22 21:11:27 2003 +0000 @@ -84,16 +84,7 @@ static void clear_cb(GtkWidget *w, DebugWindow *win) { - 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); + gtk_imhtml_clear(GTK_IMHTML(win->text)); } static void