[cheese/wip-cancel] Mapped ESC to stop video recording



commit c345bb2a2641484eea7bb1570362b0599f7cecf2
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date:   Thu Aug 19 01:02:43 2010 +0530

    Mapped ESC to stop video recording

 src/cheese-window.vala |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 2d128e6..6635cbc 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -650,14 +650,24 @@ public class Cheese.MainWindow : Gtk.Window
     {
       case 0xFF1B:     /* GDK_ESCAPE */
         action_cancelled = true;
-        current_countdown.stop ();
         if (current_mode == MediaMode.PHOTO)
+        {
+          current_countdown.stop ();
           finish_countdown_callback ();
+        }
         else
+        if (current_mode == MediaMode.BURST)
         {
+          current_countdown.stop ();
           is_bursting = false;
           burst_take_photo ();
         }
+        else
+        if (current_mode == MediaMode.VIDEO)
+        {
+          is_recording = true;
+          on_take_action (null);
+        }
         action_cancelled = false;
         break;
     }
@@ -665,7 +675,7 @@ public class Cheese.MainWindow : Gtk.Window
   }
 
   [CCode (instance_pos = -1)]
-  public void on_take_action (Gtk.Action action)
+  public void on_take_action (Gtk.Action ? action)
   {
     if (current_mode == MediaMode.PHOTO)
     {



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