[gnome-settings-daemon] media-keys: Remove screenshot key handling



commit 2828692c512f8a81ff5e9c2f1f78450781d2c028
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Thu Oct 14 19:32:16 2021 +0300

    media-keys: Remove screenshot key handling
    
    gnome-shell itself now handles the screenshot keys. This is required to
    easily provide same-frame response to pressing a screenshot key.

 ...ttings-daemon.plugins.media-keys.gschema.xml.in |  60 -----
 plugins/media-keys/gsd-media-keys-manager.c        |  15 --
 plugins/media-keys/gsd-screenshot-utils.c          | 286 ---------------------
 plugins/media-keys/gsd-screenshot-utils.h          |  36 ---
 plugins/media-keys/media-keys.h                    |   6 -
 plugins/media-keys/meson.build                     |   1 -
 plugins/media-keys/shortcuts-list.h                |   6 -
 7 files changed, 410 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in 
b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
index fb0c85c6..513bf9f3 100644
--- a/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
+++ b/data/org.gnome.settings-daemon.plugins.media-keys.gschema.xml.in
@@ -96,36 +96,6 @@
       <summary>Microphone mute/unmute</summary>
       <description>Binding to mute/unmute the microphone.</description>
     </key>
-    <key name="screenshot" type="s">
-      <default>'Print'</default>
-      <summary>Take a screenshot</summary>
-      <description>Binding to take a screenshot.</description>
-    </key>
-    <key name="window-screenshot" type="s">
-      <default>'&lt;Alt&gt;Print'</default>
-      <summary>Take a screenshot of a window</summary>
-      <description>Binding to take a screenshot of a window.</description>
-    </key>
-    <key name="area-screenshot" type="s">
-      <default>'&lt;Shift&gt;Print'</default>
-      <summary>Take a screenshot of an area</summary>
-      <description>Binding to take a screenshot of an area.</description>
-    </key>
-    <key name="screenshot-clip" type="s">
-      <default>'&lt;Ctrl&gt;Print'</default>
-      <summary>Copy a screenshot to clipboard</summary>
-      <description>Binding to copy a screenshot to clipboard.</description>
-    </key>
-    <key name="window-screenshot-clip" type="s">
-      <default>'&lt;Ctrl&gt;&lt;Alt&gt;Print'</default>
-      <summary>Copy a screenshot of a window to clipboard</summary>
-      <description>Binding to copy a screenshot of a window to clipboard.</description>
-    </key>
-    <key name="area-screenshot-clip" type="s">
-      <default>'&lt;Ctrl&gt;&lt;Shift&gt;Print'</default>
-      <summary>Copy a screenshot of an area to clipboard</summary>
-      <description>Binding to copy a screenshot of an area to clipboard.</description>
-    </key>
     <key name="screencast" type="s">
       <default>'&lt;Ctrl&gt;&lt;Shift&gt;&lt;Alt&gt;R'</default>
       <summary>Record a short video of the screen</summary>
@@ -317,36 +287,6 @@
       <summary>Microphone mute/unmute</summary>
       <description>Binding to mute/unmute the microphone.</description>
     </key>
-    <key name="screenshot" type="as">
-      <default>['Print']</default>
-      <summary>Take a screenshot</summary>
-      <description>Binding to take a screenshot.</description>
-    </key>
-    <key name="window-screenshot" type="as">
-      <default>['&lt;Alt&gt;Print']</default>
-      <summary>Take a screenshot of a window</summary>
-      <description>Binding to take a screenshot of a window.</description>
-    </key>
-    <key name="area-screenshot" type="as">
-      <default>['&lt;Shift&gt;Print']</default>
-      <summary>Take a screenshot of an area</summary>
-      <description>Binding to take a screenshot of an area.</description>
-    </key>
-    <key name="screenshot-clip" type="as">
-      <default>['&lt;Ctrl&gt;Print']</default>
-      <summary>Copy a screenshot to clipboard</summary>
-      <description>Binding to copy a screenshot to clipboard.</description>
-    </key>
-    <key name="window-screenshot-clip" type="as">
-      <default>['&lt;Ctrl&gt;&lt;Alt&gt;Print']</default>
-      <summary>Copy a screenshot of a window to clipboard</summary>
-      <description>Binding to copy a screenshot of a window to clipboard.</description>
-    </key>
-    <key name="area-screenshot-clip" type="as">
-      <default>['&lt;Ctrl&gt;&lt;Shift&gt;Print']</default>
-      <summary>Copy a screenshot of an area to clipboard</summary>
-      <description>Binding to copy a screenshot of an area to clipboard.</description>
-    </key>
     <key name="screencast" type="as">
       <default>['&lt;Ctrl&gt;&lt;Shift&gt;&lt;Alt&gt;R']</default>
       <summary>Record a short video of the screen</summary>
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 3e2ec3fe..e03cc9f6 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -58,7 +58,6 @@
 
 #include "shortcuts-list.h"
 #include "shell-key-grabber.h"
