Remove the toolbox menu:

2008-03-21  Michael Natterer  <mitch@gimp.org>

	Remove the toolbox menu:

	* configure.in: remove --enable-toolbox-menu option.

	* menus/Makefile.am
	* menus/toolbox-menu.xml.in: removed.

	* menus/image-menu.xml.in: add the debug menu here.

	* menus/menus.xsl: remove transformations depending on whether
	there is a toolbox menu or not.

	* app/menus/Makefile.am
	* app/menus/toolbox-menu.[ch]: removed.

	* app/menus/menus.c: remove the toolbox menu but keep the
	<Toolbox> UI manager around so we can configure its actions
	separate from normal docks.

	* app/actions/image-actions.c (image_actions): remove the action
	for the toolbox menubar.

	* app/widgets/gimptoolbox.c: remove all menu code.

	* app/plug-in/plug-in-menu-path.c: map plug-in registered toolbox
	menu items to their new location in the image menu
	unconditionally.

	* plug-ins/common/screenshot.c
	* plug-ins/common/uniteditor.c
	* plug-ins/script-fu/script-fu.c
	* plug-ins/script-fu/scripts/web-browser.scm
	* plug-ins/twain/twain.c
	* plug-ins/winsnap/winsnap.c: remove menu registrations under
	<Toolbox>/File and change <Toolbox>/Help to <Image>/Help. Leave
	<Toolbox>/Xtns untouched until its final location and name are
	decided.


svn path=/trunk/; revision=25156
This commit is contained in:
Michael Natterer 2008-03-21 17:55:32 +00:00 committed by Michael Natterer
parent ec73e2f6ad
commit f63a7153ef
18 changed files with 66 additions and 200 deletions

View File

@ -1,3 +1,43 @@
2008-03-21 Michael Natterer <mitch@gimp.org>
Remove the toolbox menu:
* configure.in: remove --enable-toolbox-menu option.
* menus/Makefile.am
* menus/toolbox-menu.xml.in: removed.
* menus/image-menu.xml.in: add the debug menu here.
* menus/menus.xsl: remove transformations depending on whether
there is a toolbox menu or not.
* app/menus/Makefile.am
* app/menus/toolbox-menu.[ch]: removed.
* app/menus/menus.c: remove the toolbox menu but keep the
<Toolbox> UI manager around so we can configure its actions
separate from normal docks.
* app/actions/image-actions.c (image_actions): remove the action
for the toolbox menubar.
* app/widgets/gimptoolbox.c: remove all menu code.
* app/plug-in/plug-in-menu-path.c: map plug-in registered toolbox
menu items to their new location in the image menu
unconditionally.
* plug-ins/common/screenshot.c
* plug-ins/common/uniteditor.c
* plug-ins/script-fu/script-fu.c
* plug-ins/script-fu/scripts/web-browser.scm
* plug-ins/twain/twain.c
* plug-ins/winsnap/winsnap.c: remove menu registrations under
<Toolbox>/File and change <Toolbox>/Help to <Image>/Help. Leave
<Toolbox>/Xtns untouched until its final location and name are
decided.
2008-03-21 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.h (struct GimpDock): added member "ID"

View File

