screenshot-ui: Add a key to open the screencast UI
It replaces the "record a short screencast" key from g-s-d. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2107>
This commit is contained in:
parent
b757f165a3
commit
a9fbee05b1
@ -14,4 +14,7 @@
|
|||||||
<KeyListEntry name="screenshot-window"
|
<KeyListEntry name="screenshot-window"
|
||||||
description="Take a screenshot of a window"/>
|
description="Take a screenshot of a window"/>
|
||||||
|
|
||||||
|
<KeyListEntry name="show-screen-recording-ui"
|
||||||
|
description="Record a screencast interactively"/>
|
||||||
|
|
||||||
</KeyListEntries>
|
</KeyListEntries>
|
@ -234,6 +234,10 @@
|
|||||||
<default>["Print"]</default>
|
<default>["Print"]</default>
|
||||||
<summary>Take a screenshot interactively</summary>
|
<summary>Take a screenshot interactively</summary>
|
||||||
</key>
|
</key>
|
||||||
|
<key name="show-screen-recording-ui" type="as">
|
||||||
|
<default>["<Ctrl><Shift><Alt>R"]</default>
|
||||||
|
<summary>Record a screencast interactively</summary>
|
||||||
|
</key>
|
||||||
<key name="screenshot-window" type="as">
|
<key name="screenshot-window" type="as">
|
||||||
<default>["<Alt>Print"]</default>
|
<default>["<Alt>Print"]</default>
|
||||||
<summary>Take a screenshot of a window</summary>
|
<summary>Take a screenshot of a window</summary>
|
||||||
|
@ -1297,6 +1297,14 @@ var ScreenshotUI = GObject.registerClass({
|
|||||||
showScreenshotUI
|
showScreenshotUI
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Main.wm.addKeybinding(
|
||||||
|
'show-screen-recording-ui',
|
||||||
|
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
||||||
|
Meta.KeyBindingFlags.IGNORE_AUTOREPEAT,
|
||||||
|
uiModes,
|
||||||
|
showScreenRecordingUI
|
||||||
|
);
|
||||||
|
|
||||||
Main.wm.addKeybinding(
|
Main.wm.addKeybinding(
|
||||||
'screenshot-window',
|
'screenshot-window',
|
||||||
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
new Gio.Settings({ schema_id: 'org.gnome.shell.keybindings' }),
|
||||||
@ -2187,6 +2195,15 @@ function showScreenshotUI() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shows the screen recording UI.
|
||||||
|
*/
|
||||||
|
function showScreenRecordingUI() {
|
||||||
|
Main.screenshotUI.open(UIMode.SCREENCAST).catch(err => {
|
||||||
|
logError(err, 'Error opening the screenshot UI');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var ScreenshotService = class {
|
var ScreenshotService = class {
|
||||||
constructor() {
|
constructor() {
|
||||||
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ScreenshotIface, this);
|
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(ScreenshotIface, this);
|
||||||
|
Loading…
Reference in New Issue
Block a user