[Glade-users] Dynamically adding menu items to menu bar
- From: john at jcoppens.com (John Coppens)
- Subject: [Glade-users] Dynamically adding menu items to menu bar
- Date: Thu, 19 Feb 2009 22:29:32 -0200
On Thu, 19 Feb 2009 16:27:15 -0500
Jonathan Lane <lanej at horizon.com> wrote:
I have a blank menu item in the menu bar named "commands_menuitem" and
I want to add a submenu to it with menu items from a configuration
file. But whenever I ask gtk builder for the menu item, it returns a
GtkAction.
Hi Jonathan,
I couldn't find any way to make it work with Actions. That is, I managed
to add a GtkAction to the Action group and all, but then I came to the
conclusion that there wasn't an easy way to add it to the menu, which is
separate in the glade file.
I did find an example where the menu is directly built in XML inside the
source file, then read in.
Tristan observed that using the 3.5.7 version of Glade (probably any
3.5.x), Glade can export the GtkBuilder files directly and supports
the 'normal' 'oldie' GtkMenuItems and GtkMenus - no Actions. Then, adding
items was quite a bit easier!
If you can, change to the newer version.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]