don't g_return_if_fail() if there is no active drawable, just silently

2004-10-23  Michael Natterer  <mitch@gimp.org>

	* app/actions/file-commands.c (file_save_cmd_callback): don't
	g_return_if_fail() if there is no active drawable, just silently
	return.

	* app/actions/image-commands.c: remember the last merge_type of
	the "Merge Visible Layers" dialog.

	* app/actions/layers-commands.c: remeber the last values of the
	"Add Layer Mask" dialog.

	* app/actions/select-commands.c: renamed a bunch of static
	variables to be consistent with other variables used to remember
	dialog values.

	* app/actions/view-commands.c (view_fullscreen_cmd_callback): it's
	useless to update the "view-fullscreen" actions here because the
	"fullscreen" state of the shell changes asynchronously
This commit is contained in:
Michael Natterer 2004-10-23 19:13:17 +00:00 committed by Michael Natterer
parent a01c6883f6
commit fa79ae2844
6 changed files with 69 additions and 47 deletions

View file

@ -96,6 +96,11 @@ static void image_merge_layers_response (GtkWidget *widget,
ImageMergeLayersDialog *dialog);
/* private variables */
static GimpMergeType image_merge_layers_type = GIMP_EXPAND_AS_NECESSARY;
/* public functions */
void
@ -366,7 +371,7 @@ image_merge_layers_cmd_callback (GtkAction *action,
dialog = image_merge_layers_dialog_new (gimage,
action_data_get_context (data),
widget,
GIMP_EXPAND_AS_NECESSARY);
image_merge_layers_type);
g_signal_connect (dialog->dialog, "response",
G_CALLBACK (image_merge_layers_response),
@ -634,9 +639,11 @@ image_merge_layers_response (GtkWidget *widget,
{
if (response_id == GTK_RESPONSE_OK)
{
image_merge_layers_type = dialog->merge_type;
gimp_image_merge_visible_layers (dialog->gimage,
dialog->context,
dialog->merge_type);
image_merge_layers_type);
gimp_image_flush (dialog->gimage);
}