From 206df0026654c7d2a1eff317a02e86e317e6ae80 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 10 Nov 2013 00:02:11 +0100 Subject: [PATCH] app: add an "interactive" boolean inside gimp_export_image() instead of using "format_name", which is confusing, and file plug-ins will soon pass their format name again. --- libgimp/gimpexport.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libgimp/gimpexport.c b/libgimp/gimpexport.c index 3dfadb9d1e..17f2c66cf5 100644 --- a/libgimp/gimpexport.c +++ b/libgimp/gimpexport.c @@ -694,6 +694,7 @@ gimp_export_image (gint32 *image_ID, gint32 i; gint32 n_layers; gint32 *layers; + gboolean interactive = FALSE; gboolean added_flatten = FALSE; gboolean has_layer_masks = FALSE; gboolean background_has_alpha = TRUE; @@ -714,8 +715,11 @@ gimp_export_image (gint32 *image_ID, if (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS) capabilities |= GIMP_EXPORT_CAN_HANDLE_ALPHA; + if (FALSE /* format_name */) + interactive = TRUE; + /* ask for confirmation if the user is not saving a layer (see bug #51114) */ - if (format_name && + if (interactive && ! gimp_item_is_layer (*drawable_ID) && ! (capabilities & GIMP_EXPORT_CAN_HANDLE_LAYERS)) { @@ -918,7 +922,7 @@ gimp_export_image (gint32 *image_ID, { actions = g_slist_reverse (actions); - if (format_name) + if (interactive) retval = export_dialog (actions, format_name); else retval = GIMP_EXPORT_EXPORT;