Using GtkItemFactory with GtkOptionMenu
- From: Simon Ching <simon_ching yahoo com>
- To: gtk-list gnome org
- Subject: Using GtkItemFactory with GtkOptionMenu
- Date: Fri, 10 May 2002 10:40:06 +0800 (CST)
Hello,
Just want to know if the GtkItemFactory has been
tuned well for use with GtkOptionMenu?
Consider the following code:
ooo start ooo
GtkItemFactoryEntry menu_items[] = {
{ "/00UTC", NULL, NULL, 0, "<Item>" },
{ "/06UTC", NULL, NULL, 0, "<Item>" },
{ "/12UTC", NULL, NULL, 0, "<Item>" },
{ "/18UTC", NULL, NULL, 0, "<Item>" }
};
GtkAccelGroup* accel_group = gtk_accel_group_new ();
GtkItemFactory* item_factory = gtk_item_factory_new
(GTK_TYPE_OPTION_MENU, "<main>", accel_group);
ooo end ooo
When compiled and run, it choked at
gtk_item_factory_new () with Gtk-Critcal exceptions:
(sky:25548): Gtk-CRITICAL **: file gtkaccelmap.c: line
135 (gtk_accel_map_add_entry): assertion
`_gtk_accel_path_is_valid (accel_path)' failed
(sky:25548): Gtk-CRITICAL **: file gtkwidget.c: line
2803 (gtk_widget_set_accel_path): assertion
`_gtk_accel_path_is_valid (accel_path)' failed
And these Gtk_Critical exceptions will go just away
if I replace GTK_TYPE_OPTION_MENU with
GTK_TYPE_MENU_BAR.
Simon.
=====
Simon E Ching
-----------------------------------------------------------
email: simon_ching yahoo com
http://www.geocities.com/simon_ching/
_______________________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com.hk address at http://mail.english.yahoo.com.hk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]