-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
While I was playing with the tiff plugin, I fixed it to disable the 'Save color values from transparent pixels' box when saving an image with no alpha channel, as the png plugin does. The option has no effect without alpha.
Patch attached.
- -- brion vibber (brion @ pobox.com) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFA8PX7wRnhpk1wk44RAmzeAKCYtsM7Bvuv8HIAqLIgL90yuta1hgCfdw/x cbyYmGinGoJEAiA7myJuwkk= =FVV4 -----END PGP SIGNATURE-----
--- gimp/plug-ins/common/tiff.c-cmyk 2004-07-10 23:21:01.000000000 -0700 +++ gimp/plug-ins/common/tiff.c 2004-07-11 01:06:45.000000000 -0700 @@ -142,7 +142,7 @@ gint32 drawable, gint32 orig_image); -static gboolean save_dialog (void); +static gboolean save_dialog (gboolean alpha); static void comment_entry_callback (GtkWidget *widget, gpointer data); @@ -354,7 +354,7 @@ gimp_parasite_free (parasite); /* First acquire information with a dialog */ - if (! save_dialog ()) + if (! save_dialog (gimp_drawable_has_alpha (drawable))) status = GIMP_PDB_CANCEL; break; @@ -2082,7 +2082,7 @@ } static gboolean -save_dialog (void) +save_dialog (gboolean alpha) { GtkWidget *dlg; GtkWidget *vbox; @@ -2126,7 +2126,8 @@ toggle = gtk_check_button_new_with_mnemonic ( _("Save _color values from transparent pixels")); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), - tsvals.save_transp_pixels); + alpha && tsvals.save_transp_pixels); + gtk_widget_set_sensitive (toggle, alpha); gtk_box_pack_start (GTK_BOX (vbox), toggle, FALSE, FALSE, 0); gtk_widget_show (toggle);