Mercurial > pidgin
comparison src/gtkdebug.c @ 5818:eb9cfee31244
[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 <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 09 Jun 2003 02:04:05 +0000 |
parents | 5e93fc46d1af |
children | 059d95c67cda |
comparison
equal
deleted
inserted
replaced
5817:571e895bf6ba | 5818:eb9cfee31244 |
---|---|
75 } | 75 } |
76 | 76 |
77 static void | 77 static void |
78 clear_cb(GtkWidget *w, DebugWindow *win) | 78 clear_cb(GtkWidget *w, DebugWindow *win) |
79 { | 79 { |
80 gtk_imhtml_clear(GTK_IMHTML(win->text)); | 80 GtkWidget *parent; |
81 | |
82 /* I HATE THIS! It's necessary though... Clearing a GtkTextView is SLOW. */ | |
83 parent = gtk_widget_get_parent(win->text); | |
84 | |
85 gtk_container_remove(GTK_CONTAINER(parent), win->text); | |
86 | |
87 win->text = gtk_imhtml_new(NULL, NULL); | |
88 gtk_container_add(GTK_CONTAINER(parent), win->text); | |
89 gtk_widget_show(win->text); | |
81 } | 90 } |
82 | 91 |
83 static void | 92 static void |
84 pause_cb(GtkWidget *w, DebugWindow *win) | 93 pause_cb(GtkWidget *w, DebugWindow *win) |
85 { | 94 { |