Re: [gtk-list] Re: radio menu items in itemfactory



On Mon, 19 Apr 1999 Robert_Gasch/PeopleSoft@peoplesoft.com wrote:

> 
> 
> Hi,
> 
> I had the same problem and solved it by keeping an
> extra link to the widget around by building a hash table.
> Something like:
> 
>      char      *s;
>      hashTable = new Glib_Hash (hashfunc, hashcmp);
>      s = strdup (MENU_PATH);
>      hashTable.insert (s, itemFactory->create_item (s, ...));
> 
> This keeps a value pair of (s,widget) which you can access
> later to do a set_sensitive or other things ...
> 
> Pardon my C++ness, the translation to C should be obvious ...

have you had a look at gtk_item_factory_get_item() or
gtk_item_factory_get_widget()?
these functions return the widget pointers from the hash table that
the item factory class maintains internally.

---
ciaoTJ



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