about ten days ago I wrote:

> Since "Copy Visible" is a script, it can't be moved next to "Copy". At
> least not with the current menu system. Mitch is currently replacing
> it with GtkUIManager. We will see if it offers a better solution.

The good news is that this problem has indeed been solved by the port
to GtkUIManager. The new GTK+ API allows for named placeholders in the
menu hierarchy. This allows to group the menu items so that plug-ins
and scripts can register into the group they belong to. They still get
added at the end of the group but that's not necessarily the end of
the menu. The current CVS version now has "Copy Visible" next to
"Copy" :)

In case anyone cares, here's an excerpt from the XML file that defines
the image menu:

    <menu action="edit-menu" name="Edit">
      <menuitem action="edit-undo"/>
      <menuitem action="edit-redo"/>
      <menuitem action="dialogs-undo-history"/>
      <placeholder name="Cut">
        <menuitem action="edit-cut"/>
      <placeholder name="Copy">
        <menuitem action="edit-copy"/>
      <placeholder name="Paste">
        <menuitem action="edit-paste"/>
        <menuitem action="edit-paste-into"/>
        <menuitem action="edit-paste-as-new"/>
      <menu action="edit-buffer-menu" name="Buffer">
        <menuitem action="edit-named-cut"/>
        <menuitem action="edit-named-copy"/>
        <menuitem action="edit-named-paste"/>
      <menuitem action="edit-clear"/>
      <menuitem action="edit-fill-fg"/>
      <menuitem action="edit-fill-bg"/>
      <menuitem action="edit-fill-pattern"/>
      <menuitem action="edit-stroke"/>
      <menuitem action="vectors-stroke"/>

This stuff is found in the new toplevel source directory "menus".

Gimp-developer mailing list

Reply via email to