[gnome-color-manager] trivial: ensure we reset the state machine after user input



commit f6d8e422d61135da231ad6764af84ee166b42db7
Author: Richard Hughes <richard hughsie com>
Date:   Wed Jan 27 21:56:30 2010 +0000

    trivial: ensure we reset the state machine after user input

 src/gcm-calibrate-argyll.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
index 012b5d0..26d53f9 100644
--- a/src/gcm-calibrate-argyll.c
+++ b/src/gcm-calibrate-argyll.c
@@ -1342,12 +1342,16 @@ gcm_calibrate_argyll_cancel_cb (GtkWidget *widget, GcmCalibrateArgyll *calibrate
 	priv->response = GTK_RESPONSE_CANCEL;
 
 	/* send input if waiting */
-	if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_STDIN)
+	if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_STDIN) {
 		vte_terminal_feed_child (VTE_TERMINAL(priv->terminal), "Q", 1);
+		priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
+	}
 
 	/* clear loop if waiting */
-	if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_LOOP)
+	if (priv->state == GCM_CALIBRATE_ARGYLL_STATE_WAITING_FOR_LOOP) {
 		g_main_loop_quit (priv->loop);
+		priv->state = GCM_CALIBRATE_ARGYLL_STATE_RUNNING;
+	}
 
 	/* stop loop */
 	if (g_main_loop_is_running (priv->loop))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]