2006-12-09 21:33:38 +00:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
2001-04-28 15:11:29 +00:00
|
|
|
* Copyright (C) 1995, 1996, 1997 Spencer Kimball and Peter Mattis
|
|
|
|
* Copyright (C) 1997 Josh MacDonald
|
|
|
|
*
|
2009-01-17 22:28:01 +00:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
2001-04-28 15:11:29 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 22:28:01 +00:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
2001-04-28 15:11:29 +00:00
|
|
|
* (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
|
2018-07-11 23:27:07 +02:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2001-04-28 15:11:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
2008-10-09 20:24:04 +00:00
|
|
|
#include <gegl.h>
|
2001-04-28 15:11:29 +00:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
2014-07-07 00:46:25 +02:00
|
|
|
#include "libgimpbase/gimpbase.h"
|
2001-04-28 15:11:29 +00:00
|
|
|
#include "libgimpwidgets/gimpwidgets.h"
|
|
|
|
|
2004-09-13 15:15:23 +00:00
|
|
|
#include "dialogs-types.h"
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2001-07-05 16:21:36 +00:00
|
|
|
#include "core/gimp.h"
|
2001-05-09 02:32:03 +00:00
|
|
|
#include "core/gimpimage.h"
|
2006-11-03 17:12:27 +00:00
|
|
|
#include "core/gimpimage-undo.h"
|
|
|
|
#include "core/gimplayer.h"
|
2004-08-10 18:47:21 +00:00
|
|
|
#include "core/gimpprogress.h"
|
2001-12-01 00:14:14 +00:00
|
|
|
|
2001-10-25 13:30:01 +00:00
|
|
|
#include "file/file-open.h"
|
2009-05-01 09:03:13 +02:00
|
|
|
#include "file/gimp-file.h"
|
2001-10-25 13:30:01 +00:00
|
|
|
|
2004-02-27 14:20:19 +00:00
|
|
|
#include "widgets/gimpfiledialog.h"
|
2003-08-21 15:54:47 +00:00
|
|
|
#include "widgets/gimphelp-ids.h"
|
2015-08-31 20:57:37 +02:00
|
|
|
#include "widgets/gimpopendialog.h"
|
2014-05-02 20:20:46 +02:00
|
|
|
#include "widgets/gimpwidgets-utils.h"
|
2001-11-27 19:27:55 +00:00
|
|
|
|
2001-04-28 15:11:29 +00:00
|
|
|
#include "file-open-dialog.h"
|
2001-07-04 19:31:35 +00:00
|
|
|
|
2003-03-25 16:38:19 +00:00
|
|
|
#include "gimp-intl.h"
|
2001-04-28 15:11:29 +00:00
|
|
|
|
|
|
|
|
2001-07-09 17:58:56 +00:00
|
|
|
/* local function prototypes */
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
static void file_open_dialog_response (GtkWidget *dialog,
|
2006-11-03 17:12:27 +00:00
|
|
|
gint response_id,
|
|
|
|
Gimp *gimp);
|
2015-09-09 21:04:18 +02:00
|
|
|
static GimpImage *file_open_dialog_open_image (GtkWidget *dialog,
|
2006-11-03 17:12:27 +00:00
|
|
|
Gimp *gimp,
|
2014-07-07 00:46:25 +02:00
|
|
|
GFile *file,
|
2025-08-26 16:44:38 +02:00
|
|
|
GimpPlugInProcedure *load_proc,
|
|
|
|
gboolean as_link);
|
2015-09-09 21:04:18 +02:00
|
|
|
static gboolean file_open_dialog_open_layers (GtkWidget *dialog,
|
2006-11-03 17:12:27 +00:00
|
|
|
GimpImage *image,
|
2014-07-07 00:46:25 +02:00
|
|
|
GFile *file,
|
2025-08-26 16:44:38 +02:00
|
|
|
GimpPlugInProcedure *load_proc,
|
|
|
|
gboolean as_link);
|
2001-04-28 15:11:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* public functions */
|
|
|
|
|
2004-09-13 16:01:52 +00:00
|
|
|
GtkWidget *
|
|
|
|
file_open_dialog_new (Gimp *gimp)
|
2001-04-28 15:11:29 +00:00
|
|
|
{
|
2008-05-08 11:30:54 +00:00
|
|
|
GtkWidget *dialog;
|
2001-08-14 16:33:28 +00:00
|
|
|
|
2004-09-13 16:37:01 +00:00
|
|
|
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
|
|
|
|
2015-08-31 20:57:37 +02:00
|
|
|
dialog = gimp_open_dialog_new (gimp);
|
2004-02-27 15:43:58 +00:00
|
|
|
|
2004-04-15 16:28:26 +00:00
|
|
|
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
|
2004-02-27 14:20:19 +00:00
|
|
|
|
2015-09-01 13:49:59 +02:00
|
|
|
gimp_file_dialog_load_state (GIMP_FILE_DIALOG (dialog),
|
|
|
|
"gimp-file-open-dialog-state");
|
2008-05-08 11:30:54 +00:00
|
|
|
|
2004-02-27 15:43:58 +00:00
|
|
|
g_signal_connect (dialog, "response",
|
|
|
|
G_CALLBACK (file_open_dialog_response),
|
2003-11-17 18:29:59 +00:00
|
|
|
gimp);
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2004-02-27 15:43:58 +00:00
|
|
|
return dialog;
|
2002-05-03 12:45:22 +00:00
|
|
|
}
|
|
|
|
|
2004-09-13 16:01:52 +00:00
|
|
|
|
|
|
|
/* private functions */
|
|
|
|
|
2001-04-28 15:11:29 +00:00
|
|
|
static void
|
2015-09-09 21:04:18 +02:00
|
|
|
file_open_dialog_response (GtkWidget *dialog,
|
2004-02-27 15:43:58 +00:00
|
|
|
gint response_id,
|
|
|
|
Gimp *gimp)
|
2001-04-28 15:11:29 +00:00
|
|
|
{
|
2015-09-09 21:04:18 +02:00
|
|
|
GimpFileDialog *file_dialog = GIMP_FILE_DIALOG (dialog);
|
|
|
|
GimpOpenDialog *open_dialog = GIMP_OPEN_DIALOG (dialog);
|
2014-07-07 00:46:25 +02:00
|
|
|
GSList *files;
|
2004-08-10 21:20:38 +00:00
|
|
|
GSList *list;
|
|
|
|
gboolean success = FALSE;
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2015-09-01 13:49:59 +02:00
|
|
|
gimp_file_dialog_save_state (GIMP_FILE_DIALOG (dialog),
|
|
|
|
"gimp-file-open-dialog-state");
|
2008-05-08 11:30:54 +00:00
|
|
|
|
2003-11-17 18:29:59 +00:00
|
|
|
if (response_id != GTK_RESPONSE_OK)
|
|
|
|
{
|
2022-03-25 15:49:45 +01:00
|
|
|
if (! file_dialog->busy && response_id != GTK_RESPONSE_HELP)
|
2015-09-09 21:04:18 +02:00
|
|
|
gtk_widget_destroy (dialog);
|
2004-08-10 21:20:38 +00:00
|
|
|
|
2003-11-17 18:29:59 +00:00
|
|
|
return;
|
|
|
|
}
|
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
2001-07-24 Michael Natterer <mitch@gimp.org>
Port to glib/gtk+ 2.0 episode I (every segfault has it's beginning)
* configure.in: require glib/gtk+ >= 1.3.7, commented out the
gtkxmhtml stuff.
From now on, you will need glib, pango, atk and gtk+ HEAD from CVS
to hack or use GIMP HEAD.
Beware, it crashes randomly :)
* app/core/Makefile.am
* app/core/gimpmarshal.list: new file plus rules to generate
gimpmarshal.[ch] from it.
* app/core/*
* app/tools/*
* app/widgets/*
* libgimpwidgets/*: started to use the glib object system. All
core/ objects are still gtk objects however. All signals are
created using g_signal_new(). There are many gtk+ artefacts left.
Finally, we will _not_ use the gtk_signal_foo() wrappers and
friends any more.
* app/colormaps.c
* app/devices.[ch]
* app/disp_callbacks.c
* app/errorconsole.c
* app/file-save.[ch]
* app/interface.c
* app/module_db.c
* app/nav_window.c
* app/ops_buttons.c
* app/scroll.c
* app/user_install.c
* app/gui/about-dialog.c
* app/gui/brush-editor.c
* app/gui/brushes-commands.c
* app/gui/color-notebook.c
* app/gui/colormap-dialog.c
* app/gui/dialogs-commands.c
* app/gui/dialogs-constructors.c
* app/gui/file-commands.c
* app/gui/file-dialog-utils.c
* app/gui/file-new-dialog.c
* app/gui/file-open-dialog.[ch]
* app/gui/file-save-dialog.c
* app/gui/gradient-editor.c
* app/gui/gradients-commands.c
* app/gui/image-commands.c
* app/gui/info-dialog.[ch]
* app/gui/layer-select.c
* app/gui/layers-commands.c
* app/gui/menus.c
* app/gui/offset-dialog.c
* app/gui/palette-editor.c
* app/gui/palettes-commands.c
* app/gui/patterns-commands.c
* app/gui/preferences-dialog.c
* app/gui/resize-dialog.[ch]
* app/gui/splash.c
* app/gui/tips-dialog.c
* app/gui/tool-options-dialog.c
* app/gui/toolbox.c
* app/gui/tools-commands.c
* libgimp/gimpbrushmenu.c
* libgimp/gimpmenu.c
* libgimp/gimppatternmenu.c
* libgimp/gimpui.c
* libgimpbase/gimpenv.c: tons and tons of changes like "const
gchar*", switch from GdkDeviceInfo to GdkDevice (very incomplete
and currently disables), lots of s/gtk_signal/g_signal/,
removal/replacement of deprecated stuff,
s/GtkSignalFunc/GCallback/ and lots of small changes and fixes
while I was on it, zillions of warnings left...
* modules/Makefile.am: disabled the water color selector
temporarily (XInput issues).
* plug-ins/Makefile.am
* plug-ins/common/.cvsignore
* plug-ins/common/Makefile.am
* plug-ins/common/plugin-defs.pl: simply excluded all plug-ins
which did not build (including Script-Fu). They are trivial to
fix.
2001-07-24 21:27:11 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
files = gtk_file_chooser_get_files (GTK_FILE_CHOOSER (dialog));
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2014-07-07 00:46:25 +02:00
|
|
|
if (files)
|
|
|
|
g_object_set_data_full (G_OBJECT (gimp), GIMP_FILE_OPEN_LAST_FILE_KEY,
|
|
|
|
g_object_ref (files->data),
|
|
|
|
(GDestroyNotify) g_object_unref);
|
2008-07-30 14:53:09 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
gimp_file_dialog_set_sensitive (file_dialog, FALSE);
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2010-06-23 20:17:37 +02:00
|
|
|
/* When we are going to open new image windows, unset the transient
|
|
|
|
* window. We don't need it since we will use gdk_window_raise() to
|
|
|
|
* keep the dialog on top. And if we don't do it, then the dialog
|
|
|
|
* will pull the image window it was invoked from on top of all the
|
|
|
|
* new opened image windows, and we don't want that to happen.
|
|
|
|
*/
|
2015-09-09 21:04:18 +02:00
|
|
|
if (! open_dialog->open_as_layers)
|
|
|
|
gtk_window_set_transient_for (GTK_WINDOW (dialog), NULL);
|
2010-06-23 20:17:37 +02:00
|
|
|
|
2019-01-03 16:46:00 +01:00
|
|
|
if (file_dialog->image)
|
|
|
|
g_object_ref (file_dialog->image);
|
|
|
|
|
2025-01-31 05:11:00 +00:00
|
|
|
/* If we open multiple files as layers, compress the undos */
|
|
|
|
if (file_dialog->image &&
|
|
|
|
open_dialog->open_as_layers &&
|
|
|
|
g_slist_length (files) > 1)
|
|
|
|
gimp_image_undo_group_start (file_dialog->image,
|
|
|
|
GIMP_UNDO_GROUP_LAYER_ADD,
|
|
|
|
_("Open layers"));
|
|
|
|
|
2014-07-26 15:24:52 +02:00
|
|
|
for (list = files; list; list = g_slist_next (list))
|
2004-02-27 16:28:55 +00:00
|
|
|
{
|
2014-07-07 00:46:25 +02:00
|
|
|
GFile *file = list->data;
|
2005-02-12 16:04:11 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
if (open_dialog->open_as_layers)
|
2005-02-12 16:04:11 +00:00
|
|
|
{
|
2015-09-09 21:04:18 +02:00
|
|
|
if (! file_dialog->image)
|
2008-10-05 15:21:02 +00:00
|
|
|
{
|
2025-08-26 16:44:38 +02:00
|
|
|
gimp_open_dialog_set_image (open_dialog,
|
|
|
|
file_open_dialog_open_image (dialog,
|
|
|
|
gimp,
|
|
|
|
file,
|
|
|
|
file_dialog->file_proc,
|
|
|
|
open_dialog->open_as_link),
|
|
|
|
TRUE,
|
|
|
|
open_dialog->open_as_link);
|
2008-10-05 15:21:02 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
if (file_dialog->image)
|
2019-01-03 16:46:00 +01:00
|
|
|
{
|
|
|
|
g_object_ref (file_dialog->image);
|
2025-01-31 05:11:00 +00:00
|
|
|
|
|
|
|
if (g_slist_length (files) > 1)
|
|
|
|
gimp_image_undo_group_start (file_dialog->image,
|
|
|
|
GIMP_UNDO_GROUP_LAYER_ADD,
|
|
|
|
_("Open layers"));
|
|
|
|
|
2019-01-03 16:46:00 +01:00
|
|
|
success = TRUE;
|
|
|
|
}
|
2008-10-05 15:21:02 +00:00
|
|
|
}
|
2015-09-09 21:04:18 +02:00
|
|
|
else if (file_open_dialog_open_layers (dialog,
|
|
|
|
file_dialog->image,
|
2014-07-07 00:46:25 +02:00
|
|
|
file,
|
2025-08-26 16:44:38 +02:00
|
|
|
file_dialog->file_proc,
|
|
|
|
open_dialog->open_as_link))
|
2004-02-27 16:28:55 +00:00
|
|
|
{
|
2005-02-12 16:04:11 +00:00
|
|
|
success = TRUE;
|
2004-09-21 12:08:30 +00:00
|
|
|
}
|
2005-02-12 16:04:11 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-09-09 21:04:18 +02:00
|
|
|
if (file_open_dialog_open_image (dialog,
|
2005-02-12 16:04:11 +00:00
|
|
|
gimp,
|
2014-07-07 00:46:25 +02:00
|
|
|
file,
|
2025-08-26 16:44:38 +02:00
|
|
|
file_dialog->file_proc,
|
|
|
|
open_dialog->open_as_link))
|
2004-09-21 12:08:30 +00:00
|
|
|
{
|
2005-02-12 16:04:11 +00:00
|
|
|
success = TRUE;
|
|
|
|
|
2010-06-23 19:57:34 +02:00
|
|
|
/* Make the dialog stay on top of all images we open if
|
|
|
|
* we open say 10 at once
|
|
|
|
*/
|
2015-09-09 21:04:18 +02:00
|
|
|
gdk_window_raise (gtk_widget_get_window (dialog));
|
2004-02-27 16:28:55 +00:00
|
|
|
}
|
2004-04-15 16:28:26 +00:00
|
|
|
}
|
2002-04-14 14:38:55 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
if (file_dialog->canceled)
|
2004-08-10 21:20:38 +00:00
|
|
|
break;
|
2001-11-09 01:04:46 +00:00
|
|
|
}
|
2001-04-28 15:11:29 +00:00
|
|
|
|
2025-01-31 05:11:00 +00:00
|
|
|
if (file_dialog->image &&
|
|
|
|
open_dialog->open_as_layers &&
|
|
|
|
g_slist_length (files) > 1)
|
|
|
|
gimp_image_undo_group_end (file_dialog->image);
|
|
|
|
|
2004-08-10 18:47:21 +00:00
|
|
|
if (success)
|
2004-09-21 12:08:30 +00:00
|
|
|
{
|
2019-01-03 16:46:00 +01:00
|
|
|
if (file_dialog->image)
|
|
|
|
{
|
|
|
|
if (open_dialog->open_as_layers)
|
|
|
|
gimp_image_flush (file_dialog->image);
|
|
|
|
|
|
|
|
g_object_unref (file_dialog->image);
|
|
|
|
}
|
2004-08-10 18:47:21 +00:00
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
gtk_widget_destroy (dialog);
|
2008-05-08 11:30:54 +00:00
|
|
|
}
|
2008-06-30 09:03:31 +00:00
|
|
|
else
|
|
|
|
{
|
2019-01-03 16:46:00 +01:00
|
|
|
if (file_dialog->image)
|
|
|
|
g_object_unref (file_dialog->image);
|
|
|
|
|
2015-09-09 21:04:18 +02:00
|
|
|
gimp_file_dialog_set_sensitive (file_dialog, TRUE);
|
2008-06-30 09:03:31 +00:00
|
|
|
}
|
2004-04-15 16:28:26 +00:00
|
|
|
|
2014-07-07 00:46:25 +02:00
|
|
|
g_slist_free_full (files, (GDestroyNotify) g_object_unref);
|
2002-04-18 01:18:24 +00:00
|
|
|
}
|
|
|
|
|
2008-10-05 15:21:02 +00:00
|
|
|
static GimpImage *
|
2015-09-09 21:04:18 +02:00
|
|
|
file_open_dialog_open_image (GtkWidget *dialog,
|
2006-04-05 08:38:33 +00:00
|
|
|
Gimp *gimp,
|
2014-07-07 00:46:25 +02:00
|
|
|
GFile *file,
|
2025-08-26 16:44:38 +02:00
|
|
|
GimpPlugInProcedure *load_proc,
|
|
|
|
gboolean as_link)
|
2002-04-18 01:18:24 +00:00
|
|
|
{
|
2006-03-28 17:08:36 +00:00
|
|
|
GimpImage *image;
|
2003-03-05 11:25:59 +00:00
|
|
|
GimpPDBStatusType status;
|
|
|
|
GError *error = NULL;
|
2002-04-18 01:18:24 +00:00
|
|
|
|
2006-03-28 17:08:36 +00:00
|
|
|
image = file_open_with_proc_and_display (gimp,
|
|
|
|
gimp_get_user_context (gimp),
|
2015-09-09 21:04:18 +02:00
|
|
|
GIMP_PROGRESS (dialog),
|
2025-08-26 16:44:38 +02:00
|
|
|
file, FALSE, as_link,
|
2006-03-28 17:08:36 +00:00
|
|
|
load_proc,
|
2018-04-29 17:27:47 +02:00
|
|
|
G_OBJECT (gimp_widget_get_monitor (dialog)),
|
2007-04-17 15:54:01 +00:00
|
|
|
&status, &error);
|
2002-04-18 01:18:24 +00:00
|
|
|
|
2019-04-12 18:22:06 +02:00
|
|
|
if (! image && status != GIMP_PDB_SUCCESS && status != GIMP_PDB_CANCEL)
|
2003-03-05 11:25:59 +00:00
|
|
|
{
|
2025-09-24 19:15:47 +02:00
|
|
|
if (error)
|
|
|
|
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
|
|
|
_("Opening '%s' failed:\n\n%s"),
|
|
|
|
gimp_file_get_utf8_name (file), error->message);
|
|
|
|
else
|
|
|
|
gimp_message (gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
|
|
|
_("Opening '%s' failed."),
|
|
|
|
gimp_file_get_utf8_name (file));
|
2003-03-05 11:25:59 +00:00
|
|
|
g_clear_error (&error);
|
|
|
|
}
|
2004-02-27 16:28:55 +00:00
|
|
|
|
2008-10-05 15:21:02 +00:00
|
|
|
return image;
|
2001-04-28 15:11:29 +00:00
|
|
|
}
|
2004-09-21 12:08:30 +00:00
|
|
|
|
|
|
|
static gboolean
|
2015-09-09 21:04:18 +02:00
|
|
|
file_open_dialog_open_layers (GtkWidget *dialog,
|
2006-11-03 17:12:27 +00:00
|
|
|
GimpImage *image,
|
2014-07-07 00:46:25 +02:00
|
|
|
GFile *file,
|
2025-08-26 16:44:38 +02:00
|
|
|
GimpPlugInProcedure *load_proc,
|
|
|
|
gboolean as_link)
|
2004-09-21 12:08:30 +00:00
|
|
|
{
|
2006-11-03 17:12:27 +00:00
|
|
|
GList *new_layers;
|
2004-09-21 12:08:30 +00:00
|
|
|
GimpPDBStatusType status;
|
|
|
|
GError *error = NULL;
|
|
|
|
|
2006-11-03 17:12:27 +00:00
|
|
|
new_layers = file_open_layers (image->gimp,
|
|
|
|
gimp_get_user_context (image->gimp),
|
2015-09-09 21:04:18 +02:00
|
|
|
GIMP_PROGRESS (dialog),
|
2025-08-26 16:44:38 +02:00
|
|
|
image, FALSE, as_link,
|
2014-07-07 00:46:25 +02:00
|
|
|
file, GIMP_RUN_INTERACTIVE, load_proc,
|
2006-11-03 17:12:27 +00:00
|
|
|
&status, &error);
|
2004-09-21 12:08:30 +00:00
|
|
|
|
2006-11-03 17:12:27 +00:00
|
|
|
if (new_layers)
|
2004-09-21 12:08:30 +00:00
|
|
|
{
|
2009-08-03 22:30:36 +02:00
|
|
|
gimp_image_add_layers (image, new_layers,
|
|
|
|
GIMP_IMAGE_ACTIVE_PARENT, -1,
|
2006-11-03 19:59:30 +00:00
|
|
|
0, 0,
|
|
|
|
gimp_image_get_width (image),
|
|
|
|
gimp_image_get_height (image),
|
|
|
|
_("Open layers"));
|
2004-09-21 12:08:30 +00:00
|
|
|
|
2006-11-03 17:12:27 +00:00
|
|
|
g_list_free (new_layers);
|
2004-09-21 12:08:30 +00:00
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
else if (status != GIMP_PDB_CANCEL)
|
|
|
|
{
|
2015-09-09 21:04:18 +02:00
|
|
|
gimp_message (image->gimp, G_OBJECT (dialog), GIMP_MESSAGE_ERROR,
|
2014-07-07 00:46:25 +02:00
|
|
|
_("Opening '%s' failed:\n\n%s"),
|
|
|
|
gimp_file_get_utf8_name (file), error->message);
|
2004-09-21 12:08:30 +00:00
|
|
|
g_clear_error (&error);
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|