Index: plug-ins/common/jpeg.c
===================================================================
RCS file: /cvs/gnome/gimp/plug-ins/common/jpeg.c,v
retrieving revision 1.83
diff -u -r1.83 jpeg.c
--- plug-ins/common/jpeg.c	13 Sep 2003 18:07:38 -0000	1.83
+++ plug-ins/common/jpeg.c	23 Sep 2003 08:29:21 -0000
@@ -184,6 +184,7 @@
 #define DEFAULT_RESTART     0
 #define DEFAULT_DCT         0
 #define DEFAULT_PREVIEW     0
+#define DEFAULT_EXIF        1
 
 /* sg - these should not be global... */
 static gint32 volatile  image_ID_global       = -1;
@@ -205,6 +206,7 @@
   gint    restart;
   gint    dct;
   gint    preview;
+  gint    save_exif;
 } JpegSaveVals;
 
 typedef struct
@@ -284,7 +286,8 @@
   DEFAULT_SUBSMP,
   DEFAULT_RESTART,
   DEFAULT_DCT,
-  DEFAULT_PREVIEW
+  DEFAULT_PREVIEW,
+  DEFAULT_EXIF
 };
 
 static JpegSaveInterface jsint =
@@ -498,6 +501,7 @@
 	      jsvals.restart     = ((JpegSaveVals *)parasite->data)->restart;
 	      jsvals.dct         = ((JpegSaveVals *)parasite->data)->dct;
 	      jsvals.preview     = ((JpegSaveVals *)parasite->data)->preview;
+	      jsvals.save_exif   = ((JpegSaveVals *)parasite->data)->save_exif;
 	      gimp_parasite_free (parasite);
 	    }
 
@@ -1450,16 +1454,19 @@
   jpeg_start_compress (&cinfo, TRUE);
 
 #ifdef HAVE_EXIF
-  if (exif_data)
-    {
-      guchar *exif_buf;
-      guint   exif_buf_len;
+  if (jsvals.save_exif)
+  {
+    if (exif_data)
+      {
+        guchar *exif_buf;
+        guint   exif_buf_len;
 
-      exif_data_save_data (exif_data, &exif_buf, &exif_buf_len);
-      jpeg_write_marker (&cinfo, 0xe1,
-                         exif_buf, exif_buf_len);
-      free (exif_buf);
-    }
+        exif_data_save_data (exif_data, &exif_buf, &exif_buf_len);
+        jpeg_write_marker (&cinfo, 0xe1,
+                           exif_buf, exif_buf_len);
+        free (exif_buf);
+      }
+  }
 #endif
 
   /* Step 4.1: Write the comment out - pw */
@@ -1647,6 +1654,9 @@
   GtkWidget     *toggle;
   GtkWidget     *abox;
   GtkObject     *scale_data;
+#ifdef HAVE_EXIF
+  GtkWidget     *exif_toggle;
+#endif
 
   GtkWidget     *progressive;
   GtkWidget     *baseline;
@@ -1823,6 +1833,17 @@
                     NULL);
 
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), jsvals.optimize);
+
+#ifdef HAVE_EXIF
+  exif_toggle = gtk_check_button_new_with_label (_("Save EXIF data"));
+  gtk_table_attach (GTK_TABLE (table), exif_toggle, 0, 3, 4, 5,
+		    GTK_FILL, 0, 0, 0);
+  gtk_widget_show (exif_toggle);
+
+  g_signal_connect (exif_toggle, "toggled",
+                    G_CALLBACK (gimp_toggle_button_update),
+                    &jsvals.save_exif);
+#endif
 
   progressive = gtk_check_button_new_with_label (_("Progressive"));
   gtk_table_attach (GTK_TABLE (table), progressive, 0, 3, 5, 6,
