[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk-app-devel
Subject: Explanation of errors when destroying gtk_dialog
From: Kent Schumacher <kent () structural-wood ! com>
Date: 1999-07-16 13:25:14
[Download RAW message or body]
Hi,
Attempting to send a destroy signal to a gtk_dialog results in the following errors being output.
Gtk-CRITICAL **: file gtkstyle.c: line 535: assertion `style != NULL' failed.
Gtk-CRITICAL **: file gtkcontainer.c: line 1230: assertion `node != NULL' failed.
Gtk-WARNING **: gtk_signal_disconnect_by_func(): could not find handler (0x80515F8) contai
ning data (0x0)
Gtk-CRITICAL **: file gtkstyle.c: line 574: assertion `style != NULL' failed.
The dialog appears to be destroyed, but I'm a bit concerned about the errors. I've posted
code - I would be very interested in someone pointing out where the errors are.
Thanks,
Kent
#include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <gtk/gtk.h>
static void destroy_cb(GtkWidget *widget) {
gint result;
GdkEventAny event;
gtk_signal_emit_by_name(GTK_OBJECT(widget),"destroy",&event,&result);
}
int main(int argc, char *argv[]) {
GtkWidget *window,*dial,*button;
gtk_init(&argc,&argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_signal_connect(GTK_OBJECT(window),"delete_event",
GTK_SIGNAL_FUNC(gtk_main_quit),NULL);
dial = gtk_dialog_new();
button = gtk_button_new_with_label("Destroy the dialog");
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dial)->action_area),button,TRUE,TRUE,0);
gtk_signal_connect_object(GTK_OBJECT(button),"clicked",
GTK_SIGNAL_FUNC(destroy_cb),GTK_OBJECT(dial));
gtk_widget_show(button);
gtk_widget_show(dial);
gtk_widget_show(window);
gtk_main();
return(1);
}
--
Kent Schumacher
Structural Wood Corporation
4000 Labore Rd.
St. Paul, MN 55110
Phone: (651) 426-8111
Fax: (651) 426-6859
e-mail: kent@structural-wood.com
--
To unsubscribe: mail gtk-app-devel-list-request@redhat.com with
"unsubscribe" as the Subject.
Mailing list concerns should be mailed to <listmaster@redhat.com>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic