Author: akv
Date: 2012-08-24 17:27:26 +0200 (Fri, 24 Aug 2012)
New Revision: 4254

Modified:
   branches/4175-enfuse/src/rs-enfuse.c
Log:
Added progresssbar for Enfusing...

Modified: branches/4175-enfuse/src/rs-enfuse.c
===================================================================
--- branches/4175-enfuse/src/rs-enfuse.c        2012-08-24 12:49:21 UTC (rev 
4253)
+++ branches/4175-enfuse/src/rs-enfuse.c        2012-08-24 15:27:26 UTC (rev 
4254)
@@ -31,6 +31,7 @@
 #include "gtk-helper.h"
 #include "rs-photo.h"
 #include "rs-cache.h"
+#include "gtk-progress.h"
 
 gboolean has_align_image_stack ();
 
@@ -277,6 +278,8 @@
   gboolean extend = TRUE;
   gint boundingbox = 1000;
 
+  RS_PROGRESS *progress = gui_progress_new("Enfusing...", 4);
+
   if (num_selected == 1)
     extend = TRUE;
 
@@ -299,7 +302,12 @@
       g_string_free(outname, TRUE);
     }
 
+  gui_progress_advance_one(progress); /* 1 - initiate */
+
   GList *exported_names = export_images(rs, files, extend, 0, 1.0, 0, 1.0, 
boundingbox);
+
+  gui_progress_advance_one(progress); /* 2 - after exported images */
+
   GList *aligned_names = NULL;
   if (has_align_image_stack() && num_selected > 1)
     {
@@ -308,10 +316,18 @@
     }
   else
       aligned_names = exported_names;
+
+  gui_progress_advance_one(progress); /* 3 - after aligned images */
+
   enfuse_images(aligned_names, fullpath->str, enfuse_options);
+
+  gui_progress_advance_one(progress); /* 4 - after enfusing */
+
   gchar *filename = g_string_free(fullpath, FALSE);
   g_free(enfuse_options);
 
+  gui_progress_free(progress);
+
   // FIXME: Aparantly something goes wrong if we copy exifdata...
   //  rs_exif_copy(first, fullpath->str, "sRGB", RS_EXIF_FILE_TYPE_TIFF);
 


_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit

Reply via email to