From d3439fc3afd08e93126bdabb3430cada4b3137f0 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 6 May 2004 07:41:53 +0000 Subject: [PATCH] configure.in app/Makefile.am app/menus/.cvsignore app/menus/Makefile.am 2004-05-06 Michael Natterer * configure.in * app/Makefile.am * app/menus/.cvsignore * app/menus/Makefile.am * app/menus/menus-types.h * app/menus/menus.[ch] * app/menus/file-open-menu.[ch] * app/menus/file-save-menu.[ch] * app/menus/image-menu.[ch] * app/menus/plug-in-menus.[ch] * app/menus/tool-options-menu.[ch] * app/menus/toolbox-menu.[ch]: moved all menus files to their own directory. * app/gui/Makefile.am * app/gui/menus.[ch] * app/gui/file-open-menu.[ch] * app/gui/file-save-menu.[ch] * app/gui/image-menu.[ch] * app/gui/plug-in-menus.[ch] * app/gui/tool-options-menu.[ch] * app/gui/toolbox-menu.[ch]: removed them here. * app/actions/debug-commands.c * app/actions/file-commands.c * app/gui/brush-select.c * app/gui/dialogs.c * app/gui/font-select.c * app/gui/gradient-select.c * app/gui/gui-vtable.c * app/gui/gui.c * app/gui/palette-select.c * app/gui/pattern-select.c * app/gui/preferences-dialog.c: changed #includes accordingly. --- ChangeLog | 37 ++ app/Makefile.am | 2 + app/actions/debug-commands.c | 3 +- app/actions/file-commands.c | 3 +- app/dialogs/dialogs.c | 3 +- app/dialogs/preferences-dialog.c | 3 +- app/gui/Makefile.am | 17 - app/gui/brush-select.c | 3 +- app/gui/dialogs.c | 3 +- app/gui/file-open-menu.c | 64 ---- app/gui/file-open-menu.h | 27 -- app/gui/file-save-menu.c | 64 ---- app/gui/file-save-menu.h | 27 -- app/gui/font-select.c | 3 +- app/gui/gradient-select.c | 3 +- app/gui/gui-vtable.c | 5 +- app/gui/gui.c | 3 +- app/gui/image-menu.c | 36 -- app/gui/menus.c | 362 ------------------ app/gui/menus.h | 36 -- app/gui/palette-select.c | 3 +- app/gui/pattern-select.c | 3 +- app/gui/plug-in-menus.c | 296 -------------- app/gui/plug-in-menus.h | 36 -- app/gui/preferences-dialog.c | 3 +- app/gui/tool-options-menu.c | 164 -------- app/gui/tool-options-menu.h | 27 -- app/gui/toolbox-menu.c | 36 -- app/gui/toolbox-menu.h | 27 -- app/menus/.cvsignore | 6 + app/menus/Makefile.am | 37 ++ app/menus/file-open-menu.c | 2 +- app/menus/file-save-menu.c | 2 +- app/menus/image-menu.c | 2 +- app/{gui/image-menu.h => menus/menus-types.h} | 9 +- app/menus/menus.c | 2 +- app/menus/plug-in-menus.c | 2 +- app/menus/tool-options-menu.c | 2 +- app/menus/toolbox-menu.c | 2 +- configure.in | 1 + 40 files changed, 121 insertions(+), 1245 deletions(-) delete mode 100644 app/gui/file-open-menu.c delete mode 100644 app/gui/file-open-menu.h delete mode 100644 app/gui/file-save-menu.c delete mode 100644 app/gui/file-save-menu.h delete mode 100644 app/gui/image-menu.c delete mode 100644 app/gui/menus.c delete mode 100644 app/gui/menus.h delete mode 100644 app/gui/plug-in-menus.c delete mode 100644 app/gui/plug-in-menus.h delete mode 100644 app/gui/tool-options-menu.c delete mode 100644 app/gui/tool-options-menu.h delete mode 100644 app/gui/toolbox-menu.c delete mode 100644 app/gui/toolbox-menu.h create mode 100644 app/menus/.cvsignore create mode 100644 app/menus/Makefile.am rename app/{gui/image-menu.h => menus/menus-types.h} (82%) diff --git a/ChangeLog b/ChangeLog index 21c39a8603..57b16d577b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2004-05-06 Michael Natterer + + * configure.in + * app/Makefile.am + * app/menus/.cvsignore + * app/menus/Makefile.am + * app/menus/menus-types.h + * app/menus/menus.[ch] + * app/menus/file-open-menu.[ch] + * app/menus/file-save-menu.[ch] + * app/menus/image-menu.[ch] + * app/menus/plug-in-menus.[ch] + * app/menus/tool-options-menu.[ch] + * app/menus/toolbox-menu.[ch]: moved all menus files to their + own directory. + + * app/gui/Makefile.am + * app/gui/menus.[ch] + * app/gui/file-open-menu.[ch] + * app/gui/file-save-menu.[ch] + * app/gui/image-menu.[ch] + * app/gui/plug-in-menus.[ch] + * app/gui/tool-options-menu.[ch] + * app/gui/toolbox-menu.[ch]: removed them here. + + * app/actions/debug-commands.c + * app/actions/file-commands.c + * app/gui/brush-select.c + * app/gui/dialogs.c + * app/gui/font-select.c + * app/gui/gradient-select.c + * app/gui/gui-vtable.c + * app/gui/gui.c + * app/gui/palette-select.c + * app/gui/pattern-select.c + * app/gui/preferences-dialog.c: changed #includes accordingly. + 2004-05-05 Sven Neumann * app/gui/file-new-dialog.c: use a normal GimpDialog instead of a diff --git a/app/Makefile.am b/app/Makefile.am index 9b06c661e2..5abfa5ba83 100644 --- a/app/Makefile.am +++ b/app/Makefile.am @@ -23,6 +23,7 @@ SUBDIRS = \ widgets \ display \ actions \ + menus \ gui \ pdb @@ -96,6 +97,7 @@ gimp_2_1_LDFLAGS = \ gimp_2_1_LDADD = \ config/libappconfig.a \ gui/libappgui.a \ + menus/libappmenus.a \ actions/libappactions.a \ display/libappdisplay.a \ tools/libapptools.a \ diff --git a/app/actions/debug-commands.c b/app/actions/debug-commands.c index f988a97388..6bda12a826 100644 --- a/app/actions/debug-commands.c +++ b/app/actions/debug-commands.c @@ -31,8 +31,9 @@ #include "widgets/gimpmenufactory.h" #include "widgets/gimpuimanager.h" +#include "menus/menus.h" + #include "debug-commands.h" -#include "gui/menus.h" #ifdef ENABLE_DEBUG_MENU diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c index 92a2b7fef8..d74ac9b767 100644 --- a/app/actions/file-commands.c +++ b/app/actions/file-commands.c @@ -45,11 +45,12 @@ #include "display/gimpdisplay.h" #include "display/gimpdisplay-foreach.h" +#include "menus/menus.h" + #include "gui/dialogs.h" #include "gui/file-new-dialog.h" #include "gui/file-open-dialog.h" #include "gui/file-save-dialog.h" -#include "gui/menus.h" #include "actions.h" #include "file-commands.h" diff --git a/app/dialogs/dialogs.c b/app/dialogs/dialogs.c index f337dacef6..be62c6b50e 100644 --- a/app/dialogs/dialogs.c +++ b/app/dialogs/dialogs.c @@ -27,9 +27,10 @@ #include "widgets/gimpdialogfactory.h" +#include "menus/menus.h" + #include "dialogs.h" #include "dialogs-constructors.h" -#include "menus.h" GimpDialogFactory *global_dialog_factory = NULL; diff --git a/app/dialogs/preferences-dialog.c b/app/dialogs/preferences-dialog.c index c254fb2764..3db6d8d8c4 100644 --- a/app/dialogs/preferences-dialog.c +++ b/app/dialogs/preferences-dialog.c @@ -47,7 +47,8 @@ #include "widgets/gimptemplateeditor.h" #include "widgets/gimpwidgets-utils.h" -#include "menus.h" +#include "menus/menus.h" + #include "resolution-calibrate-dialog.h" #include "session.h" #include "themes.h" diff --git a/app/gui/Makefile.am b/app/gui/Makefile.am index 7d8be59985..4f09513773 100644 --- a/app/gui/Makefile.am +++ b/app/gui/Makefile.am @@ -58,25 +58,8 @@ dialogs_sources = \ user-install-dialog.c \ user-install-dialog.h -menus_sources = \ - file-open-menu.c \ - file-open-menu.h \ - file-save-menu.c \ - file-save-menu.h \ - image-menu.c \ - image-menu.h \ - menus.c \ - menus.h \ - plug-in-menus.c \ - plug-in-menus.h \ - tool-options-menu.c \ - tool-options-menu.h \ - toolbox-menu.c \ - toolbox-menu.h - libappgui_a_SOURCES = \ $(dialogs_sources) \ - $(menus_sources) \ authors.h \ color-history.c \ color-history.h \ diff --git a/app/gui/brush-select.c b/app/gui/brush-select.c index fcc7b6afb3..3b642c106f 100644 --- a/app/gui/brush-select.c +++ b/app/gui/brush-select.c @@ -41,9 +41,10 @@ #include "widgets/gimphelp-ids.h" #include "widgets/gimpwidgets-constructors.h" +#include "menus/menus.h" + #include "brush-select.h" #include "dialogs-constructors.h" -#include "menus.h" #include "gimp-intl.h" diff --git a/app/gui/dialogs.c b/app/gui/dialogs.c index f337dacef6..be62c6b50e 100644 --- a/app/gui/dialogs.c +++ b/app/gui/dialogs.c @@ -27,9 +27,10 @@ #include "widgets/gimpdialogfactory.h" +#include "menus/menus.h" + #include "dialogs.h" #include "dialogs-constructors.h" -#include "menus.h" GimpDialogFactory *global_dialog_factory = NULL; diff --git a/app/gui/file-open-menu.c b/app/gui/file-open-menu.c deleted file mode 100644 index b1d94e6d1e..0000000000 --- a/app/gui/file-open-menu.c +++ /dev/null @@ -1,64 +0,0 @@ -/* The GIMP -- an 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 - -#include - -#include "gui-types.h" - -#include "core/gimp.h" - -#include "plug-in/plug-in-proc.h" - -#include "widgets/gimpuimanager.h" - -#include "file-open-menu.h" - - -void -file_open_menu_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - GSList *list; - guint merge_id; - - merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); - - for (list = manager->gimp->load_procs; list; list = g_slist_next (list)) - { - PlugInProcDef *file_proc = list->data; - gchar *path; - - if (! strcmp (file_proc->db_info.name, "gimp_xcf_load")) - path = g_strdup_printf ("%s/%s", ui_path, "Internal"); - else - path = g_strdup (ui_path); - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - path, - file_proc->db_info.name, - file_proc->db_info.name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_free (path); - } -} diff --git a/app/gui/file-open-menu.h b/app/gui/file-open-menu.h deleted file mode 100644 index b14e4679be..0000000000 --- a/app/gui/file-open-menu.h +++ /dev/null @@ -1,27 +0,0 @@ -/* The GIMP -- an open 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 __FILE_OPEN_MENU_H__ -#define __FILE_OPEN_MENU_H__ - - -void file_open_menu_setup (GimpUIManager *manager, - const gchar *ui_path); - - -#endif /* __FILE_OPEN_MENU_H__ */ diff --git a/app/gui/file-save-menu.c b/app/gui/file-save-menu.c deleted file mode 100644 index 9071bee57f..0000000000 --- a/app/gui/file-save-menu.c +++ /dev/null @@ -1,64 +0,0 @@ -/* The GIMP -- an 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 - -#include - -#include "gui-types.h" - -#include "core/gimp.h" - -#include "plug-in/plug-in-proc.h" - -#include "widgets/gimpuimanager.h" - -#include "file-save-menu.h" - - -void -file_save_menu_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - GSList *list; - guint merge_id; - - merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); - - for (list = manager->gimp->save_procs; list; list = g_slist_next (list)) - { - PlugInProcDef *file_proc = list->data; - gchar *path; - - if (! strcmp (file_proc->db_info.name, "gimp_xcf_save")) - path = g_strdup_printf ("%s/%s", ui_path, "Internal"); - else - path = g_strdup (ui_path); - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - path, - file_proc->db_info.name, - file_proc->db_info.name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_free (path); - } -} diff --git a/app/gui/file-save-menu.h b/app/gui/file-save-menu.h deleted file mode 100644 index 073501232d..0000000000 --- a/app/gui/file-save-menu.h +++ /dev/null @@ -1,27 +0,0 @@ -/* The GIMP -- an open 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 __FILE_SAVE_MENU_H__ -#define __FILE_SAVE_MENU_H__ - - -void file_save_menu_setup (GimpUIManager *manager, - const gchar *ui_path); - - -#endif /* __FILE_SAVE_MENU_H__ */ diff --git a/app/gui/font-select.c b/app/gui/font-select.c index 961393f35d..334ae0bec7 100644 --- a/app/gui/font-select.c +++ b/app/gui/font-select.c @@ -37,8 +37,9 @@ #include "widgets/gimpcontainertreeview.h" #include "widgets/gimphelp-ids.h" +#include "menus/menus.h" + #include "dialogs-constructors.h" -#include "menus.h" #include "font-select.h" #include "gimp-intl.h" diff --git a/app/gui/gradient-select.c b/app/gui/gradient-select.c index a2b57cc886..4eb57defe1 100644 --- a/app/gui/gradient-select.c +++ b/app/gui/gradient-select.c @@ -39,9 +39,10 @@ #include "widgets/gimpdatafactoryview.h" #include "widgets/gimphelp-ids.h" +#include "menus/menus.h" + #include "dialogs-constructors.h" #include "gradient-select.h" -#include "menus.h" #include "gimp-intl.h" diff --git a/app/gui/gui-vtable.c b/app/gui/gui-vtable.c index ef20eee882..941dd39f6d 100644 --- a/app/gui/gui-vtable.c +++ b/app/gui/gui-vtable.c @@ -48,14 +48,15 @@ #include "actions/plug-in-actions.h" +#include "menus/menus.h" +#include "menus/plug-in-menus.h" + #include "brush-select.h" #include "dialogs.h" #include "font-select.h" #include "gradient-select.h" -#include "menus.h" #include "palette-select.h" #include "pattern-select.h" -#include "plug-in-menus.h" #include "themes.h" diff --git a/app/gui/gui.c b/app/gui/gui.c index 91bbaa117e..1bc01b22e8 100644 --- a/app/gui/gui.c +++ b/app/gui/gui.c @@ -58,11 +58,12 @@ #include "actions/actions.h" #include "actions/dialogs-commands.h" +#include "menus/menus.h" + #include "color-history.h" #include "dialogs.h" #include "gui.h" #include "gui-vtable.h" -#include "menus.h" #include "session.h" #include "splash.h" #include "themes.h" diff --git a/app/gui/image-menu.c b/app/gui/image-menu.c deleted file mode 100644 index 8864adaa6d..0000000000 --- a/app/gui/image-menu.c +++ /dev/null @@ -1,36 +0,0 @@ -/* The GIMP -- an 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 - -#include "gui-types.h" - -#include "image-menu.h" -#include "menus.h" -#include "plug-in-menus.h" - - -void -image_menu_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - menus_open_recent_add (manager, ui_path); - plug_in_menus_setup (manager, ui_path); -} diff --git a/app/gui/menus.c b/app/gui/menus.c deleted file mode 100644 index e9f1f50995..0000000000 --- a/app/gui/menus.c +++ /dev/null @@ -1,362 +0,0 @@ -/* The GIMP -- an 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 - -#include "libgimpbase/gimpbase.h" -#include "libgimpwidgets/gimpwidgets.h" - -#include "gui-types.h" - -#include "config/gimpguiconfig.h" - -#include "core/gimp.h" -#include "core/gimpcontainer.h" -#include "core/gimpcontext.h" - -#include "file/file-utils.h" - -#include "widgets/gimphelp-ids.h" -#include "widgets/gimpmenufactory.h" -#include "widgets/gimpuimanager.h" - -#include "actions/actions.h" - -#include "file-open-menu.h" -#include "file-save-menu.h" -#include "image-menu.h" -#include "menus.h" -#include "tool-options-menu.h" -#include "toolbox-menu.h" - -#include "gimp-intl.h" - - -/* local function prototypes */ - -static void menu_can_change_accels (GimpGuiConfig *config); - - -/* global variables */ - -GimpMenuFactory *global_menu_factory = NULL; - - -/* private variables */ - -static gboolean menus_initialized = FALSE; - - -/* public functions */ - -void -menus_init (Gimp *gimp) -{ - g_return_if_fail (GIMP_IS_GIMP (gimp)); - g_return_if_fail (menus_initialized == FALSE); - - menus_initialized = TRUE; - - /* We need to make sure the property is installed before using it */ - g_type_class_ref (GTK_TYPE_MENU); - - menu_can_change_accels (GIMP_GUI_CONFIG (gimp->config)); - - g_signal_connect (gimp->config, "notify::can-change-accels", - G_CALLBACK (menu_can_change_accels), NULL); - - global_menu_factory = gimp_menu_factory_new (gimp, global_action_factory); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "file", - "debug", - "help", - "edit", - "select", - "view", - "image", - "drawable", - "layers", - "channels", - "vectors", - "tools", - "dialogs", - "plug-in", - "qmask", - NULL, - "/toolbox-menubar", - "toolbox-menu.xml", toolbox_menu_setup, - "/image-menubar", - "image-menu.xml", image_menu_setup, - "/image-popup", - "image-menu.xml", image_menu_setup, - "/qmask-popup", - "qmask-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "file", - "edit", - "select", - "image", - "drawable", - "layers", - "channels", - "vectors", - "tools", - "dialogs", - "plug-in", - "qmask", - NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "file-open", - NULL, - "/file-open-popup", - "file-open-menu.xml", - file_open_menu_setup, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "file-save", - NULL, - "/file-save-popup", - "file-save-menu.xml", - file_save_menu_setup, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "layers", - NULL, - "/layers-popup", - "layers-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "channels", - NULL, - "/channels-popup", - "channels-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "vectors", - NULL, - "/vectors-popup", - "vectors-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "dockable", - NULL, - "/dockable-popup", - "dockable-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "brushes", - NULL, - "/brushes-popup", - "brushes-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "patterns", - NULL, - "/patterns-popup", - "patterns-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "gradients", - NULL, - "/gradients-popup", - "gradients-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "palettes", - NULL, - "/palettes-popup", - "palettes-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "fonts", - NULL, - "/fonts-popup", - "fonts-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "buffers", - NULL, - "/buffers-popup", - "buffers-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "documents", - NULL, - "/documents-popup", - "documents-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "templates", - NULL, - "/templates-popup", - "templates-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "images", - NULL, - "/images-popup", - "images-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "gradient-editor", - NULL, - "/gradient-editor-popup", - "gradient-editor-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "palette-editor", - NULL, - "/palette-editor-popup", - "palette-editor-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "colormap-editor", - NULL, - "/colormap-editor-popup", - "colormap-editor-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "error-console", - NULL, - "/error-console-popup", - "error-console-menu.xml", NULL, - NULL); - - gimp_menu_factory_manager_register (global_menu_factory, "", - "tool-options", - NULL, - "/tool-options-popup", - "tool-options-menu.xml", - tool_options_menu_setup, - NULL); -} - -void -menus_exit (Gimp *gimp) -{ - g_return_if_fail (GIMP_IS_GIMP (gimp)); - - g_object_unref (global_menu_factory); - global_menu_factory = NULL; - - g_signal_handlers_disconnect_by_func (gimp->config, - menu_can_change_accels, - NULL); -} - -void -menus_restore (Gimp *gimp) -{ - gchar *filename; - - g_return_if_fail (GIMP_IS_GIMP (gimp)); - - filename = gimp_personal_rc_file ("menurc"); - gtk_accel_map_load (filename); - g_free (filename); -} - -void -menus_save (Gimp *gimp) -{ - gchar *filename; - - g_return_if_fail (GIMP_IS_GIMP (gimp)); - - filename = gimp_personal_rc_file ("menurc"); - gtk_accel_map_save (filename); - g_free (filename); -} - -void -menus_clear (Gimp *gimp) -{ - g_return_if_fail (GIMP_IS_GIMP (gimp)); - - g_print ("TODO: implement menus_clear()\n"); -} - -void -menus_open_recent_add (GimpUIManager *manager, - const gchar *ui_path) -{ - gint n_entries; - guint merge_id; - gint i; - - g_return_if_fail (GIMP_IS_UI_MANAGER (manager)); - g_return_if_fail (ui_path != NULL); - - n_entries = GIMP_GUI_CONFIG (manager->gimp->config)->last_opened_size; - - merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); - - for (i = 0; i < n_entries; i++) - { - gchar *action_name; - gchar *action_path; - - action_name = g_strdup_printf ("file-open-recent-%02d", i + 1); - action_path = g_strdup_printf ("%s/File/Open Recent/file-open-recent-placeholder", - ui_path); - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - action_path, action_name, action_name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_free (action_name); - g_free (action_path); - } -} - - -/* private functions */ - -static void -menu_can_change_accels (GimpGuiConfig *config) -{ - g_object_set (gtk_settings_get_for_screen (gdk_screen_get_default ()), - "gtk-can-change-accels", config->can_change_accels, - NULL); -} diff --git a/app/gui/menus.h b/app/gui/menus.h deleted file mode 100644 index 3e1e49a311..0000000000 --- a/app/gui/menus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* The GIMP -- an 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 __MENUS_H__ -#define __MENUS_H__ - - -extern GimpMenuFactory *global_menu_factory; - - -void menus_init (Gimp *gimp); -void menus_exit (Gimp *gimp); -void menus_restore (Gimp *gimp); -void menus_save (Gimp *gimp); -void menus_clear (Gimp *gimp); - -void menus_open_recent_add (GimpUIManager *manager, - const gchar *ui_path); - - -#endif /* __MENUS_H__ */ diff --git a/app/gui/palette-select.c b/app/gui/palette-select.c index 2d0582da22..1d673c2aee 100644 --- a/app/gui/palette-select.c +++ b/app/gui/palette-select.c @@ -39,8 +39,9 @@ #include "widgets/gimpdatafactoryview.h" #include "widgets/gimphelp-ids.h" +#include "menus/menus.h" + #include "dialogs-constructors.h" -#include "menus.h" #include "palette-select.h" #include "gimp-intl.h" diff --git a/app/gui/pattern-select.c b/app/gui/pattern-select.c index 296ed36f4b..01b55d8efe 100644 --- a/app/gui/pattern-select.c +++ b/app/gui/pattern-select.c @@ -40,7 +40,8 @@ #include "widgets/gimpdatafactoryview.h" #include "widgets/gimphelp-ids.h" -#include "menus.h" +#include "menus/menus.h" + #include "pattern-select.h" #include "gimp-intl.h" diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c deleted file mode 100644 index 59d36649eb..0000000000 --- a/app/gui/plug-in-menus.c +++ /dev/null @@ -1,296 +0,0 @@ -/* The GIMP -- an 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 "string.h" - -#include - -#include "libgimpbase/gimpbase.h" - -#include "gui-types.h" - -#include "core/gimp.h" - -#include "plug-in/plug-ins.h" -#include "plug-in/plug-in-def.h" -#include "plug-in/plug-in-proc.h" - -#include "widgets/gimpuimanager.h" - -#include "plug-in-menus.h" - -#include "gimp-intl.h" - - -/* local function prototypes */ - -static gboolean plug_in_menus_tree_traverse (gpointer foo, - PlugInProcDef *proc_def, - GimpUIManager *manager); -static void plug_in_menus_build_path (GimpUIManager *manager, - const gchar *ui_path, - guint merge_id, - const gchar *path); - - -/* public functions */ - -void -plug_in_menus_init (Gimp *gimp, - GSList *plug_in_defs, - const gchar *std_plugins_domain) -{ - GSList *domains = NULL; - GSList *tmp; - - g_return_if_fail (std_plugins_domain != NULL); - - domains = g_slist_append (domains, (gpointer) std_plugins_domain); - - bindtextdomain (std_plugins_domain, gimp_locale_directory ()); -#ifdef HAVE_BIND_TEXTDOMAIN_CODESET - bind_textdomain_codeset (std_plugins_domain, "UTF-8"); -#endif - - for (tmp = plug_in_defs; tmp; tmp = g_slist_next (tmp)) - { - PlugInDef *plug_in_def; - const gchar *locale_domain; - const gchar *locale_path; - GSList *list; - - plug_in_def = (PlugInDef *) tmp->data; - - if (! plug_in_def->proc_defs) - continue; - - locale_domain = plug_ins_locale_domain (gimp, - plug_in_def->prog, - &locale_path); - - for (list = domains; list; list = list->next) - if (! strcmp (locale_domain, (const gchar *) list->data)) - break; - - if (! list) - { - domains = g_slist_append (domains, (gpointer) locale_domain); - - bindtextdomain (locale_domain, locale_path); -#ifdef HAVE_BIND_TEXTDOMAIN_CODESET - bind_textdomain_codeset (locale_domain, "UTF-8"); -#endif - } - } - - g_slist_free (domains); -} - -void -plug_in_menus_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - GTree *menu_entries; - GSList *list; - - g_return_if_fail (GIMP_IS_UI_MANAGER (manager)); - g_return_if_fail (ui_path != NULL); - - menu_entries = g_tree_new_full ((GCompareDataFunc) g_utf8_collate, NULL, - g_free, NULL); - - for (list = manager->gimp->plug_in_proc_defs; - list; - list = g_slist_next (list)) - { - PlugInProcDef *proc_def = list->data; - - if (proc_def->prog && - proc_def->menu_path && - ! proc_def->extensions && - ! proc_def->prefixes && - ! proc_def->magics) - { - if ((! strncmp (proc_def->menu_path, "", 9) && - ! strcmp (ui_path, "/toolbox-menubar")) || - (! strncmp (proc_def->menu_path, "", 7) && - (! strcmp (ui_path, "/image-menubar") || - ! strcmp (ui_path, "/image-popup")))) - { - const gchar *progname; - const gchar *locale_domain; - gchar *key; - - progname = plug_in_proc_def_get_progname (proc_def); - - locale_domain = plug_ins_locale_domain (manager->gimp, - progname, NULL); - - key = gimp_strip_uline (dgettext (locale_domain, - proc_def->menu_path)); - g_tree_insert (menu_entries, key, proc_def); - } - } - } - - g_object_set_data (G_OBJECT (manager), "ui-path", (gpointer) ui_path); - - g_tree_foreach (menu_entries, - (GTraverseFunc) plug_in_menus_tree_traverse, - manager); - - g_object_set_data (G_OBJECT (manager), "ui-path", NULL); - - g_tree_destroy (menu_entries); -} - -void -plug_in_menus_add_proc (GimpUIManager *manager, - const gchar *ui_path, - PlugInProcDef *proc_def) -{ - gchar *path; - gchar *p; - - g_return_if_fail (GIMP_IS_UI_MANAGER (manager)); - g_return_if_fail (ui_path != NULL); - g_return_if_fail (proc_def != NULL); - - path = g_strdup (proc_def->menu_path); - - p = strrchr (path, '/'); - - if (p) - { - gchar *action_path; - gchar *merge_key; - guint merge_id; - - *p = '\0'; - - merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); - - plug_in_menus_build_path (manager, ui_path, merge_id, path); - - action_path = g_strdup_printf ("%s%s", ui_path, strchr (path, '/')); - -#if 0 - g_print ("adding UI for '%s' (@ %s)\n", - proc_def->db_info.name, action_path); -#endif - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - action_path, - proc_def->db_info.name, - proc_def->db_info.name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_free (action_path); - - merge_key = g_strdup_printf ("%s-merge-id", proc_def->db_info.name); - g_object_set_data (G_OBJECT (manager), merge_key, - GUINT_TO_POINTER (merge_id)); - g_free (merge_key); - } - - g_free (path); -} - -void -plug_in_menus_remove_proc (GimpUIManager *manager, - PlugInProcDef *proc_def) -{ - gchar *merge_key; - guint merge_id; - - g_return_if_fail (GIMP_IS_UI_MANAGER (manager)); - g_return_if_fail (proc_def != NULL); - - merge_key = g_strdup_printf ("%s-merge-id", proc_def->db_info.name); - merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager), - merge_key)); - g_free (merge_key); - - if (merge_id) - gtk_ui_manager_remove_ui (GTK_UI_MANAGER (manager), merge_id); -} - - -/* private functions */ - -static gboolean -plug_in_menus_tree_traverse (gpointer foo, - PlugInProcDef *proc_def, - GimpUIManager *manager) -{ - const gchar *ui_path = g_object_get_data (G_OBJECT (manager), "ui-path"); - - plug_in_menus_add_proc (manager, ui_path, proc_def); - - return FALSE; -} - -static void -plug_in_menus_build_path (GimpUIManager *manager, - const gchar *ui_path, - guint merge_id, - const gchar *path) -{ - gchar *action_path; - - action_path = g_strdup_printf ("%s%s", ui_path, strchr (path, '/')); - - if (! gtk_ui_manager_get_widget (GTK_UI_MANAGER (manager), action_path)) - { - gchar *base_path = g_strdup (path); - gchar *p; - - p = strrchr (base_path, '/'); - - if (p) - { - gchar *name; - - *p = '\0'; - - plug_in_menus_build_path (manager, ui_path, merge_id, base_path); - - p = strrchr (action_path, '/'); - *p = '\0'; - -#if 0 - g_print ("adding UI for '%s' (@ %s)\n", - path, action_path); -#endif - - name = strrchr (path, '/') + 1; - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - action_path, name, path, - GTK_UI_MANAGER_MENU, - FALSE); - } - - g_free (base_path); - } - - g_free (action_path); -} diff --git a/app/gui/plug-in-menus.h b/app/gui/plug-in-menus.h deleted file mode 100644 index 20a9885527..0000000000 --- a/app/gui/plug-in-menus.h +++ /dev/null @@ -1,36 +0,0 @@ -/* The GIMP -- an 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 __PLUG_IN_MENUS_H__ -#define __PLUG_IN_MENUS_H__ - - -void plug_in_menus_init (Gimp *gimp, - GSList *plug_in_defs, - const gchar *std_plugins_domain); - -void plug_in_menus_setup (GimpUIManager *manager, - const gchar *ui_path); -void plug_in_menus_add_proc (GimpUIManager *manager, - const gchar *ui_path, - PlugInProcDef *proc_def); -void plug_in_menus_remove_proc (GimpUIManager *manager, - PlugInProcDef *proc_def); - - -#endif /* __PLUG_IN_MENUS_H__ */ diff --git a/app/gui/preferences-dialog.c b/app/gui/preferences-dialog.c index c254fb2764..3db6d8d8c4 100644 --- a/app/gui/preferences-dialog.c +++ b/app/gui/preferences-dialog.c @@ -47,7 +47,8 @@ #include "widgets/gimptemplateeditor.h" #include "widgets/gimpwidgets-utils.h" -#include "menus.h" +#include "menus/menus.h" + #include "resolution-calibrate-dialog.h" #include "session.h" #include "themes.h" diff --git a/app/gui/tool-options-menu.c b/app/gui/tool-options-menu.c deleted file mode 100644 index 34601e7e00..0000000000 --- a/app/gui/tool-options-menu.c +++ /dev/null @@ -1,164 +0,0 @@ -/* The GIMP -- an 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 - -#include "libgimpwidgets/gimpwidgets.h" - -#include "gui-types.h" - -#include "core/gimp.h" -#include "core/gimpcontext.h" -#include "core/gimplist.h" -#include "core/gimptoolinfo.h" - -#include "widgets/gimphelp-ids.h" -#include "widgets/gimpuimanager.h" - -#include "tool-options-menu.h" - - -/* local function prototypes */ - -static void tool_options_menu_update (GimpUIManager *manager, - gpointer update_data, - const gchar *ui_path); -static void tool_options_menu_update_after (GimpUIManager *manager, - gpointer update_data, - const gchar *ui_path); -static void tool_options_menu_update_presets (GimpUIManager *manager, - guint merge_id, - const gchar *ui_path, - const gchar *menu_path, - const gchar *action_prefix, - GimpContainer *presets); - - -/* public functions */ - -void -tool_options_menu_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - g_signal_connect (manager, "update", - G_CALLBACK (tool_options_menu_update), - (gpointer) ui_path); - g_signal_connect_after (manager, "update", - G_CALLBACK (tool_options_menu_update_after), - (gpointer) ui_path); -} - - -/* private functions */ - -static void -tool_options_menu_update (GimpUIManager *manager, - gpointer update_data, - const gchar *ui_path) -{ - guint merge_id; - - merge_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (manager), - "tool-options-merge-id")); - - if (merge_id) - { - gtk_ui_manager_remove_ui (GTK_UI_MANAGER (manager), merge_id); - - g_object_set_data (G_OBJECT (manager), "tool-options-merge-id", - GINT_TO_POINTER (0)); - - gtk_ui_manager_ensure_update (GTK_UI_MANAGER (manager)); - } -} - -static void -tool_options_menu_update_after (GimpUIManager *manager, - gpointer update_data, - const gchar *ui_path) -{ - GimpContext *context; - GimpToolInfo *tool_info; - guint merge_id; - - context = gimp_get_user_context (manager->gimp); - tool_info = gimp_context_get_tool (context); - - if (! tool_info->options_presets) - return; - - merge_id = gtk_ui_manager_new_merge_id (GTK_UI_MANAGER (manager)); - - g_object_set_data (G_OBJECT (manager), "tool-options-merge-id", - GUINT_TO_POINTER (merge_id)); - - tool_options_menu_update_presets (manager, merge_id, ui_path, - "tool-options-save-menu", - "tool-options-save-", - tool_info->options_presets); - - tool_options_menu_update_presets (manager, merge_id, ui_path, - "tool-options-restore-menu", - "tool-options-restore-", - tool_info->options_presets); - - tool_options_menu_update_presets (manager, merge_id, ui_path, - "tool-options-rename-menu", - "tool-options-rename-", - tool_info->options_presets); - - tool_options_menu_update_presets (manager, merge_id, ui_path, - "tool-options-delete-menu", - "tool-options-delete-", - tool_info->options_presets); - - gtk_ui_manager_ensure_update (GTK_UI_MANAGER (manager)); -} - -static void -tool_options_menu_update_presets (GimpUIManager *manager, - guint merge_id, - const gchar *ui_path, - const gchar *menu_path, - const gchar *action_prefix, - GimpContainer *presets) -{ - gint n_children; - gint i; - - n_children = gimp_container_num_children (presets); - - for (i = 0; i < n_children; i++) - { - gchar *action_name; - gchar *path; - - path = g_strdup_printf ("%s/%s", ui_path, menu_path); - action_name = g_strdup_printf ("%s%03d", action_prefix, i); - - gtk_ui_manager_add_ui (GTK_UI_MANAGER (manager), merge_id, - path, action_name, action_name, - GTK_UI_MANAGER_MENUITEM, - FALSE); - - g_free (action_name); - g_free (path); - } -} diff --git a/app/gui/tool-options-menu.h b/app/gui/tool-options-menu.h deleted file mode 100644 index 03fc902176..0000000000 --- a/app/gui/tool-options-menu.h +++ /dev/null @@ -1,27 +0,0 @@ -/* The GIMP -- an 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 __TOOL_OPTIONS_MENU_H__ -#define __TOOL_OPTIONS_MENU_H__ - - -void tool_options_menu_setup (GimpUIManager *manager, - const gchar *ui_path); - - -#endif /* __TOOL_OPTIONS_MENU_H__ */ diff --git a/app/gui/toolbox-menu.c b/app/gui/toolbox-menu.c deleted file mode 100644 index b158b80dd5..0000000000 --- a/app/gui/toolbox-menu.c +++ /dev/null @@ -1,36 +0,0 @@ -/* The GIMP -- an 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 - -#include "gui-types.h" - -#include "menus.h" -#include "plug-in-menus.h" -#include "toolbox-menu.h" - - -void -toolbox_menu_setup (GimpUIManager *manager, - const gchar *ui_path) -{ - menus_open_recent_add (manager, ui_path); - plug_in_menus_setup (manager, ui_path); -} diff --git a/app/gui/toolbox-menu.h b/app/gui/toolbox-menu.h deleted file mode 100644 index c8e09a5838..0000000000 --- a/app/gui/toolbox-menu.h +++ /dev/null @@ -1,27 +0,0 @@ -/* The GIMP -- an 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__ */ diff --git a/app/menus/.cvsignore b/app/menus/.cvsignore new file mode 100644 index 0000000000..09ac50c583 --- /dev/null +++ b/app/menus/.cvsignore @@ -0,0 +1,6 @@ +Makefile +Makefile.in +.deps +.libs +*.lo +libappmenus.la diff --git a/app/menus/Makefile.am b/app/menus/Makefile.am new file mode 100644 index 0000000000..c0f0368b07 --- /dev/null +++ b/app/menus/Makefile.am @@ -0,0 +1,37 @@ +## Process this file with automake to produce Makefile.in + +noinst_LIBRARIES = libappmenus.a + +libappmenus_a_SOURCES = \ + menus-types.h \ + menus.c \ + menus.h \ + \ + file-open-menu.c \ + file-open-menu.h \ + file-save-menu.c \ + file-save-menu.h \ + image-menu.c \ + image-menu.h \ + plug-in-menus.c \ + plug-in-menus.h \ + tool-options-menu.c \ + tool-options-menu.h \ + toolbox-menu.c \ + toolbox-menu.h + + +EXTRA_DIST = makefile.msc + +AM_CPPFLAGS = \ + -DG_LOG_DOMAIN=\"Gimp-Menus\" \ + @GIMP_THREAD_FLAGS@ \ + @GIMP_MP_FLAGS@ + +INCLUDES = \ + -I$(top_builddir) \ + -I$(top_srcdir) \ + -I$(top_builddir)/app \ + -I$(top_srcdir)/app \ + $(GTK_CFLAGS) \ + -I$(includedir) diff --git a/app/menus/file-open-menu.c b/app/menus/file-open-menu.c index b1d94e6d1e..1504d374ab 100644 --- a/app/menus/file-open-menu.c +++ b/app/menus/file-open-menu.c @@ -22,7 +22,7 @@ #include -#include "gui-types.h" +#include "menus-types.h" #include "core/gimp.h" diff --git a/app/menus/file-save-menu.c b/app/menus/file-save-menu.c index 9071bee57f..6b508f8e69 100644 --- a/app/menus/file-save-menu.c +++ b/app/menus/file-save-menu.c @@ -22,7 +22,7 @@ #include -#include "gui-types.h" +#include "menus-types.h" #include "core/gimp.h" diff --git a/app/menus/image-menu.c b/app/menus/image-menu.c index 8864adaa6d..1e0cd8719a 100644 --- a/app/menus/image-menu.c +++ b/app/menus/image-menu.c @@ -20,7 +20,7 @@ #include -#include "gui-types.h" +#include "menus-types.h" #include "image-menu.h" #include "menus.h" diff --git a/app/gui/image-menu.h b/app/menus/menus-types.h similarity index 82% rename from app/gui/image-menu.h rename to app/menus/menus-types.h index b8115da85b..d3fc458abf 100644 --- a/app/gui/image-menu.h +++ b/app/menus/menus-types.h @@ -16,12 +16,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __IMAGE_MENU_H__ -#define __IMAGE_MENU_H__ +#ifndef __MENUS_TYPES_H__ +#define __MENUS_TYPES_H__ -void image_menu_setup (GimpUIManager *manager, - const gchar *ui_path); +#include "gui/gui-types.h" -#endif /* __IMAGE_MENU_H__ */ +#endif /* __MENUS_TYPES_H__ */ diff --git a/app/menus/menus.c b/app/menus/menus.c index e9f1f50995..eb1d50c3ce 100644 --- a/app/menus/menus.c +++ b/app/menus/menus.c @@ -23,7 +23,7 @@ #include "libgimpbase/gimpbase.h" #include "libgimpwidgets/gimpwidgets.h" -#include "gui-types.h" +#include "menus-types.h" #include "config/gimpguiconfig.h" diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index 59d36649eb..6b592e8e8a 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -24,7 +24,7 @@ #include "libgimpbase/gimpbase.h" -#include "gui-types.h" +#include "menus-types.h" #include "core/gimp.h" diff --git a/app/menus/tool-options-menu.c b/app/menus/tool-options-menu.c index 34601e7e00..403ee9f95e 100644 --- a/app/menus/tool-options-menu.c +++ b/app/menus/tool-options-menu.c @@ -22,7 +22,7 @@ #include "libgimpwidgets/gimpwidgets.h" -#include "gui-types.h" +#include "menus-types.h" #include "core/gimp.h" #include "core/gimpcontext.h" diff --git a/app/menus/toolbox-menu.c b/app/menus/toolbox-menu.c index b158b80dd5..9a8a8b6413 100644 --- a/app/menus/toolbox-menu.c +++ b/app/menus/toolbox-menu.c @@ -20,7 +20,7 @@ #include -#include "gui-types.h" +#include "menus-types.h" #include "menus.h" #include "plug-in-menus.h" diff --git a/configure.in b/configure.in index 3c2c126791..ddba42aa47 100644 --- a/configure.in +++ b/configure.in @@ -1520,6 +1520,7 @@ app/core/Makefile app/display/Makefile app/file/Makefile app/gui/Makefile +app/menus/Makefile app/paint/Makefile app/paint-funcs/Makefile app/composite/Makefile