[cheese] Fix invalid burst mode delay time, bug 652532



commit 1baf1919d4a21aba125343d916f99eae3cce4974
Author: Max Lin <max7442 gmail com>
Date:   Tue Jun 14 17:52:38 2011 +0800

    Fix invalid burst mode delay time, bug 652532

 src/cheese-window.vala |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index f1a7a41..5824d30 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -785,8 +785,16 @@ public class Cheese.MainWindow : Gtk.Window
       take_action_button.tooltip_text = "Stop taking pictures";
       burst_take_photo ();
 
-      /* 3500 ms is approximate time for countdown animation to finish */
-      burst_callback_id = GLib.Timeout.add ((settings.get_int ("burst-delay") / 1000) * 3500, burst_take_photo);
+      /* 3500 ms is the approximate time for countdown animation to finish, so
+         if burst-delay time is less than 3500 ms, just use 3500 ms. */
+      if (((settings.get_int ("burst-delay") - 3500) < 1000) && settings.get_boolean ("countdown"))
+      {
+        burst_callback_id = GLib.Timeout.add (3500, burst_take_photo);
+      }
+      else
+      {
+        burst_callback_id = GLib.Timeout.add (settings.get_int ("burst-delay"), burst_take_photo);
+      }
     }
     else
     {



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