Commit 5ab18071 authored by Simon Budig's avatar Simon Budig Committed by Simon Budig

Update the Plugin Menu immediately after setting the last invoked plugin.

2004-03-16  Simon Budig  <simon@gimp.org>

	* app/gui/plug-in-commands.c: Update the Plugin Menu immediately
	after setting the last invoked plugin. Fixes inconsistencies
	between name shown and plugin invoked.

	Fixes #136909, #137242 and #81479 (again, the fix in
	lightening_main.c only probably was bogus, since this must not
	rely on correctly written plugins).

	* plug-ins/common/compose.c
	* plug-ins/common/decompose.c
	* plug-ins/common/film.c
	* plug-ins/common/screenshot.c
	* plug-ins/common/smooth_palette.c
	* plug-ins/common/tile.c
	* plug-ins/fits/fits.c: Ensure that each gimp_image_undo_enable()
	had a gimp_image_undo_disable() first...
parent 83dc4c3b
2004-03-16 Simon Budig <simon@gimp.org>
* app/gui/plug-in-commands.c: Update the Plugin Menu immediately
after setting the last invoked plugin. Fixes inconsistencies
between name shown and plugin invoked.
Fixes #136909, #137242 and #81479 (again, the fix in
lightening_main.c only probably was bogus, since this must not
rely on correctly written plugins).
* plug-ins/common/compose.c
* plug-ins/common/decompose.c
* plug-ins/common/film.c
* plug-ins/common/screenshot.c
* plug-ins/common/smooth_palette.c
* plug-ins/common/tile.c
* plug-ins/fits/fits.c: Ensure that each gimp_image_undo_enable()
had a gimp_image_undo_disable() first...
2004-03-16 Michael Natterer <mitch@gimp.org>
* app/core/gimpimage-undo-push.c: removed unused #includes.
......@@ -26,6 +26,7 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpitem.h"
......@@ -38,6 +39,7 @@
#include "display/gimpdisplay.h"
#include "plug-in-commands.h"
#include "plug-in-menus.h"
#define return_if_no_display(gdisp,data) \
......@@ -64,7 +66,8 @@ plug_in_run_cmd_callback (GtkWidget *widget,
Argument *args;
gint gdisp_ID = -1;
gint i;
gint argc = 0; /* calm down a gcc warning. */
gint argc;
GimpImageType drawable_type = GIMP_RGB_IMAGE;
item_factory = gtk_item_factory_from_widget (widget);
......@@ -113,6 +116,8 @@ plug_in_run_cmd_callback (GtkWidget *widget,
if (drawable)
{
drawable_type = gimp_drawable_type (drawable);
args[2].value.pdb_int =
gimp_item_get_ID (GIMP_ITEM (drawable));
argc++;
......@@ -144,6 +149,7 @@ plug_in_run_cmd_callback (GtkWidget *widget,
proc_rec->args[2].arg_type == GIMP_PDB_DRAWABLE)
{
gimp->last_plug_in = proc_rec;
plug_in_menus_update (GIMP_ITEM_FACTORY (item_factory), drawable_type);
}
g_free (args);
......
......@@ -26,6 +26,7 @@
#include "core/gimp.h"
#include "core/gimpcontext.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpitem.h"
......@@ -38,6 +39,7 @@
#include "display/gimpdisplay.h"
#include "plug-in-commands.h"
#include "plug-in-menus.h"
#define return_if_no_display(gdisp,data) \
......@@ -64,7 +66,8 @@ plug_in_run_cmd_callback (GtkWidget *widget,
Argument *args;
gint gdisp_ID = -1;
gint i;
gint argc = 0; /* calm down a gcc warning. */
gint argc;
GimpImageType drawable_type = GIMP_RGB_IMAGE;
item_factory = gtk_item_factory_from_widget (widget);
......@@ -113,6 +116,8 @@ plug_in_run_cmd_callback (GtkWidget *widget,
if (drawable)
{
drawable_type = gimp_drawable_type (drawable);
args[2].value.pdb_int =
gimp_item_get_ID (GIMP_ITEM (drawable));
argc++;
......@@ -144,6 +149,7 @@ plug_in_run_cmd_callback (GtkWidget *widget,
proc_rec->args[2].arg_type == GIMP_PDB_DRAWABLE)
{
gimp->last_plug_in = proc_rec;
plug_in_menus_update (GIMP_ITEM_FACTORY (item_factory), drawable_type);
}
g_free (args);
......
......@@ -611,6 +611,7 @@ create_new_image (const gchar *filename,
image_ID = gimp_image_new (width, height, gitype);
gimp_image_set_filename (image_ID, (gchar *) filename);
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
gdtype, 100, GIMP_NORMAL_MODE);
......
......@@ -540,6 +540,7 @@ create_new_image (const gchar *filename,
gint32 image_ID;
image_ID = gimp_image_new (width, height, type);
gimp_image_undo_disable (image_ID);
gimp_image_set_filename (image_ID, filename);
*layer_ID = create_new_layer (image_ID,
......
......@@ -971,6 +971,7 @@ create_new_image (const gchar *filename,
image_ID = gimp_image_new (width, height, gitype);
gimp_image_set_filename (image_ID, filename);
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
gdtype, 100, GIMP_NORMAL_MODE);
gimp_image_add_layer (image_ID, *layer_ID, 0);
......
......@@ -346,6 +346,7 @@ create_image (const GdkPixbuf *pixbuf)
height = gdk_pixbuf_get_height (pixbuf);
image = gimp_image_new (width, height, GIMP_RGB);
gimp_image_undo_disable (image);
layer = gimp_layer_new (image, _("Screen Shot"),
width, height,
GIMP_RGB_IMAGE, 100, GIMP_NORMAL_MODE);
......
......@@ -249,6 +249,7 @@ doit (GimpDrawable *drawable,
gr = g_rand_new ();
new_image_id = gimp_image_new (config.width, config.height, GIMP_RGB);
gimp_image_undo_disable (new_image_id);
*layer_id = gimp_layer_new (new_image_id, _("Background"),
config.width, config.height,
gimp_drawable_type (drawable->drawable_id),
......
......@@ -260,6 +260,7 @@ tile (gint32 image_id,
new_image_id = gimp_image_new (tvals.new_width, tvals.new_height,
image_type);
gimp_image_undo_enable (new_image_id);
*layer_id = gimp_layer_new (new_image_id, _("Background"),
tvals.new_width, tvals.new_height,
gimp_drawable_type (drawable_id),
......
......@@ -504,6 +504,7 @@ create_new_image (const gchar *filename,
else
gimp_image_set_filename (image_ID, filename);
gimp_image_undo_disable (image_ID);
*layer_ID = gimp_layer_new (image_ID, _("Background"), width, height,
dtype, 100, GIMP_NORMAL_MODE);
gimp_image_add_layer (image_ID, *layer_ID, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment