main: Move 'toggle-recording' binding into the shell

The keybinding to toggle the screen recorder was implemented as a
signal on MetaScreen, as keybindings could only be defined in mutter
core. As this is no longer the case, we can move the binding into the
shell where it belongs.

https://bugzilla.gnome.org/show_bug.cgi?id=674377
This commit is contained in:
Florian Müllner
2012-04-18 20:45:09 +02:00
parent 521bddc1cc
commit 4fea5b5ca3
2 changed files with 11 additions and 1 deletions

View File

@ -101,8 +101,11 @@ function _createGDMSession() {
function _initRecorder() {
let recorderSettings = new Gio.Settings({ schema: 'org.gnome.shell.recorder' });
let bindingSettings = new Gio.Settings({ schema: 'org.gnome.shell.keybindings' });
global.screen.connect('toggle-recording', function() {
global.display.add_keybinding('toggle-recording',
bindingSettings,
Meta.KeyBindingFlags.NONE, function() {
if (recorder == null) {
recorder = new Shell.Recorder({ stage: global.stage });
}