Re: Adding menu items dynamically



On Wed, Feb 18, 2009 at 9:43 AM, John Coppens <john jcoppens com> wrote:
Hello people.

I'm still getting my feet wet with Glade3... I defined a menu, which works
fine, but now I want to add items to one of the submenus by program, and
I'm stuck. I did find several other people with similar problems though
(no solutions).

Glade3, via gtk-builder-convert, seems to convert the menu things to a
series of GtkActions, and a structure which defines the menu format. I
was able to create and add a new action. I can generate the menu widget
for that action, but I cannot find a way to append it. (I cannot seem to
access the menubar/menu structure)

Sure, the gtk-builder-convert script comes from an era when gtk+ didnt
support native building of menus with GtkBuilder - so the convert script
makes a uimanager with actions instead, on the other hand the Glade
tool never supported the UIManager object.

At the risk of sounding redundant, this will work better without the conversion
script and with the Glade tool conversion routine.

Cheers,
                    -Tristan



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