always call gimp_image_flush() so that the image mode radio buttons
2006-06-16 Sven Neumann <sven@gimp.org> * app/actions/image-commands.c (image_convert_cmd_callback): always call gimp_image_flush() so that the image mode radio buttons reflect the image state. Attach the indexed conversion dialog to the shell to avoid multiple instances.
This commit is contained in:

committed by
Sven Neumann

parent
61a01e546c
commit
599aed94be
@ -1,3 +1,10 @@
|
|||||||
|
2006-06-16 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
|
* app/actions/image-commands.c (image_convert_cmd_callback):
|
||||||
|
always call gimp_image_flush() so that the image mode radio
|
||||||
|
buttons reflect the image state. Attach the indexed conversion
|
||||||
|
dialog to the shell to avoid multiple instances.
|
||||||
|
|
||||||
2006-06-16 Sven Neumann <sven@gimp.org>
|
2006-06-16 Sven Neumann <sven@gimp.org>
|
||||||
|
|
||||||
* plug-ins/common/mapcolor.c (query): marked blurb for translation.
|
* plug-ins/common/mapcolor.c (query): marked blurb for translation.
|
||||||
|
@ -146,6 +146,12 @@ image_new_from_image_cmd_callback (GtkAction *action,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
image_convert_dialog_unset (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
g_object_set_data (G_OBJECT (widget), "image-convert-dialog", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
image_convert_cmd_callback (GtkAction *action,
|
image_convert_cmd_callback (GtkAction *action,
|
||||||
GtkAction *current,
|
GtkAction *current,
|
||||||
@ -169,14 +175,33 @@ image_convert_cmd_callback (GtkAction *action,
|
|||||||
case GIMP_RGB:
|
case GIMP_RGB:
|
||||||
case GIMP_GRAY:
|
case GIMP_GRAY:
|
||||||
gimp_image_convert (image, value, 0, 0, FALSE, FALSE, 0, NULL, NULL);
|
gimp_image_convert (image, value, 0, 0, FALSE, FALSE, 0, NULL, NULL);
|
||||||
gimp_image_flush (image);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GIMP_INDEXED:
|
case GIMP_INDEXED:
|
||||||
gtk_widget_show (convert_dialog_new (image, widget,
|
{
|
||||||
GIMP_PROGRESS (display)));
|
GtkWidget *dialog;
|
||||||
|
|
||||||
|
dialog = g_object_get_data (G_OBJECT (widget), "image-convert-dialog");
|
||||||
|
|
||||||
|
if (! dialog)
|
||||||
|
{
|
||||||
|
dialog = convert_dialog_new (image, widget,
|
||||||
|
GIMP_PROGRESS (display));
|
||||||
|
|
||||||
|
g_object_set_data (G_OBJECT (widget),
|
||||||
|
"image-convert-dialog", dialog);
|
||||||
|
|
||||||
|
g_signal_connect_object (dialog, "destroy",
|
||||||
|
G_CALLBACK (image_convert_dialog_unset),
|
||||||
|
widget, G_CONNECT_SWAPPED);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_window_present (GTK_WINDOW (dialog));
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gimp_image_flush (image);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user