-#include "gsd-screenshot-utils.h"
 #include "gsd-input-helper.h"
 #include "gsd-enums.h"
 #include "gsd-shell-helper.h"
@@ -2481,14 +2480,6 @@ do_action (GsdMediaKeysManager *manager,
         case HELP_KEY:
                 do_url_action (manager, "ghelp", timestamp);
                 break;
-        case SCREENSHOT_KEY:
-        case SCREENSHOT_CLIP_KEY:
-        case WINDOW_SCREENSHOT_KEY:
-        case WINDOW_SCREENSHOT_CLIP_KEY:
-        case AREA_SCREENSHOT_KEY:
-        case AREA_SCREENSHOT_CLIP_KEY:
-                gsd_screenshot_take (type);
-                break;
         case SCREENCAST_KEY:
                 do_screencast_action (manager);
                 break;
@@ -3095,12 +3086,6 @@ migrate_keybinding_settings (void)
                 { "volume-mute",                "volume-mute",                  map_keybinding },
                 { "volume-up",                  "volume-up",                    map_keybinding },
                 { "mic-mute",                   "mic-mute",                     map_keybinding },
-                { "screenshot",                 "screenshot",                   map_keybinding },
-                { "window-screenshot",          "window-screenshot",            map_keybinding },
-                { "area-screenshot",            "area-screenshot",              map_keybinding },
-                { "screenshot-clip",            "screenshot-clip",              map_keybinding },
-                { "window-screenshot-clip",     "window-screenshot-clip",       map_keybinding },
-                { "area-screenshot-clip",       "area-screenshot-clip",         map_keybinding },
                 { "screencast",                 "screencast",                   map_keybinding },
                 { "www",                        "www",                          map_keybinding },
                 { "magnifier",                  "magnifier",                    map_keybinding },
diff --git a/plugins/media-keys/media-keys.h b/plugins/media-keys/media-keys.h
index cc4ea8e7..f642d8fc 100644
--- a/plugins/media-keys/media-keys.h
+++ b/plugins/media-keys/media-keys.h
@@ -42,12 +42,6 @@ typedef enum {
         CONTROL_CENTER_KEY,
         SCREENSAVER_KEY,
         HELP_KEY,
-        SCREENSHOT_KEY,
-        WINDOW_SCREENSHOT_KEY,
-        AREA_SCREENSHOT_KEY,
-        SCREENSHOT_CLIP_KEY,
-        WINDOW_SCREENSHOT_CLIP_KEY,
-        AREA_SCREENSHOT_CLIP_KEY,
         SCREENCAST_KEY,
         WWW_KEY,
         PLAY_KEY,
diff --git a/plugins/media-keys/meson.build b/plugins/media-keys/meson.build
index cbda8eec..92d471a1 100644
--- a/plugins/media-keys/meson.build
+++ b/plugins/media-keys/meson.build
@@ -1,7 +1,6 @@
 sources = files(
   'bus-watch-namespace.c',
   'gsd-media-keys-manager.c',
-  'gsd-screenshot-utils.c',
   'main.c',
   'mpris-controller.c'
 )
diff --git a/plugins/media-keys/shortcuts-list.h b/plugins/media-keys/shortcuts-list.h
index 8ced72df..9d994254 100644
--- a/plugins/media-keys/shortcuts-list.h
+++ b/plugins/media-keys/shortcuts-list.h
@@ -64,12 +64,6 @@ static struct {
         { CONTROL_CENTER_KEY, "control-center", TRUE, GSD_ACTION_MODE_LAUNCHER, 
META_KEY_BINDING_IGNORE_AUTOREPEAT },
         { SCREENSAVER_KEY, "screensaver", TRUE, SCREENSAVER_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
         { HELP_KEY, "help", FALSE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { SCREENSHOT_KEY, "screenshot", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { WINDOW_SCREENSHOT_KEY, "window-screenshot", FALSE, NO_LOCK_MODE, 
META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { AREA_SCREENSHOT_KEY, "area-screenshot", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { SCREENSHOT_CLIP_KEY, "screenshot-clip", FALSE, SHELL_ACTION_MODE_ALL, 
META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { WINDOW_SCREENSHOT_CLIP_KEY, "window-screenshot-clip", FALSE, SHELL_ACTION_MODE_NORMAL, 
META_KEY_BINDING_IGNORE_AUTOREPEAT },
-        { AREA_SCREENSHOT_CLIP_KEY, "area-screenshot-clip", FALSE, SHELL_ACTION_MODE_ALL, 
META_KEY_BINDING_IGNORE_AUTOREPEAT },
         { SCREENCAST_KEY, "screencast", FALSE, NO_LOCK_MODE, META_KEY_BINDING_IGNORE_AUTOREPEAT },
         { WWW_KEY, "www", TRUE, GSD_ACTION_MODE_LAUNCHER, META_KEY_BINDING_IGNORE_AUTOREPEAT },
         { PLAY_KEY, "play", TRUE, SHELL_ACTION_MODE_ALL, META_KEY_BINDING_IGNORE_AUTOREPEAT },


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