Re: Menus in GTK--



Tero Pulkkinen wrote:

> testgtkmm example coming with gtk-- package has example of a
> menu. (using menufactory)
> (you should upgrade to 0.9.2 - the 0.9.1. version is completely
> broken - for example testgtkmm example didnt work :)

 I thought menufactory were broken, so I was trying menus in "the hard
way". I hace installed 0.9.2, and now I have my menu (part of it)
working using menufactory. But I'm having some troubles with it.

 I want to add/remove entries dynamically to the menu. I have seen code,
and seems easy to do, but, how do I change callback and user data
associated to a given menu entry? Do I have to remove and insert a new
one?

 I have several windows, all with the same menu. When I select some
option in the menu, it calls the callback function associated with it. I
want this function to make some action on the owner window. How can I do
this? I could pass a pointer to this window in the user data, but then
creating the menu would be much harder (I would have to set this pointer
in each entry after creating the menu).

 Is it possible to set a method callback instead of a function callback
in the menu factory? This could make some things easier (although not
much).

 Finally, an unrelated (and probably stupid) question: Is FileSelection
dialog supossed to be modal, or non-modal? Why?

 Angel.



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