Commit b17e1b1c authored by Jehan's avatar Jehan

app: split GimpFileDialog into Gimp(Open|Save|Export)Dialog subclasses.

The code refactoring allows better readability which will allow in turn
to add more complex specific features making good use of the save/export
split concept.
parent c7a25741
......@@ -46,10 +46,13 @@
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpclipboard.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpexportdialog.h"
#include "widgets/gimpfiledialog.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h"
#include "widgets/gimpopendialog.h"
#include "widgets/gimpsavedialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h"
......@@ -596,8 +599,8 @@ file_open_dialog_show (Gimp *gimp,
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog),
gimp->default_folder, NULL);
gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog),
image, open_as_layers);
gimp_open_dialog_set_image (GIMP_OPEN_DIALOG (dialog),
image, open_as_layers);
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (gtk_widget_get_toplevel (parent)));
......@@ -649,9 +652,9 @@ file_save_dialog_show (Gimp *gimp,
{
gtk_window_set_title (GTK_WINDOW (dialog), title);
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
gimp, image, save_a_copy, FALSE,
close_after_saving, GIMP_OBJECT (display));
gimp_save_dialog_set_image (GIMP_SAVE_DIALOG (dialog),
gimp, image, save_a_copy,
close_after_saving, GIMP_OBJECT (display));
gtk_window_present (GTK_WINDOW (dialog));
}
......@@ -679,8 +682,8 @@ file_save_dialog_response (GtkWidget *dialog,
basename = g_path_get_basename (gimp_file_get_utf8_name (file));
g_object_unref (file);
other = file_export_dialog_show (file_dialog->image->gimp,
file_dialog->image,
other = file_export_dialog_show (GIMP_FILE_DIALOG (file_dialog)->image->gimp,
GIMP_FILE_DIALOG (file_dialog)->image,
GTK_WIDGET (parent));
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (other),
......@@ -737,9 +740,8 @@ file_export_dialog_show (Gimp *gimp,
if (dialog)
{
gimp_file_dialog_set_save_image (GIMP_FILE_DIALOG (dialog),
gimp, image, FALSE, TRUE,
FALSE, NULL);
gimp_export_dialog_set_image (GIMP_EXPORT_DIALOG (dialog),
gimp, image);
gtk_window_present (GTK_WINDOW (dialog));
}
......@@ -767,8 +769,8 @@ file_export_dialog_response (GtkWidget *dialog,
basename = g_path_get_basename (gimp_file_get_utf8_name (file));
g_object_unref (file);
other = file_save_dialog_show (file_dialog->image->gimp,
file_dialog->image,
other = file_save_dialog_show (GIMP_FILE_DIALOG (file_dialog)->image->gimp,
GIMP_FILE_DIALOG (file_dialog)->image,
GTK_WIDGET (parent),
_("Save Image"),
FALSE, FALSE, NULL);
......
......@@ -40,6 +40,7 @@
#include "widgets/gimpfiledialog.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpopendialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "file-open-dialog.h"
......@@ -72,11 +73,7 @@ file_open_dialog_new (Gimp *gimp)
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
dialog = gimp_file_dialog_new (gimp,
GIMP_FILE_CHOOSER_ACTION_OPEN,
_("Open Image"), "gimp-file-open",
GTK_STOCK_OPEN,
GIMP_HELP_FILE_OPEN);
dialog = gimp_open_dialog_new (gimp);
gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (dialog), TRUE);
......@@ -132,27 +129,27 @@ file_open_dialog_response (GtkWidget *open_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.
*/
if (! dialog->open_as_layers)
if (! GIMP_OPEN_DIALOG (dialog)->open_as_layers)
gtk_window_set_transient_for (GTK_WINDOW (open_dialog), NULL);
for (list = files; list; list = g_slist_next (list))
{
GFile *file = list->data;
if (dialog->open_as_layers)
if (GIMP_OPEN_DIALOG (dialog)->open_as_layers)
{
if (! dialog->image)
if (! GIMP_FILE_DIALOG (dialog)->image)
{
dialog->image = file_open_dialog_open_image (open_dialog,
GIMP_FILE_DIALOG (dialog)->image = file_open_dialog_open_image (open_dialog,
gimp,
file,
dialog->file_proc);
if (dialog->image)
if (GIMP_FILE_DIALOG (dialog)->image)
success = TRUE;
}
else if (file_open_dialog_open_layers (open_dialog,
dialog->image,
GIMP_FILE_DIALOG (dialog)->image,
file,
dialog->file_proc))
{
......@@ -181,8 +178,8 @@ file_open_dialog_response (GtkWidget *open_dialog,
if (success)
{
if (dialog->open_as_layers && dialog->image)
gimp_image_flush (dialog->image);
if (GIMP_OPEN_DIALOG (dialog)->open_as_layers && GIMP_FILE_DIALOG (dialog)->image)
gimp_image_flush (GIMP_FILE_DIALOG (dialog)->image);
gtk_widget_destroy (open_dialog);
}
......
......@@ -40,10 +40,11 @@
#include "file/gimp-file.h"
#include "widgets/gimpactiongroup.h"
#include "widgets/gimpfiledialog.h"
#include "widgets/gimpexportdialog.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpmessagebox.h"
#include "widgets/gimpmessagedialog.h"
#include "widgets/gimpsavedialog.h"
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
......@@ -97,21 +98,13 @@ file_save_dialog_new (Gimp *gimp,
if (! export)
{
dialog = gimp_file_dialog_new (gimp,
GIMP_FILE_CHOOSER_ACTION_SAVE,
_("Save Image"), "gimp-file-save",
GTK_STOCK_SAVE,
GIMP_HELP_FILE_SAVE);
dialog = gimp_save_dialog_new (gimp);
state = g_object_get_data (G_OBJECT (gimp), "gimp-file-save-dialog-state");
}
else
{
dialog = gimp_file_dialog_new (gimp,
GIMP_FILE_CHOOSER_ACTION_EXPORT,
_("Export Image"), "gimp-file-export",
_("_Export"),
GIMP_HELP_FILE_EXPORT_AS);
dialog = gimp_export_dialog_new (gimp);
state = g_object_get_data (G_OBJECT (gimp), "gimp-file-export-dialog-state");
}
......@@ -160,13 +153,13 @@ file_save_dialog_response (GtkWidget *save_dialog,
gchar *basename;
GimpPlugInProcedure *save_proc;
if (! dialog->export)
if (GIMP_IS_SAVE_DIALOG (dialog))
{
g_object_set_data_full (G_OBJECT (gimp), "gimp-file-save-dialog-state",
gimp_file_dialog_get_state (dialog),
(GDestroyNotify) gimp_file_dialog_state_destroy);
}
else
else /* GIMP_IS_EXPORT_DIALOG (dialog) */
{
g_object_set_data_full (G_OBJECT (gimp), "gimp-file-export-dialog-state",
gimp_file_dialog_get_state (dialog),
......@@ -199,10 +192,12 @@ file_save_dialog_response (GtkWidget *save_dialog,
file,
save_proc,
GIMP_RUN_INTERACTIVE,
! dialog->save_a_copy && ! dialog->export,
GIMP_IS_SAVE_DIALOG (dialog) &&
! GIMP_SAVE_DIALOG (dialog)->save_a_copy,
FALSE,
dialog->export,
! dialog->export && dialog->compat,
GIMP_IS_EXPORT_DIALOG (dialog),
GIMP_IS_SAVE_DIALOG (dialog) &&
GIMP_SAVE_DIALOG (dialog)->compat,
FALSE))
{
/* Save was successful, now store the URI in a couple of
......@@ -210,30 +205,37 @@ file_save_dialog_response (GtkWidget *save_dialog,
* save. Lower-level URI management is handled in
* file_save()
*/
if (dialog->save_a_copy)
gimp_image_set_save_a_copy_file (dialog->image, file);
if (! dialog->export)
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
if (GIMP_IS_SAVE_DIALOG (dialog))
{
GimpSaveDialog *save_dialog = GIMP_SAVE_DIALOG (dialog);
if (save_dialog->save_a_copy)
gimp_image_set_save_a_copy_file (dialog->image, file);
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_SAVE_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
}
else
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_EXPORT_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
{
g_object_set_data_full (G_OBJECT (dialog->image->gimp),
GIMP_FILE_EXPORT_LAST_FILE_KEY,
g_object_ref (file),
(GDestroyNotify) g_object_unref);
}
/* make sure the menus are updated with the keys we've just set */
gimp_image_flush (dialog->image);
/* Handle close-after-saving */
if (dialog->close_after_saving && dialog->display_to_close)
if (GIMP_IS_SAVE_DIALOG (dialog) &&
GIMP_SAVE_DIALOG (dialog)->close_after_saving &&
GIMP_SAVE_DIALOG (dialog)->display_to_close)
{
GimpDisplay *display = GIMP_DISPLAY (dialog->display_to_close);
GimpDisplay *display = GIMP_DISPLAY (GIMP_SAVE_DIALOG (dialog)->display_to_close);
if (display &&
! gimp_image_is_dirty (gimp_display_get_image (display)))
if (! gimp_image_is_dirty (gimp_display_get_image (display)))
{
gimp_display_close (display);
}
......@@ -324,7 +326,7 @@ file_save_dialog_check_file (GtkWidget *save_dialog,
GIMP_LOG (SAVE_DIALOG, "basename has no '.', trying to add extension");
if (! save_proc && ! dialog->export)
if (! save_proc && GIMP_IS_SAVE_DIALOG (dialog))
{
ext = "xcf";
}
......@@ -554,7 +556,7 @@ static GSList *
file_save_dialog_get_procs (GimpFileDialog *dialog,
Gimp *gimp)
{
return (! dialog->export ?
return (GIMP_IS_SAVE_DIALOG (dialog) ?
gimp->plug_in_manager->save_procs :
gimp->plug_in_manager->export_procs);
}
......@@ -581,7 +583,7 @@ file_save_dialog_switch_dialogs (GimpFileDialog *file_dialog,
file = g_file_new_for_uri (basename);
proc_in_other_group =
file_procedure_find (file_dialog->export ?
file_procedure_find (GIMP_IS_EXPORT_DIALOG (file_dialog) ?
gimp->plug_in_manager->save_procs :
gimp->plug_in_manager->export_procs,
file, NULL);
......@@ -595,7 +597,7 @@ file_save_dialog_switch_dialogs (GimpFileDialog *file_dialog,
const gchar *message;
const gchar *link;
if (file_dialog->export)
if (GIMP_IS_EXPORT_DIALOG (file_dialog))
{
primary = _("The given filename cannot be used for exporting");
message = _("You can use this dialog to export to various file formats. "
......@@ -627,7 +629,9 @@ file_save_dialog_switch_dialogs (GimpFileDialog *file_dialog,
gimp_message_box_set_text (GIMP_MESSAGE_DIALOG (dialog)->box,
"%s", message);
if (! file_dialog->save_a_copy && ! file_dialog->close_after_saving)
if (GIMP_IS_EXPORT_DIALOG (file_dialog) ||
(! GIMP_SAVE_DIALOG (file_dialog)->save_a_copy &&
! GIMP_SAVE_DIALOG (file_dialog)->close_after_saving))
{
GtkWidget *label;
gchar *markup;
......
......@@ -175,6 +175,8 @@ libappwidgets_a_sources = \
gimperrorconsole.h \
gimperrordialog.c \
gimperrordialog.h \
gimpexportdialog.c \
gimpexportdialog.h \
gimpfgbgeditor.c \
gimpfgbgeditor.h \
gimpfgbgview.c \
......@@ -242,6 +244,8 @@ libappwidgets_a_sources = \
gimpmessagedialog.h \
gimpnavigationview.c \
gimpnavigationview.h \
gimpopendialog.c \
gimpopendialog.h \
gimpoverlaybox.c \
gimpoverlaybox.h \
gimpoverlaychild.c \
......@@ -294,6 +298,8 @@ libappwidgets_a_sources = \
gimprender.h \
gimpsamplepointeditor.c \
gimpsamplepointeditor.h \
gimpsavedialog.c \
gimpsavedialog.h \
gimpscalebutton.c \
gimpscalebutton.h \
gimpselectiondata.c \
......
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpexportdialog.c
* Copyright (C) 2015 Jehan <jehan@girinstud.io>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <string.h>
#include <gegl.h>
#include <gtk/gtk.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
#include "widgets-types.h"
#include "core/gimp.h"
#include "core/gimpimage.h"
#include "file/file-utils.h"
#include "file/gimp-file.h"
#include "pdb/gimppdb.h"
#include "plug-in/gimppluginmanager.h"
#include "gimpexportdialog.h"
#include "gimpfiledialog.h"
#include "gimphelp-ids.h"
#include "gimp-intl.h"
static GFile * gimp_export_dialog_get_default_folder (Gimp *gimp);
G_DEFINE_TYPE (GimpExportDialog, gimp_export_dialog,
GIMP_TYPE_FILE_DIALOG)
#define parent_class gimp_export_dialog_parent_class
static void
gimp_export_dialog_class_init (GimpExportDialogClass *klass)
{
}
static void
gimp_export_dialog_init (GimpExportDialog *dialog)
{
}
/* public functions */
GtkWidget *
gimp_export_dialog_new (Gimp *gimp)
{
GimpExportDialog *dialog;
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
dialog = g_object_new (GIMP_TYPE_EXPORT_DIALOG,
"gimp", gimp,
"title", _("Export Image"),
"role", "gimp-file-export",
"help-id", GIMP_HELP_FILE_EXPORT_AS,
"stock-id", _("_Export"),
"automatic-label", _("By Extension"),
"automatic-help-id", GIMP_HELP_FILE_SAVE_BY_EXTENSION,
"action", GTK_FILE_CHOOSER_ACTION_SAVE,
"file-procs", gimp->plug_in_manager->export_procs,
"file-procs-all-images", gimp->plug_in_manager->save_procs,
"file-filter-label", _("All export images"),
"local-only", FALSE,
"do-overwrite-confirmation", TRUE,
NULL);
return GTK_WIDGET (dialog);
}
void
gimp_export_dialog_set_image (GimpExportDialog *dialog,
Gimp *gimp,
GimpImage *image)
{
GFile *dir_file = NULL;
GFile *name_file = NULL;
GFile *ext_file = NULL;
gchar *basename;
g_return_if_fail (GIMP_IS_EXPORT_DIALOG (dialog));
g_return_if_fail (GIMP_IS_IMAGE (image));
GIMP_FILE_DIALOG (dialog)->image = image;
gimp_file_dialog_set_file_proc (GIMP_FILE_DIALOG (dialog), NULL);
/*
* Priority of default paths for Export:
*
* 1. Last Export path
* 2. Path of import source
* 3. Path of XCF source
* 4. Last path of any save to XCF
* 5. Last Export path of any document
* 6. The default path (usually the OS 'Documents' path)
*/
dir_file = gimp_image_get_exported_file (image);
if (! dir_file)
dir_file = g_object_get_data (G_OBJECT (image),
"gimp-image-source-file");
if (! dir_file)
dir_file = gimp_image_get_imported_file (image);
if (! dir_file)
dir_file = gimp_image_get_file (image);
if (! dir_file)
dir_file = g_object_get_data (G_OBJECT (gimp),
GIMP_FILE_SAVE_LAST_FILE_KEY);
if (! dir_file)
dir_file = g_object_get_data (G_OBJECT (gimp),
GIMP_FILE_EXPORT_LAST_FILE_KEY);
if (! dir_file)
dir_file = gimp_export_dialog_get_default_folder (gimp);
/* Priority of default basenames for Export:
*
* 1. Last Export name
* 3. Save URI
* 2. Source file name
* 3. 'Untitled'
*/
name_file = gimp_image_get_exported_file (image);
if (! name_file)
name_file = gimp_image_get_file (image);
if (! name_file)
name_file = gimp_image_get_imported_file (image);
if (! name_file)
name_file = gimp_image_get_untitled_file (image);
/* Priority of default type/extension for Export:
*
* 1. Type of last Export
* 2. Type of the image Import
* 3. Type of latest Export of any document
* 4. .png
*/
ext_file = gimp_image_get_exported_file (image);
if (! ext_file)
ext_file = gimp_image_get_imported_file (image);
if (! ext_file)
ext_file = g_object_get_data (G_OBJECT (gimp),
GIMP_FILE_EXPORT_LAST_FILE_KEY);
if (ext_file)
g_object_ref (ext_file);
else
ext_file = g_file_new_for_uri ("file:///we/only/care/about/extension.png");
if (ext_file)
{
GFile *tmp_file = file_utils_file_with_new_ext (name_file, ext_file);
basename = g_path_get_basename (gimp_file_get_utf8_name (tmp_file));
g_object_unref (tmp_file);
g_object_unref (ext_file);
}
else
{
basename = g_path_get_basename (gimp_file_get_utf8_name (name_file));
}
if (g_file_query_file_type (dir_file, G_FILE_QUERY_INFO_NONE, NULL) ==
G_FILE_TYPE_DIRECTORY)
{
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog),
dir_file, NULL);
}
else
{
GFile *parent_file = g_file_get_parent (dir_file);
gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog),
parent_file, NULL);
g_object_unref (parent_file);
}
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename);
}
/* private functions */
static GFile *
gimp_export_dialog_get_default_folder (Gimp *gimp)
{
if (gimp->default_folder)
{
return gimp->default_folder;
}
else
{
GFile *file = g_object_get_data (G_OBJECT (gimp),
"gimp-documents-folder");
if (! file)
{
gchar *path;
/* Make sure it ends in '/' */
path = g_build_path (G_DIR_SEPARATOR_S,
g_get_user_special_dir (G_USER_DIRECTORY_DOCUMENTS),
G_DIR_SEPARATOR_S,
NULL);
/* Paranoia fallback, see bug #722400 */
if (! path)
path = g_build_path (G_DIR_SEPARATOR_S,
g_get_home_dir (),
G_DIR_SEPARATOR_S,
NULL);
file = g_file_new_for_path (path);
g_free (path);
g_object_set_data_full (G_OBJECT (gimp), "gimp-documents-folder",
file, (GDestroyNotify) g_object_unref);
}
return file;
}
}
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpexportdialog.h
* Copyright (C) 2015 Jehan <jehan@girinstud.io>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (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
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __GIMP_EXPORT_DIALOG_H__
#define __GIMP_EXPORT_DIALOG_H__
#include "gimpfiledialog.h"
G_BEGIN_DECLS
#define GIMP_TYPE_EXPORT_DIALOG (gimp_export_dialog_get_type ())
#define GIMP_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_EXPORT_DIALOG, GimpExportDialog))
#define GIMP_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_EXPORT_DIALOG, GimpExportDialogClass))
#define GIMP_IS_EXPORT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_EXPORT_DIALOG))
#define GIMP_IS_EXPORT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_EXPORT_DIALOG))
#define GIMP_EXPORT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_EXPORT_DIALOG, GimpExportDialogClass))
typedef struct _GimpExportDialogClass GimpExportDialogClass;
struct _GimpExportDialog
{
GimpFileDialog parent_instance;
};
struct _GimpExportDialogClass
{
GimpFileDialogClass parent_class;
};
GType gimp_export_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_export_dialog_new (Gimp *gimp);
void gimp_export_dialog_set_image (GimpExportDialog *dialog,
Gimp *gimp,
GimpImage *image);
G_END_DECLS
#endif /* __GIMP_EXPORT_DIALOG_H__ */
This diff is collapsed.
......@@ -38,25 +38,28 @@ struct _GimpFileDialog
{
GtkFileChooserDialog parent_instance;
GimpPlugInProcedure *file_proc;
Gimp *gimp;
GimpImage *image;
gboolean open_as_layers;
gboolean save_a_copy;
gboolean export;
gboolean compat;
gboolean close_after_saving;
GimpObject *display_to_close;
GimpPlugInProcedure *file_proc;
GtkWidget *thumb_box;
GtkWidget *extra_vbox;
GtkWidget *compat_toggle;
GtkWidget *proc_expander;
GtkWidget *proc_view;
GtkWidget *progress;
gboolean busy;
gboolean canceled;
gchar *help_id;
gchar *stock_id;
gchar *automatic_help_id;
gchar *automatic_label;
gchar *file_filter_label;
GSList *file_procs;
GSList *file_procs_all_images;
};
struct _GimpFileDialogClass
......@@ -70,29 +73,17 @@ typedef struct _GimpFileDialogState GimpFileDialogState;
GType gimp_file_dialog_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_file_dialog_new (Gimp *gimp,
GimpFileChooserAction action,
const gchar *title,
const gchar *role,
const gchar *icon_name,
const gchar *help_id);
void gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
gboolean sensitive);
void gimp_file_dialog_set_file_proc (GimpFileDialog *dialog,
GimpPlugInProcedure *file_proc);
void gimp_file_dialog_set_open_image (GimpFileDialog *dialog,
GimpImage *image,
gboolean open_as_layers);
void gimp_file_dialog_set_save_image (GimpFileDialog *dialog,
Gimp *gimp,
GimpImage *image,
gboolean save_a_copy,
gboolean export,
gboolean close_after_saving,
GimpObject *display);
void gimp_file_dialog_add_extra_widget (GimpFileDialog *dialog,
GtkWidget *widget,
gboolean expand,
gboolean fill,
guint padding);
void gimp_file_dialog_set_sensitive (GimpFileDialog *dialog,
gboolean sensitive);
void gimp_file_dialog_set_file_proc (GimpFileDialog *dialog,
GimpPlugInProcedure *file_proc);
GimpFileDialogState * gimp_file_dialog_get_state (GimpFileDialog *dialog);
void gimp_file_dialog_set_state (GimpFileDialog *dialog,
......
/* GIMP - The GNU Image Manipulation Program
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
*
* gimpopendialog.c
* Copyright (C) 2015 Jehan <jehan@girinstud.io>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (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