[gnome-shell] recorder: Make toggle-recorder action available in the overview



commit bd40cf194c23c0fa605b0fb90cf1bc2bc25ce39f
Author: Florian MÃllner <fmuellner gnome org>
Date:   Fri Aug 10 02:39:43 2012 +0200

    recorder: Make toggle-recorder action available in the overview
    
    There's not really a good reason to not allow starting a recording
    in the overview ...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688202

 js/ui/components/recorder.js |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/components/recorder.js b/js/ui/components/recorder.js
index 40baf44..cbc3e9e 100644
--- a/js/ui/components/recorder.js
+++ b/js/ui/components/recorder.js
@@ -1,5 +1,6 @@
 
 const Lang = imports.lang;
+const Main = imports.ui.main;
 
 const Gio = imports.gi.Gio;
 const Meta = imports.gi.Meta;
@@ -16,13 +17,16 @@ const Recorder = new Lang.Class({
     },
 
     enable: function() {
-        global.display.add_keybinding('toggle-recording',
-                                      this._bindingSettings,
-                                      Meta.KeyBindingFlags.NONE, Lang.bind(this, this._toggleRecorder));
+        Main.wm.addKeybinding('toggle-recording',
+                              this._bindingSettings,
+                              Meta.KeyBindingFlags.NONE,
+                              Main.KeybindingMode.NORMAL |
+                              Main.KeybindingMode.OVERVIEW,
+                              Lang.bind(this, this._toggleRecorder));
     },
 
     disable: function() {
-        global.display.remove_keybinding('toggle-recording');
+        Main.wm.removeKeybinding('toggle-recording');
     },
 
     _ensureRecorder: function() {



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