@ -43,10 +43,6 @@
static const GimpActionEntry image_actions[] =
{
{ "toolbox-menubar", NULL,
N_("Toolbox Menu"), NULL, NULL, NULL,
GIMP_HELP_TOOLBOX },
{ "image-menubar", NULL,
N_("Image Menu"), NULL, NULL, NULL,
GIMP_HELP_IMAGE_WINDOW },

View File

@ -16,8 +16,6 @@ libappmenus_a_SOURCES = \
plug-in-menus.h \
tool-options-menu.c \
tool-options-menu.h \
toolbox-menu.c \
toolbox-menu.h \
window-menu.c \
window-menu.h

View File

@ -48,7 +48,6 @@
#include "menus.h"
#include "plug-in-menus.h"
#include "tool-options-menu.h"
#include "toolbox-menu.h"
#include "gimp-intl.h"
@ -96,6 +95,7 @@ menus_init (Gimp *gimp,
gimp_menu_factory_manager_register (global_menu_factory, "<Image>",
"file",
"context",
"debug",
"help",
"edit",
"select",
@ -121,7 +121,6 @@ menus_init (Gimp *gimp,
gimp_menu_factory_manager_register (global_menu_factory, "<Toolbox>",
"file",
"context",
"debug",
"help",
"edit",
"select",
@ -135,8 +134,6 @@ menus_init (Gimp *gimp,
"plug-in",
"quick-mask",
NULL,
"/toolbox-menubar",
"toolbox-menu.xml", toolbox_menu_setup,
NULL);
gimp_menu_factory_manager_register (global_menu_factory, "<Dock>",

View File

@ -1,36 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "config.h"
#include <gtk/gtk.h>
#include "menus-types.h"
#include "file-menu.h"
#include "plug-in-menus.h"
#include "toolbox-menu.h"
void
toolbox_menu_setup (GimpUIManager *manager,
const gchar *ui_path)
{
file_menu_setup (manager, ui_path);
plug_in_menus_setup (manager, ui_path);
}

View File

@ -1,27 +0,0 @@
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __TOOLBOX_MENU_H__
#define __TOOLBOX_MENU_H__
void toolbox_menu_setup (GimpUIManager *manager,
const gchar *ui_path);
#endif /* __TOOLBOX_MENU_H__ */

View File

@ -40,10 +40,8 @@ struct _MenuPathMapping
static const MenuPathMapping menu_path_mappings[] =
{
#ifndef ENABLE_TOOLBOX_MENU
{ "<Toolbox>/Xtns", "<Image>/Xtns" },
{ "<Toolbox>/Help", "<Image>/Help" },
#endif /* ENABLE_TOOLBOX_MENU */
{ NULL, NULL }
};

View File

@ -178,7 +178,6 @@ gimp_toolbox_constructor (GType type,
GimpToolbox *toolbox;
GimpContext *context;
GimpGuiConfig *config;
GtkUIManager *manager;
GtkWidget *main_vbox;
GtkWidget *vbox;
GdkDisplay *display;
@ -200,18 +199,6 @@ gimp_toolbox_constructor (GType type,
gtk_box_reorder_child (GTK_BOX (main_vbox), vbox, 0);
gtk_widget_show (vbox);
manager = GTK_UI_MANAGER (GIMP_IMAGE_DOCK (toolbox)->ui_manager);
#ifdef ENABLE_TOOLBOX_MENU
toolbox->menu_bar = gtk_ui_manager_get_widget (manager, "/toolbox-menubar");
#endif /* ENABLE_TOOLBOX_MENU */
if (toolbox->menu_bar)
{
gtk_box_pack_start (GTK_BOX (vbox), toolbox->menu_bar, FALSE, FALSE, 0);
gtk_widget_show (toolbox->menu_bar);
}
toolbox->tool_wbox = gtk_hwrap_box_new (FALSE);
gtk_wrap_box_set_justify (GTK_WRAP_BOX (toolbox->tool_wbox), GTK_JUSTIFY_TOP);
gtk_wrap_box_set_line_justify (GTK_WRAP_BOX (toolbox->tool_wbox),

View File

@ -4,8 +4,7 @@ menudatadir = $(gimpdatadir)/menus
menudata_in_files = \
dockable-menu.xml.in \
image-menu.xml.in \
toolbox-menu.xml.in
image-menu.xml.in
menudata_built_files = $(menudata_in_files:.xml.in=.xml)
@ -52,15 +51,9 @@ if GIMP_UNSTABLE
DEBUG_MENU_PARAMS = --stringparam debug-menu yes
endif
if TOOLBOX_MENU
TOOLBOX_MENU_PARAMS = --stringparam toolbox-menu yes
else
TOOLBOX_MENU_PARAMS = --stringparam toolbox-menu no
endif
%.xml: %.xml.in $(srcdir)/menus.xsl dialogs-menuitems.xml
if HAVE_XSLTPROC
$(XSLTPROC) --xinclude $(DEBUG_MENU_PARAMS) $(TOOLBOX_MENU_PARAMS) $(srcdir)/menus.xsl $< > $(@) || rm -f $(@)
$(XSLTPROC) --xinclude $(DEBUG_MENU_PARAMS) $(srcdir)/menus.xsl $< > $(@) || rm -f $(@)
else
@echo "*** xsltproc is required to build the menus XML files ***"; exit 1;
endif

View File

@ -19,6 +19,15 @@
<menuitem action="dialogs-document-history" />
</menu>
<menu action="file-acquire-menu" name="Acquire" />
<!-- The debug-menu is automatically excluded for stable releases -->
<menu action="debug-menu" name="Debug">
<menuitem action="debug-mem-profile" />
<menuitem action="debug-dump-items" />
<menuitem action="debug-dump-managers" />
<menuitem action="debug-dump-attached-data" />
</menu>
<separator />
<placeholder name="Save">
<menuitem action="file-save" />

View File

@ -9,7 +9,6 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="debug-menu" />
<xsl:param name="toolbox-menu" />
<xsl:output method="xml"
version="1.0"
@ -45,18 +44,6 @@
</xsl:if>
</xsl:template>
<xsl:template match="menubar-and-popup/menu[@action='extensions-menu']">
<xsl:if test="$toolbox-menu='no'">
<xsl:call-template name="identity" />
</xsl:if>
</xsl:template>
<xsl:template match="menubar-and-popup/menu[@action='help-menu']">
<xsl:if test="$toolbox-menu='no'">
<xsl:call-template name="identity" />
</xsl:if>
</xsl:template>
<!-- need to strip the XInclude namespace declaration from the ui element -->
<xsl:template match="ui">
<ui>

View File

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ui xmlns:xi="http://www.w3.org/2001/XInclude">
<menubar action="toolbox-menubar">
<menu action="file-menu" name="File">
<placeholder name="New">
<menuitem action="image-new" />
</placeholder>
<placeholder name="Open">
<menuitem action="file-open" />
<menuitem action="file-open-location" />
</placeholder>
<menu action="file-open-recent-menu" name="Open Recent">
<placeholder name="Files" />
<separator />
<menuitem action="dialogs-document-history" />
</menu>
<menu action="file-acquire-menu" name="Acquire">
<menuitem action="edit-paste-as-new" />
</menu>
<separator />
<placeholder name="Preferences">
<menuitem action="dialogs-preferences" />
<menuitem action="dialogs-keyboard-shortcuts" />
</placeholder>
<menu action="dialogs-menu" name="Dialogs">
<menu action="dialogs-new-dock-menu" name="Create New Dock">
<menuitem action="dialogs-new-dock-lcp" />
<menuitem action="dialogs-new-dock-data" />
<menuitem action="dialogs-new-dock-stuff" />
</menu>
<xi:include href="dialogs-menuitems.xml" />
</menu>
<!-- The debug-menu is automatically excluded for stable releases -->
<menu action="debug-menu" name="Debug">
<menuitem action="debug-mem-profile" />
<menuitem action="debug-dump-items" />
<menuitem action="debug-dump-managers" />
<menuitem action="debug-dump-attached-data" />
</menu>
<separator />
<menuitem action="file-close-all" />
<menuitem action="file-quit" />
</menu>
<menu action="extensions-menu" name="Xtns">
<placeholder name="Extensions">
<menuitem action="dialogs-module-dialog" />
</placeholder>
<placeholder name="Languages" />
<separator />
</menu>
<menu action="help-menu" name="Help">
<menuitem action="help-help" />
<menuitem action="help-context-help" />
<menuitem action="dialogs-tips" />
<menuitem action="dialogs-about" />
<separator />
</menu>
</menubar>
<accelerator action="edit-paste"/>
</ui>

View File

@ -257,7 +257,6 @@ query (void)
G_N_ELEMENTS (return_vals),
args, return_vals);
gimp_plugin_menu_register (PLUG_IN_PROC, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/File/Acquire");
gimp_plugin_icon_register (PLUG_IN_PROC, GIMP_ICON_TYPE_INLINE_PIXBUF,
screenshot_icon);

View File

@ -153,7 +153,6 @@ query (void)
G_N_ELEMENTS (args), 0,
args, NULL);
gimp_plugin_menu_register (PLUG_IN_PROC, "<Toolbox>/File/Preferences");
gimp_plugin_menu_register (PLUG_IN_PROC, "<Image>/Edit/Preferences");
gimp_plugin_icon_register (PLUG_IN_PROC, GIMP_ICON_TYPE_STOCK_ID,
(const guint8 *) GIMP_STOCK_TOOL_MEASURE);

View File

@ -298,8 +298,8 @@ script_fu_extension_init (void)
{ GIMP_PDB_INT32, "run-mode", "[Interactive], non-interactive" }
};
gimp_plugin_menu_branch_register ("<Toolbox>/Help", N_("_GIMP Online"));
gimp_plugin_menu_branch_register ("<Toolbox>/Help", N_("_User Manual"));
gimp_plugin_menu_branch_register ("<Image>/Help", N_("_GIMP Online"));
gimp_plugin_menu_branch_register ("<Image>/Help", N_("_User Manual"));
gimp_plugin_menu_branch_register ("<Toolbox>/Xtns/Languages",
N_("_Script-Fu"));

View File

@ -66,7 +66,7 @@
)
(script-fu-menu-register "gimp-help-2-concepts-paths"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-web"
@ -79,7 +79,7 @@
)
(script-fu-menu-register "gimp-help-2-using-web"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-photography"
@ -92,7 +92,7 @@
)
(script-fu-menu-register "gimp-help-2-using-photography"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-fileformats"
@ -105,7 +105,7 @@
)
(script-fu-menu-register "gimp-help-2-using-fileformats"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-concepts-usage"
@ -118,7 +118,7 @@
)
(script-fu-menu-register "gimp-help-2-concepts-usage"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-docks"
@ -131,7 +131,7 @@
)
(script-fu-menu-register "gimp-help-2-using-docks"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-simpleobjects"
@ -144,7 +144,7 @@
)
(script-fu-menu-register "gimp-help-2-using-simpleobjects"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
(script-fu-register "gimp-help-2-using-selections"
@ -157,7 +157,7 @@
)
(script-fu-menu-register "gimp-help-2-using-simpleobjects"
"<Toolbox>/Help/User Manual")
"<Image>/Help/User Manual")
;; Links to GIMP related web sites
@ -185,7 +185,7 @@
)
(script-fu-menu-register "gimp-online-main-web-site"
"<Toolbox>/Help/GIMP Online")
"<Image>/Help/GIMP Online")
(script-fu-register "gimp-online-developer-web-site"
@ -198,7 +198,7 @@
)
(script-fu-menu-register "gimp-online-developer-web-site"
"<Toolbox>/Help/GIMP Online")
"<Image>/Help/GIMP Online")
(script-fu-register "gimp-online-docs-web-site"
@ -211,7 +211,7 @@
)
(script-fu-menu-register "gimp-online-docs-web-site"
"<Toolbox>/Help/GIMP Online")
"<Image>/Help/GIMP Online")
(script-fu-register "gimp-online-plug-in-web-site"
@ -224,4 +224,4 @@
)
(script-fu-menu-register "gimp-online-plug-in-web-site"
"<Toolbox>/Help/GIMP Online")
"<Image>/Help/GIMP Online")

View File

@ -318,7 +318,6 @@ query (void)
args,
return_vals);
gimp_plugin_menu_register (PLUG_IN_D_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_D_NAME, "<Image>/File/Acquire");
}
else if (twain_run_mode == RUN_READDUMP)
@ -338,7 +337,6 @@ query (void)
args,
return_vals);
gimp_plugin_menu_register (PLUG_IN_R_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_R_NAME, "<Image>/File/Acquire");
}
else
@ -359,7 +357,6 @@ query (void)
args,
return_vals);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/File/Acquire");
}
}

View File

@ -998,7 +998,6 @@ query(void)
args,
return_vals);
gimp_plugin_menu_register (PLUG_IN_NAME, "<Toolbox>/File/Acquire");
gimp_plugin_menu_register (PLUG_IN_NAME, "<Image>/File/Acquire");
}