Trouble using gtk_check_menu_item_set_state()
- From: "Kemal 'Disq' Hadimli" <disq iname com>
- To: gtk-list redhat com
- Subject: Trouble using gtk_check_menu_item_set_state()
- Date: Tue, 3 Nov 1998 18:03:12 +0000 (GMT)
Hello.
When I enable the code below, the program crashes with errors below. There
is not even a warning when this code is disabled.
item_factory_1 is shown. and when i gtk_widget_realise(item_factory_1)
after gtk_widget_show and before the code below, the warnings/errors are
different. weird.
I am using gtk+ 1.1.3 with glib 1.1.4.
libc 5.4.44, egcs 2.90.29 (1.0.3 release)
-- 8< -- here is the code
GtkCheckMenuItem *a;
a=GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget(item_factory_1, "<main>/View/View with full headers"));
if (a!=NULL) gtk_check_menu_item_set_state(a,fullhead);
a=GTK_CHECK_MENU_ITEM(gtk_item_factory_get_widget(item_factory_1, "<main>/View/Launch web browser when html detected"));
if (a!=NULL) gtk_check_menu_item_set_state(a,autoweb);
-- >8 --
-- 8< -- here is the errors, item_factory_1 not realized, only shown
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 1541 (gtk_widget_realize): assertion `widget != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkText'
Gtk-CRITICAL **: file gtktext.c: line 616 (gtk_text_set_word_wrap): assertion `text != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gdk-Message:
** ERROR **: sigsegv caught
-- >8 --
-- 8< -- here is the errors, item_factory_1 is shown & realized
Gtk-CRITICAL **: file gtkwidget.c: line 2908 (gtk_widget_get_parent_window): assertion `widget->parent != NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 2908 (gtk_widget_get_parent_window): assertion `widget->parent != NULL' failed.
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkctree.c: line 5070 (gtk_ctree_node_get_text): assertion `node != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gtk-CRITICAL **: file gtkwidget.c: line 1541 (gtk_widget_realize): assertion `widget != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkText'
Gtk-CRITICAL **: file gtktext.c: line 616 (gtk_text_set_word_wrap): assertion `text != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 387 (gtk_entry_set_text): assertion `entry != NULL' failed.
Gtk-WARNING **: invalid cast from (NULL) pointer to `GtkEntry'
Gtk-CRITICAL **: file gtkentry.c: line 440 (gtk_entry_set_position): assertion `entry != NULL' failed.
Gdk-Message:
** ERROR **: sigsegv caught
-- >8 --
if there is demand, i can send you the whole menu code (using gtkitemfactory)
bye,
disqk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]