Author: post
Date: 2011-12-27 17:50:02 +0100 (Tue, 27 Dec 2011)
New Revision: 4060

Modified:
   trunk/src/application.h
   trunk/src/gtk-interface.c
   trunk/src/rs-tethered-shooting.c
Log:
Add "Quick Export" option to Tethered Shooting.

Modified: trunk/src/application.h
===================================================================
--- trunk/src/application.h     2011-11-24 15:48:07 UTC (rev 4059)
+++ trunk/src/application.h     2011-12-27 16:50:02 UTC (rev 4060)
@@ -77,6 +77,7 @@
        RS_QUEUE *queue;
        RSStore *store;
        RS_MAIN_SIGNAL signal; 
+       gchar *post_open_event;
 
        /* These should be moved to a future RS_WINDOW */
        GtkWidget *window;

Modified: trunk/src/gtk-interface.c
===================================================================
--- trunk/src/gtk-interface.c   2011-11-24 15:48:07 UTC (rev 4059)
+++ trunk/src/gtk-interface.c   2011-12-27 16:50:02 UTC (rev 4060)
@@ -238,6 +238,7 @@
        {
                rs_io_idle_unpause();
                gui_set_busy(FALSE);
+               rs->post_open_event = NULL;
                return FALSE;
        }
 
@@ -263,6 +264,11 @@
                rs_photo_set_crop(rs->photo, rs->photo->proposed_crop);
        rs_core_actions_update_menu_items(rs);
        GTK_CATCHUP();
+       if (NULL != rs->post_open_event)
+       {
+               rs_core_action_group_activate(rs->post_open_event);
+               rs->post_open_event = NULL;
+       }
        gui_set_busy(FALSE);
        return TRUE;
 }

Modified: trunk/src/rs-tethered-shooting.c
===================================================================
--- trunk/src/rs-tethered-shooting.c    2011-11-24 15:48:07 UTC (rev 4059)
+++ trunk/src/rs-tethered-shooting.c    2011-12-27 16:50:02 UTC (rev 4060)
@@ -564,7 +564,9 @@
        /* Open image, if this has been selected */
        gboolean open_image = TRUE;
        rs_conf_get_boolean_with_default("tether-open-image", &open_image, 
TRUE);
-       if (open_image)
+       gboolean quick_export = FALSE;
+       rs_conf_get_boolean_with_default("tether-quick-export", &quick_export, 
FALSE);
+       if (open_image || quick_export)
        {
                if (!rs_store_set_selected_name(t->rs->store, filename, TRUE))
                {
@@ -577,6 +579,15 @@
        if (minimize)
                gtk_window_iconify(GTK_WINDOW(t->window));
 
+       GTK_CATCHUP();
+       if (quick_export)
+       {
+               /* Lets just make sure we aren't ahead by more than 1 image */
+               while (NULL != t->rs->post_open_event)
+                       g_usleep(100*1000);
+               t->rs->post_open_event = "QuickExport";
+       }
+
        g_free(tmp_name_ptr);
        return GP_OK;
 }
@@ -1137,6 +1148,9 @@
        check_button = checkbox_from_conf("tether-open-image", _("Open new 
images after capture"), TRUE);
        gtk_button_set_alignment (GTK_BUTTON(check_button), 0.0, 0.5);
        gtk_box_pack_start(h_box, check_button, FALSE, FALSE, 5);
+       check_button = checkbox_from_conf("tether-quick-export", _("Quick 
Export"), FALSE);
+       gtk_button_set_alignment (GTK_BUTTON(check_button), 0.0, 0.5);
+       gtk_box_pack_start(h_box, check_button, FALSE, FALSE, 5);
        gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 0);
 
        /* Add preferences box */


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

Reply via email to