[Geany-devel] Glade menu copying - Re: Resetting menu accels

Nick Treleaven nick.treleaven at xxxxx
Thu Aug 20 10:56:43 UTC 2009

On Tue, 18 Aug 2009 20:04:12 +0200
Enrico Tröger <enrico.troeger at uvena.de> wrote:

> The bad thing is doing these changes with Glade is annoying, a lot of
> clicking and such and more heavily, you need to do it all twice for
> both menus. So if you like to do it, remove the existing submenus from
> Glade, add the new submenu in Glade and then add the rest of the new
> menu items in plain C code :). This way you can put the whole code to
> generate the menu items into a for loop running from 0 to 1 and so save
> a lot of work, code and most important time.
> If you don't like to do it, just ignore this, then I will add this to
> my personal todo list.

Hmm, personally I like to use Glade for complicated menus and dialogs.

Maybe the menu could be done in Glade as a separate popup menu, then
call create_insert_menu() in interface.c and pack it into the main edit
menu, then call create_insert_menu() again and pack that into the popup
menu. From looking at the generated code for the create_edit_menu1()
editor popup menu this might work, but then any menu items would
need to be looked up with the menu as the 'owner' rather than the main
menu or editor popup menu widgets.

The same could apply for the Format submenus, and would be more useful
as they have more items.


More information about the Devel mailing list