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:
parent
521bddc1cc
commit
4fea5b5ca3
@ -88,6 +88,13 @@ value here is from the GsmPresenceStatus enumeration.</_summary>
|
||||
Keybinding to open the application menu.
|
||||
</_description>
|
||||
</key>
|
||||
<key name="toggle-recording" type="as">
|
||||
<default><![CDATA[['<Control><Shift><Alt>r']]]></default>
|
||||
<_summary>Keybinding to toggle the screen recorder</_summary>
|
||||
<_description>
|
||||
Keybinding to start/stop the builtin screen recorder.
|
||||
</_description>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gnome.shell.keyboard" path="/org/gnome/shell/keyboard/"
|
||||
|
@ -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 });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user