Re: [gtk-list] Re: Gtk--: Accelerators and ItemFactory the hard way





Tero P. asked:
> >     item = itemFactory->create_item (s, "<control>F", "",
> >          ItemFactoryConnector<Gui, string>(this,&appMenuCallback, s));
> >     menuHash->insert (s, item);         // ???
>
> what is this? create_item returns a Gtk_Widget* and thus it handles
> the memory of the widget -- you dont need to deal with deallocating
> such object.  It'll be deleted when the factory is deleted, so you
> dont need to deal with it.

In my code I use the hash table to store the widgets so that I can
do a widget->set_sensitive () later when certain menus should be
in/active ... I thought this was the easiest way of keeping a readily
acessible copy around ...

Wow, first time I was able to ask a 'question' put forth by Tero P ....
--> R




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