[Geany-devel] Customizable editor popup menu
skateinmars at xxxxx
Wed Aug 6 23:29:42 UTC 2008
Enrico Tröger a écrit :
> On Tue, 05 Aug 2008 14:17:06 +0200, Jean-Philippe
> <skateinmars at skateinmars.net> wrote:
>>> As a Geany user I'd be happy about such a way to customize the
>>> toolbar/menus as it is also possible in a similar way (mostly using
>>> libglade) in many other apps.
>>> But I'm also aware that it is often more comfortable to change such
>>> things with a nice GUI interface but this still needs to be written.
>> Hi, sorry I didn't try it before.
>> Unfortunately it seems there is no ui_editor_menu.xml in the branch,
>> so geany segfaults while trying to open it. Maybe I forgot something
>> here ?
> No, I forgot to check in the UI definition file. Sorry.
> Now it's in the SVN repository and should work. The segfault when
> starting Geany without this file is known but I just didn't work on
> that as long as we don't know whether we'll use this code. It's not a
> big deal to fix but it's one of the last steps.
All right, I gave it a shot, considering the "proof of concept" state.
The XML idea seems fine but there are obvious issues like creating submenus and
personalized actions, which only seems possible by editing ui_manager.c.
However, I was successfully able to add an "Insert" menu and pu the insert menus
in it with my pitiful C skills and it only broke the "dummy" insert submenus
:-). So it seems plugins may easily add menu actions with this system.
As for the format itself I don't really understand the need for an <ui> root
node as only one <popup> node is used but it may be a GtkUIManager convention.
Currently geany uses the system ui_editor_menu.xml when the user one is not
well-formed, maybe a warning should be also raised.
Indeed a GUI could be used to create menus/submenus and actions (which could be
nice to clean the date insertion menu for example) but it seems there would be a
lot of work for something that maybe would not be used by many people.
As for the keybindings accelerators they work fine here (Ubuntu 8.04 with GTK+
2.12.9, GLib 2.16.4), they show up and I can access the corresponding
menu/action with my keyboard.
So, in the end, I think it is up to you devs :-) Maybe the amount of work
required to implement this feature in a clean manner is not worth the added
Anyway, thanks a lot for the work provided Enrico !
More information about the Devel