Commit 47c5473e authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

badly chopped into the new files below. Pass around much more "PlugIn" and

2002-03-20  Michael Natterer  <mitch@gimp.org>

	* app/plug-in/plug-in.[ch]: badly chopped into the new files below.
	Pass around much more "PlugIn" and "Gimp" pointers instead of
	using "current_plug_in" and "the_gimp". Needs much more hacking
	though... :(

	* app/plug-in/Makefile.am
	* app/plug-in/plug-in-def.[ch]
	* app/plug-in/plug-in-params.[ch]
	* app/plug-in/plug-in-progress.[ch]
	* app/plug-in/plug-ins.[ch]: new files.

	* app/gui/Makefile.am
	* app/gui/plug-in-commands.[ch]
	* app/gui/plug-in-menus.[ch]: ditto.

	* app/plug-in/plug-in-rc.c
	* app/plug-in/plug-in-types.h: changed accordingly.

	* app/pdb/procedural_db.c: changed procedural_db_destroy_args()
	so it can be used from plug_in_args_destroy(). Fixed a parasite
	memory leak (or introduced a new SEGV, we'll see...).

	* app/display/Makefile.am: another "truly ugly hack" until the
	plug-in menu stuff is chopped even more...

	* app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here,
	it is now in plug-in-commands.[ch].

	* app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*()
	hacks. We have a GimpItemFactory available in most cases we used
	to call this functions, and can use gimp_item_factors_from_path()
	in all other cases. The item factory stuff needs more work
	anyway...

	* app/app_procs.c
	* app/gimphelp.c
	* app/display/gimpdisplayshell.c
	* app/gui/file-dialog-utils.c
	* app/gui/file-open-dialog.[ch]
	* app/gui/file-save-dialog.[ch]
	* app/gui/gui.c
	* app/gui/menus.c
	* app/gui/paths-dialog.c
	* app/xcf/xcf.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/help.pdb
	* tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes,
	renamed functions and gimp_menu_item_*() removal).

	* app/pdb/fileops_cmds.c
	* app/pdb/help_cmds.c
	* app/pdb/plug_in_cmds.c: regenerated.
parent e302aeb1
2002-03-20 Michael Natterer <mitch@gimp.org>
* app/plug-in/plug-in.[ch]: badly chopped into the new files below.
Pass around much more "PlugIn" and "Gimp" pointers instead of
using "current_plug_in" and "the_gimp". Needs much more hacking
though... :(
* app/plug-in/Makefile.am
* app/plug-in/plug-in-def.[ch]
* app/plug-in/plug-in-params.[ch]
* app/plug-in/plug-in-progress.[ch]
* app/plug-in/plug-ins.[ch]: new files.
* app/gui/Makefile.am
* app/gui/plug-in-commands.[ch]
* app/gui/plug-in-menus.[ch]: ditto.
* app/plug-in/plug-in-rc.c
* app/plug-in/plug-in-types.h: changed accordingly.
* app/pdb/procedural_db.c: changed procedural_db_destroy_args()
so it can be used from plug_in_args_destroy(). Fixed a parasite
memory leak (or introduced a new SEGV, we'll see...).
* app/display/Makefile.am: another "truly ugly hack" until the
plug-in menu stuff is chopped even more...
* app/gui/commands.[ch]: removed filters_repeat_cmd_callback() here,
it is now in plug-in-commands.[ch].
* app/widgets/gimpitemfactory.[ch]: removed all gimp_menu_item_*()
hacks. We have a GimpItemFactory available in most cases we used
to call this functions, and can use gimp_item_factors_from_path()
in all other cases. The item factory stuff needs more work
anyway...
* app/app_procs.c
* app/gimphelp.c
* app/display/gimpdisplayshell.c
* app/gui/file-dialog-utils.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.[ch]
* app/gui/gui.c
* app/gui/menus.c
* app/gui/paths-dialog.c
* app/xcf/xcf.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/help.pdb
* tools/pdbgen/pdb/plug_in.pdb: changed accordingly (includes,
renamed functions and gimp_menu_item_*() removal).
* app/pdb/fileops_cmds.c
* app/pdb/help_cmds.c
* app/pdb/plug_in_cmds.c: regenerated.
2002-03-20 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell.[ch]: pass an additional "Gimp"
......@@ -12,7 +67,7 @@
* app/gui/gui.c: changed accordingly.
* app/gui/view-commands.[ch]: added a callback for the display
filters dialog because display releted dialogs are going to
filters dialog because display related dialogs are going to
be handled different soon.
* app/gui/menus.c: use the new callback.
......
......@@ -31,16 +31,6 @@
#include "commands.h"
/***** Filters *****/
void
filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
plug_in_repeat ((gboolean) action);
}
/***** Help *****/
void
......
......@@ -20,10 +20,6 @@
#define __COMMANDS_H__
void filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void help_help_cmd_callback (GtkWidget *widget,
gpointer data);
void help_context_help_cmd_callback (GtkWidget *widget,
......
This diff is collapsed.
/* 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_COMMANDS_H__
#define __PLUG_IN_COMMANDS_H__
void plug_in_run_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void plug_in_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
#endif /* __PLUG_IN_COMMANDS_H__ */
......@@ -42,7 +42,7 @@
#include "core/gimpdatafactory.h"
#include "core/gimpunit.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-ins.h"
#include "file/file-open.h"
......@@ -160,7 +160,7 @@ app_init (gint gimp_argc,
/* Initialize the plug-in structures
*/
plug_in_init (the_gimp, app_init_update_status);
plug_ins_init (the_gimp, app_init_update_status);
if (! no_interface)
{
......@@ -271,7 +271,7 @@ app_exit_finish (void)
gui_shutdown (the_gimp);
}
plug_in_kill ();
plug_ins_exit (the_gimp);
if (! no_interface)
{
......
......@@ -25,7 +25,7 @@
#include "gui-types.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "widgets/gimpitemfactory.h"
......@@ -35,11 +35,16 @@
void
file_dialog_show (GtkWidget *filesel)
{
gimp_menu_item_set_sensitive ("<Toolbox>/File/Open...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Open...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save as...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save a Copy as...", FALSE);
GtkItemFactory *item_factory;
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Toolbox>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", FALSE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Image>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save as...", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save a Copy as...", FALSE);
gtk_widget_grab_focus (GTK_FILE_SELECTION (filesel)->selection_entry);
gtk_widget_show (filesel);
......@@ -48,13 +53,18 @@ file_dialog_show (GtkWidget *filesel)
gboolean
file_dialog_hide (GtkWidget *filesel)
{
GtkItemFactory *item_factory;
gtk_widget_hide (filesel);
gimp_menu_item_set_sensitive ("<Toolbox>/File/Open...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Open...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save as...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save a Copy as...", TRUE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Toolbox>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", TRUE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Image>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save as...", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save a Copy as...", TRUE);
/* return TRUE because we are used as "delete_event" handler */
return TRUE;
......@@ -128,8 +138,14 @@ file_dialog_update_menus (GSList *procs,
if (file_proc->db_info.proc_type != GIMP_EXTENSION)
{
gimp_menu_item_set_sensitive (file_proc->menu_path,
(file_proc->image_types_val & plug_in_image_type));
GtkItemFactory *item_factory;
item_factory =
GTK_ITEM_FACTORY (gimp_item_factory_from_path (file_proc->menu_path));
gimp_item_factory_set_sensitive (item_factory,
file_proc->menu_path,
(file_proc->image_types_val & plug_in_image_type));
}
}
}
......@@ -100,13 +100,15 @@ static PlugInProcDef *load_file_proc = NULL;
/* public functions */
void
file_open_dialog_menu_init (Gimp *gimp)
file_open_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory)
{
GimpItemFactoryEntry entry;
PlugInProcDef *file_proc;
GSList *list;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
gimp->load_procs = g_slist_reverse (gimp->load_procs);
......@@ -131,7 +133,7 @@ file_open_dialog_menu_init (Gimp *gimp)
g_free (lowercase_basename);
entry.entry.path = file_proc->menu_path;
entry.entry.path = strstr (file_proc->menu_path, "/");
entry.entry.accelerator = NULL;
entry.entry.callback = file_open_type_callback;
entry.entry.callback_action = 0;
......@@ -140,7 +142,10 @@ file_open_dialog_menu_init (Gimp *gimp)
entry.help_page = help_page;
entry.description = NULL;
gimp_menu_item_create (&entry, NULL, file_proc);
gimp_item_factory_create_item (item_factory,
&entry,
file_proc, 2,
TRUE, FALSE);
}
}
......
......@@ -20,10 +20,11 @@
#define __FILE_OPEN_DIALOG_H__
void file_open_dialog_menu_init (Gimp *gimp);
void file_open_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory);
void file_open_dialog_menu_reset (void);
void file_open_dialog_show (Gimp *gimp);
void file_open_dialog_show (Gimp *gimp);
#endif /* __FILE_OPEN_DIALOG_H__ */
......@@ -39,6 +39,7 @@
#include "core/gimpimage.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "file/file-save.h"
#include "file/file-utils.h"
......@@ -90,13 +91,15 @@ static gboolean set_filename = TRUE;
/* public functions */
void
file_save_dialog_menu_init (Gimp *gimp)
file_save_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory)
{
GimpItemFactoryEntry entry;
PlugInProcDef *file_proc;
GSList *list;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
gimp->save_procs = g_slist_reverse (gimp->save_procs);
......@@ -123,7 +126,7 @@ file_save_dialog_menu_init (Gimp *gimp)
g_free (page);
entry.entry.path = file_proc->menu_path;
entry.entry.path = strstr (file_proc->menu_path, "/");
entry.entry.accelerator = NULL;
entry.entry.callback = file_save_type_callback;
entry.entry.callback_action = 0;
......@@ -132,7 +135,10 @@ file_save_dialog_menu_init (Gimp *gimp)
entry.help_page = lowercase_page;
entry.description = NULL;
gimp_menu_item_create (&entry, NULL, file_proc);
gimp_item_factory_create_item (item_factory,
&entry,
file_proc, 2,
TRUE, FALSE);
}
}
......@@ -348,7 +354,7 @@ file_save_ok_callback (GtkWidget *widget,
args[2].arg_type = GIMP_PDB_DRAWABLE;
args[2].value.pdb_int = gimp_item_get_ID (GIMP_ITEM (the_drawable));
plug_in_run (proc_rec, args, 3, FALSE, TRUE, 0);
plug_in_run (the_gimage->gimp, proc_rec, args, 3, FALSE, TRUE, 0);
g_free (args);
......
......@@ -20,11 +20,12 @@
#define __FILE_SAVE_DIALOG_H__
void file_save_dialog_menu_init (Gimp *gimp);
void file_save_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory);
void file_save_dialog_menu_reset (void);
void file_save_dialog_show (GimpImage *gimage);
void file_save_a_copy_dialog_show (GimpImage *gimage);
void file_save_dialog_show (GimpImage *gimage);
void file_save_a_copy_dialog_show (GimpImage *gimage);
#endif /* __FILE_SAVE_DIALOG_H__ */
......@@ -61,6 +61,9 @@ libappdisplay_a_SOURCES = \
$(libappdisplay_a_built_sources) \
$(libappdisplay_a_sources)
## This is a truly ugly hack
libappdisplay_a_LIBADD = ../gui/plug-in-menus.o
#
# rules to generate built sources
#
......
......@@ -38,8 +38,6 @@
#include "core/gimplayermask.h"
#include "core/gimppattern.h"
#include "plug-in/plug-in.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcursor.h"
#include "widgets/gimpdnd.h"
......@@ -49,6 +47,7 @@
#include "gui/gui-types.h" /* FIXME */
#include "gui/info-window.h"
#include "gui/plug-in-menus.h"
#include "tools/tools-types.h"
......
......@@ -38,8 +38,6 @@
#include "core/gimplayermask.h"
#include "core/gimppattern.h"
#include "plug-in/plug-in.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpcursor.h"
#include "widgets/gimpdnd.h"
......@@ -49,6 +47,7 @@
#include "gui/gui-types.h" /* FIXME */
#include "gui/info-window.h"
#include "gui/plug-in-menus.h"
#include "tools/tools-types.h"
......
......@@ -34,6 +34,9 @@
#include "core/core-types.h"
#include "pdb/procedural_db.h"
#include "plug-in/plug-ins.h"
#include "plug-in/plug-in.h"
#include "app_procs.h"
......@@ -218,7 +221,7 @@ gimp_help_internal (const gchar *help_path,
args[3].arg_type = GIMP_PDB_STRING;
args[3].value.pdb_pointer = (gpointer) help_data;
plug_in_run (proc_rec, args, 4, FALSE, TRUE, 0);
plug_in_run (the_gimp, proc_rec, args, 4, FALSE, TRUE, 0);
g_free (args);
}
......
......@@ -89,6 +89,10 @@ libappgui_a_SOURCES = @STRIP_BEGIN@ \
pattern-select.h \
patterns-commands.c \
patterns-commands.h \
plug-in-commands.c \
plug-in-commands.h \
plug-in-menus.c \
plug-in-menus.h \
preferences-dialog.c \
preferences-dialog.h \
qmask-commands.c \
......
......@@ -31,16 +31,6 @@
#include "commands.h"
/***** Filters *****/
void
filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
plug_in_repeat ((gboolean) action);
}
/***** Help *****/
void
......
......@@ -20,10 +20,6 @@
#define __COMMANDS_H__
void filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void help_help_cmd_callback (GtkWidget *widget,
gpointer data);
void help_context_help_cmd_callback (GtkWidget *widget,
......
......@@ -25,7 +25,7 @@
#include "gui-types.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "widgets/gimpitemfactory.h"
......@@ -35,11 +35,16 @@
void
file_dialog_show (GtkWidget *filesel)
{
gimp_menu_item_set_sensitive ("<Toolbox>/File/Open...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Open...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save as...", FALSE);
gimp_menu_item_set_sensitive ("<Image>/File/Save a Copy as...", FALSE);
GtkItemFactory *item_factory;
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Toolbox>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", FALSE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Image>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save as...", FALSE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save a Copy as...", FALSE);
gtk_widget_grab_focus (GTK_FILE_SELECTION (filesel)->selection_entry);
gtk_widget_show (filesel);
......@@ -48,13 +53,18 @@ file_dialog_show (GtkWidget *filesel)
gboolean
file_dialog_hide (GtkWidget *filesel)
{
GtkItemFactory *item_factory;
gtk_widget_hide (filesel);
gimp_menu_item_set_sensitive ("<Toolbox>/File/Open...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Open...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save as...", TRUE);
gimp_menu_item_set_sensitive ("<Image>/File/Save a Copy as...", TRUE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Toolbox>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", TRUE);
item_factory = GTK_ITEM_FACTORY (gimp_item_factory_from_path ("<Image>"));
gimp_item_factory_set_sensitive (item_factory, "/File/Open...", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save as...", TRUE);
gimp_item_factory_set_sensitive (item_factory, "/File/Save a Copy as...", TRUE);
/* return TRUE because we are used as "delete_event" handler */
return TRUE;
......@@ -128,8 +138,14 @@ file_dialog_update_menus (GSList *procs,
if (file_proc->db_info.proc_type != GIMP_EXTENSION)
{
gimp_menu_item_set_sensitive (file_proc->menu_path,
(file_proc->image_types_val & plug_in_image_type));
GtkItemFactory *item_factory;
item_factory =
GTK_ITEM_FACTORY (gimp_item_factory_from_path (file_proc->menu_path));
gimp_item_factory_set_sensitive (item_factory,
file_proc->menu_path,
(file_proc->image_types_val & plug_in_image_type));
}
}
}
......@@ -100,13 +100,15 @@ static PlugInProcDef *load_file_proc = NULL;
/* public functions */
void
file_open_dialog_menu_init (Gimp *gimp)
file_open_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory)
{
GimpItemFactoryEntry entry;
PlugInProcDef *file_proc;
GSList *list;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
gimp->load_procs = g_slist_reverse (gimp->load_procs);
......@@ -131,7 +133,7 @@ file_open_dialog_menu_init (Gimp *gimp)
g_free (lowercase_basename);
entry.entry.path = file_proc->menu_path;
entry.entry.path = strstr (file_proc->menu_path, "/");
entry.entry.accelerator = NULL;
entry.entry.callback = file_open_type_callback;
entry.entry.callback_action = 0;
......@@ -140,7 +142,10 @@ file_open_dialog_menu_init (Gimp *gimp)
entry.help_page = help_page;
entry.description = NULL;
gimp_menu_item_create (&entry, NULL, file_proc);
gimp_item_factory_create_item (item_factory,
&entry,
file_proc, 2,
TRUE, FALSE);
}
}
......
......@@ -20,10 +20,11 @@
#define __FILE_OPEN_DIALOG_H__
void file_open_dialog_menu_init (Gimp *gimp);
void file_open_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory);
void file_open_dialog_menu_reset (void);
void file_open_dialog_show (Gimp *gimp);
void file_open_dialog_show (Gimp *gimp);
#endif /* __FILE_OPEN_DIALOG_H__ */
......@@ -39,6 +39,7 @@
#include "core/gimpimage.h"
#include "plug-in/plug-in.h"
#include "plug-in/plug-in-proc.h"
#include "file/file-save.h"
#include "file/file-utils.h"
......@@ -90,13 +91,15 @@ static gboolean set_filename = TRUE;
/* public functions */
void
file_save_dialog_menu_init (Gimp *gimp)
file_save_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory)
{
GimpItemFactoryEntry entry;
PlugInProcDef *file_proc;
GSList *list;
g_return_if_fail (GIMP_IS_GIMP (gimp));
g_return_if_fail (GIMP_IS_ITEM_FACTORY (item_factory));
gimp->save_procs = g_slist_reverse (gimp->save_procs);
......@@ -123,7 +126,7 @@ file_save_dialog_menu_init (Gimp *gimp)
g_free (page);
entry.entry.path = file_proc->menu_path;
entry.entry.path = strstr (file_proc->menu_path, "/");
entry.entry.accelerator = NULL;
entry.entry.callback = file_save_type_callback;
entry.entry.callback_action = 0;
......@@ -132,7 +135,10 @@ file_save_dialog_menu_init (Gimp *gimp)
entry.help_page = lowercase_page;
entry.description = NULL;
gimp_menu_item_create (&entry, NULL, file_proc);
gimp_item_factory_create_item (item_factory,
&entry,
file_proc, 2,
TRUE, FALSE);
}
}
......@@ -348,7 +354,7 @@ file_save_ok_callback (GtkWidget *widget,
args[2].arg_type = GIMP_PDB_DRAWABLE;
args[2].value.pdb_int = gimp_item_get_ID (GIMP_ITEM (the_drawable));
plug_in_run (proc_rec, args, 3, FALSE, TRUE, 0);
plug_in_run (the_gimage->gimp, proc_rec, args, 3, FALSE, TRUE, 0);
g_free (args);
......
......@@ -20,11 +20,12 @@
#define __FILE_SAVE_DIALOG_H__
void file_save_dialog_menu_init (Gimp *gimp);
void file_save_dialog_menu_init (Gimp *gimp,
GimpItemFactory *item_factory);
void file_save_dialog_menu_reset (void);
void file_save_dialog_show (GimpImage *gimage);
void file_save_a_copy_dialog_show (GimpImage *gimage);
void file_save_dialog_show (GimpImage *gimage);
void file_save_a_copy_dialog_show (GimpImage *gimage);
#endif /* __FILE_SAVE_DIALOG_H__ */
......@@ -244,8 +244,8 @@ gui_restore (Gimp *gimp,
gimp->message_handler = GIMP_MESSAGE_BOX;
file_open_dialog_menu_init (gimp);
file_save_dialog_menu_init (gimp);
file_open_dialog_menu_init (gimp, gimp_item_factory_from_path ("<Load>"));
file_save_dialog_menu_init (gimp, gimp_item_factory_from_path ("<Save>"));
menus_restore (gimp);
......
......@@ -31,16 +31,6 @@
#include "commands.h"
/***** Filters *****/
void
filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action)
{
plug_in_repeat ((gboolean) action);
}
/***** Help *****/
void
......
......@@ -20,10 +20,6 @@
#define __COMMANDS_H__
void filters_repeat_cmd_callback (GtkWidget *widget,
gpointer data,
guint action);
void help_help_cmd_callback (GtkWidget *widget,
gpointer data);
void help_context_help_cmd_callback (GtkWidget *widget,
......
......@@ -56,6 +56,7 @@
#include "palettes-commands.h"
#include "paths-dialog.h"
#include "patterns-commands.h"
#include "plug-in-commands.h"
#include "qmask-commands.h"
#include "select-commands.h"
#include "test-commands.h"
......@@ -85,7 +86,7 @@ static void menus_last_opened_reorder (GimpContainer *container,
GimpItemFactory *item_factory);
static void menus_color_changed (GimpContext *context,
const GimpRGB *unused,
Gimp *gimp);
GimpItemFactory *item_factory);
static void menus_filters_subdirs_to_top (GtkMenu *menu);
#ifdef ENABLE_DEBUG_ENTRIES
static void menus_debug_recurse_menu (GtkWidget *menu,
......@@ -900,12 +901,12 @@ static GimpItemFactoryEntry image_entries[] =
/* <Image>/Filters */
{ { N_("/Filters/Repeat Last"), "<alt>F",
filters_repeat_cmd_callback, (guint) FALSE,
plug_in_repeat_cmd_callback, (guint) FALSE,
"<StockItem>", GTK_STOCK_EXECUTE },
NULL,
"filters/repeat_last.html", NULL },
{ { N_("/Filters/Re-Show Last"), "<alt><shift>F",
filters_repeat_cmd_callback, (guint) TRUE,
plug_in_repeat_cmd_callback, (guint) TRUE,
"<StockItem>", GIMP_STOCK_RESHOW_FILTER },
NULL,
"filters/reshow_last.html", NULL },
......@@ -2151,12 +2152,12 @@ menus_init (Gimp *gimp)
g_signal_connect (G_OBJECT (user_context), "foreground_changed",
G_CALLBACK (menus_color_changed),
gimp);
image_factory);