Mercurial > pidgin
comparison src/gtkdebug.c @ 6280:d330afe3ccf0
[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 <tailor@pidgin.im>
| author | Christian Hammond <chipx86@chipx86.com> |
|---|---|
| date | Tue, 22 Jul 2003 21:11:27 +0000 |
| parents | 538c522e36e1 |
| children | 8f94cce8faa5 |
comparison
equal
deleted
inserted
replaced
| 6279:eb6feb00e6f3 | 6280:d330afe3ccf0 |
|---|---|
| 82 } | 82 } |
| 83 | 83 |
| 84 static void | 84 static void |
| 85 clear_cb(GtkWidget *w, DebugWindow *win) | 85 clear_cb(GtkWidget *w, DebugWindow *win) |
| 86 { | 86 { |
| 87 GtkWidget *parent; | 87 gtk_imhtml_clear(GTK_IMHTML(win->text)); |
| 88 | |
| 89 /* I HATE THIS! It's necessary though... Clearing a GtkTextView is SLOW. */ | |
| 90 parent = gtk_widget_get_parent(win->text); | |
| 91 | |
| 92 gtk_container_remove(GTK_CONTAINER(parent), win->text); | |
| 93 | |
| 94 win->text = gtk_imhtml_new(NULL, NULL); | |
| 95 gtk_container_add(GTK_CONTAINER(parent), win->text); | |
| 96 gtk_widget_show(win->text); | |
| 97 } | 88 } |
| 98 | 89 |
| 99 static void | 90 static void |
| 100 pause_cb(GtkWidget *w, DebugWindow *win) | 91 pause_cb(GtkWidget *w, DebugWindow *win) |
| 101 { | 92 { |
