Old bug reappears...
- From: Dave Cole <dave dccs com au>
- To: gtk-list redhat com, gtk-devel-list redhat com
- Subject: Old bug reappears...
- Date: 19 Jan 2000 22:07:19 +1100
I was cleaning my home directory and stumbled across some test
programs that I wrote to demonstrate bugs I had found in GTK+ (1.1.x).
For the hell of it, I recompiled them and ran them. To my surprise,
one of the bugs which had been fixed seems to have been
re-introduced.
The following program places a label in an event box, shows it, then
changes the text. The new text gets displayed *on top of* the old
text.
- Dave
P.S. I have GTK 1.2.6 on my machine.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#include <gtk/gtk.h>
static GtkWidget* label1;
static GtkWidget* label2;
static GtkWidget* btn;
static void clicked(GtkMenuItem* menuitem, gpointer userData)
{
static int quit;
if (quit++) {
gtk_main_quit();
return;
}
gtk_label_set_text(GTK_LABEL(label1), "Changed");
gtk_label_set_text(GTK_LABEL(label2), "Changed");
gtk_label_set_text(GTK_LABEL(GTK_BIN(btn)->child), "Quit");
}
int main(int argc, char* argv[])
{
GtkWidget* top;
GtkWidget* vbox;
GtkWidget* event_box;
gtk_init(&argc, &argv);
top = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT(top), "delete_event",
GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
gtk_widget_set_usize(top, 200, 100);
gtk_window_set_title(GTK_WINDOW(top), "Label Funnies");
vbox = gtk_vbox_new(FALSE, 0);
gtk_container_add(GTK_CONTAINER(top), vbox);
label1 = gtk_label_new("Bare label");
gtk_box_pack_start(GTK_BOX(vbox), label1, TRUE, TRUE, 0);
event_box = gtk_event_box_new();
gtk_box_pack_start(GTK_BOX(vbox), event_box, TRUE, TRUE, 0);
label2 = gtk_label_new("Label in event box");
gtk_container_add(GTK_CONTAINER(event_box), label2);
btn = gtk_button_new_with_label("Press Me");
gtk_box_pack_start(GTK_BOX(vbox), btn, FALSE, TRUE, 0);
gtk_signal_connect(GTK_OBJECT(btn), "clicked",
GTK_SIGNAL_FUNC(clicked), NULL);
gtk_widget_show_all(top);
gtk_main();
return 0;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I have some other programs which still trigger GTK+ bugs. I can post
them if there is interest.
Quite some time ago I submitted two of these bugs (not the one above)
to the Gnome bug database, but I cannot locate them at bugs.gnome.org
anymore. I never received any email status messages from the
database.
- Dave
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]