Commit 7f9379cb authored by Michael Natterer's avatar Michael Natterer

Issue #1297 - Unhide the items hidden in the Advanced drop-down file...

...export dialogs

Remove the "Advanced" expander and have all options in plain sight.

Issue #701: Add a "Save color profile" toggle and always honor it.
parent a35b243f
......@@ -318,7 +318,8 @@ save_image (GFile *file,
gimp_file_get_utf8_name (file));
#ifdef TIFFTAG_ICCPROFILE
profile = gimp_image_get_color_profile (orig_image);
if (tsvals->save_profile)
profile = gimp_image_get_effective_color_profile (orig_image);
#endif
drawable_type = gimp_drawable_type (layer);
......@@ -1008,7 +1009,7 @@ save_dialog (TiffSaveVals *tsvals,
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "sv_alpha"));
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-alpha"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
has_alpha && tsvals->save_transp_pixels);
gtk_widget_set_sensitive (toggle, has_alpha);
......@@ -1023,34 +1024,45 @@ save_dialog (TiffSaveVals *tsvals,
G_CALLBACK (comment_entry_callback),
image_comment);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "sv_exif"));
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-exif"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
tsvals->save_exif);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals->save_exif);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "sv_xmp"));
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-xmp"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
tsvals->save_xmp);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals->save_xmp);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "sv_iptc"));
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-iptc"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
tsvals->save_iptc);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals->save_iptc);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "sv_thumbnail"));
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-thumbnail"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
tsvals->save_thumbnail);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals->save_thumbnail);
toggle = GTK_WIDGET (gtk_builder_get_object (builder, "save-color-profile"));
#ifdef TIFFTAG_ICCPROFILE
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle),
tsvals->save_profile);
g_signal_connect (toggle, "toggled",
G_CALLBACK (gimp_toggle_button_update),
&tsvals->save_profile);
#else
gtk_widget_hide (toggle);
#endif
gtk_widget_show (dialog);
run = (gimp_dialog_run (GIMP_DIALOG (dialog)) == GTK_RESPONSE_OK);
......
......@@ -32,6 +32,7 @@ typedef struct
gboolean save_xmp;
gboolean save_iptc;
gboolean save_thumbnail;
gboolean save_profile;
} TiffSaveVals;
......
......@@ -89,7 +89,8 @@ static TiffSaveVals tsvals =
FALSE, /* save exif */
FALSE, /* save xmp */
FALSE, /* save iptc */
TRUE /* save thumbnail */
TRUE, /* save thumbnail */
TRUE /* save profile */
};
static gchar *image_comment = NULL;
......@@ -366,6 +367,7 @@ run (const gchar *name,
tsvals.save_xmp = (metadata_flags & GIMP_METADATA_SAVE_XMP) != 0;
tsvals.save_iptc = (metadata_flags & GIMP_METADATA_SAVE_IPTC) != 0;
tsvals.save_thumbnail = (metadata_flags & GIMP_METADATA_SAVE_THUMBNAIL) != 0;
tsvals.save_profile = gimp_export_color_profile ();
parasite = gimp_image_get_parasite (orig_image, "gimp-comment");
if (parasite)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment