Changing a GtkOptionMenu in mid-stream



I've tried to dynamically change a GtkOptionMenu, but without success.

After initially constructing the widget (and having it work fine), I:

1. gtk_option_menu_remove_menu(foo);
2. menu = gtk_menu_new();
3. create a bunch of gtk_menu_item_new_with_label()s and
      gtk_menu_append() them to menu
4. gtk_option_menu_set_menu(foo, menu)

The results is an option menu that displays the first menu item in the
"option box".  However, clicking on the little button doesn't pop up
the other choices --- it blanks the box, and displays a funny little
mark in the box's far left side.

Even worse, trying to pop up the menu has also, randomly:
* Caused my window manager to segfault
* Produced the Gtk-Warning 
  gtk_widget_size_allocate(): attempted to allocate widget with with
  65527 and height 1 after hanging X for ~5 seconds.

(I'm using the latest x86 X/Sawmill/Gnome/gtk+ from Debian/potato)

As you might expect, I find this all quite alarming.  Any tips?

Thanks,
-JT



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]