Gtk--: minor item_factory issues/questions



Hi,

I'm having an a bit of an odd problem. I create my item_factory menu as
follows:

d_itemFactory->create_item ("/View",            0, "<Branch>", 0);
d_itemFactory->create_item ("/View/2D Plane",   0, "<RadioItem>",
  ItemFactoryConnector<TFWindow, string>(this,&viewMenuCallback,
"2dPlane"));
d_itemFactory->create_item ("/View/3D Wire",    0, "/View/2D Plane",
  ItemFactoryConnector<TFWindow, string>(this,&viewMenuCallback,
"3dWire"));
d_itemFactory->create_item ("/View/3D Height",  0, "/View/2D Plane",
  ItemFactoryConnector<TFWindow, string>(this,&viewMenuCallback,
"3dHeight"));
d_itemFactory->create_item ("/View/3D Light",   0, "/View/2D Plane",
  ItemFactoryConnector<TFWindow, string>(this,&viewMenuCallback,
"3dLight"));

Now when I choose a menu option from the View menu for the fist time,
2 events are generated: One for the radio item "2D Plane" and one for
the selected item. Subsequent selections on this menu work fine.

Questions:
1) Why do I get two events the first time I select from the menu
2) How do I change the default selected radio menu item (currently "2D
Plane")

Thanks a lot for any tips
--> Robert




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