Add an option called noExit, which can be used to keep ufraw running,
after a Raw development (save an image or import in the GIMP) has been
carried out.
This option is quite convenient, when only one or few parameters should
be adjusted for a series of images, while keeping several others. For
example in HDR processing, only exposure compensation might be changed,
while lens-correction and geometry (size, cropping, scaling) should stay
the same for each image.

Signed-off-by: Hartmut Knaack <knaac...@gmx.de>
---
Index: ufraw.h
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw.h,v
retrieving revision 1.180
diff -u -r1.180 ufraw.h
--- ufraw.h     2 Jan 2016 16:00:20 -0000       1.180
+++ ufraw.h     26 Jun 2016 12:03:55 -0000
@@ -284,7 +284,7 @@
     char inputURI[max_path], inputModTime[max_name];
     int type, compression, createID, embedExif, progressiveJPEG;
     int shrink, size;
-    gboolean overwrite, losslessCompress, embeddedImage;
+    gboolean overwrite, losslessCompress, embeddedImage, noExit;
     gboolean rotate;
 
     /* GUI settings */
Index: ufraw_conf.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_conf.c,v
retrieving revision 1.204
diff -u -r1.204 ufraw_conf.c
--- ufraw_conf.c        2 Jan 2016 16:00:20 -0000       1.204
+++ ufraw_conf.c        26 Jun 2016 12:03:57 -0000
@@ -115,6 +115,7 @@
     FALSE, /* overwrite existing files without asking */
     FALSE, /* losslessCompress */
     FALSE, /* load embedded preview image */
+    FALSE, /* noExit */
     TRUE, /* rotate to camera's setting */
 
     /* GUI settings */
@@ -762,6 +763,7 @@
     if (!strcmp("Overwrite", element)) sscanf(temp, "%d", &c->overwrite);
     if (!strcmp("LosslessCompression", element))
         sscanf(temp, "%d", &c->losslessCompress);
+    if (!strcmp("NoExit", element)) sscanf(temp, "%d", &c->noExit);
 }
 
 int conf_load(conf_data *c, const char *IDFilename)
@@ -1114,6 +1116,8 @@
         buf = uf_markup_buf(buf,
                             "<LosslessCompression>%d</LosslessCompression>\n",
                             c->losslessCompress);
+    if (c->noExit != conf_default.noExit)
+        buf = uf_markup_buf(buf, "<NoExit>%d</NoExit>\n", c->noExit);
     for (i = 0; i < c->BaseCurveCount; i++) {
         char *curveBuf = curve_buffer(&c->BaseCurve[i]);
         /* Write curve if it is non-default and we are not writing to .ufraw */
@@ -1477,6 +1481,7 @@
     dst->progressiveJPEG = src->progressiveJPEG;
     dst->losslessCompress = src->losslessCompress;
     dst->embeddedImage = src->embeddedImage;
+    dst->noExit = src->noExit;
 }
 
 int conf_set_cmd(conf_data *conf, const conf_data *cmd)
@@ -1494,6 +1499,7 @@
         conf->losslessCompress = cmd->losslessCompress;
     if (cmd->embedExif != -1) conf->embedExif = cmd->embedExif;
     if (cmd->embeddedImage != -1) conf->embeddedImage = cmd->embeddedImage;
+    if (cmd->noExit != -1) conf->noExit = cmd->noExit;
     if (cmd->rotate != -1) conf->rotate = cmd->rotate;
     if (cmd->rotationAngle != NULLF) conf->rotationAngle = cmd->rotationAngle;
     if (cmd->autoCrop != -1)
@@ -1880,6 +1886,7 @@
     cmd->autoBlack = disabled_state;
     cmd->losslessCompress = -1;
     cmd->overwrite = -1;
+    cmd->noExit = -1;
     cmd->WindowMaximized = -1;
     cmd->embedExif = -1;
     cmd->profile[1][0].BitDepth = -1;
Index: ufraw_preview.c
===================================================================
RCS file: /cvsroot/ufraw/ufraw/ufraw_preview.c,v
retrieving revision 1.389
diff -u -r1.389 ufraw_preview.c
--- ufraw_preview.c     2 Jan 2016 16:00:21 -0000       1.389
+++ ufraw_preview.c     26 Jun 2016 12:04:00 -0000
@@ -4011,18 +4011,18 @@
         // Finish this session
         g_object_set_data(G_OBJECT(window), "WindowResponse",
                           (gpointer)response);
-        gtk_main_quit();
-    } else {
-        // Restore setting
-        CFG->shrink = shrinkSave;
-        CFG->size = sizeSave;
-        data->FreezeDialog = FALSE;
-        gtk_widget_set_sensitive(data->Controls, TRUE);
-        // cases that set error status require redrawing of the preview image
-        if (status != UFRAW_SUCCESS) {
-            ufraw_invalidate_layer(data->UF, ufraw_raw_phase);
-            render_preview(data);
-        }
+        if (!CFG->noExit)
+           gtk_main_quit();
+    }
+    // Restore setting
+    CFG->shrink = shrinkSave;
+    CFG->size = sizeSave;
+    data->FreezeDialog = FALSE;
+    gtk_widget_set_sensitive(data->Controls, TRUE);
+    // cases that set error status require redrawing of the preview image
+    if (status != UFRAW_SUCCESS || CFG->noExit) {
+        ufraw_invalidate_layer(data->UF, ufraw_raw_phase);
+        render_preview(data);
     }
 }
 
@@ -5390,6 +5390,10 @@
     button = uf_check_button_new(
                  _("Overwrite existing files without asking"), 
&CFG->overwrite);
     gtk_box_pack_start(GTK_BOX(vBox), button, FALSE, FALSE, 0);
+
+    button = uf_check_button_new(
+                 _("Do not Exit after RAW development"), &CFG->noExit);
+    gtk_box_pack_start(GTK_BOX(vBox), button, FALSE, FALSE, 0);
     /* End of Save page */
 }
 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
ufraw-devel mailing list
ufraw-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ufraw-devel

Reply via email to