summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Xianwei <[email protected]>2018-10-12 02:46:30 -0400
committerlukefromdc <[email protected]>2018-10-17 23:10:19 -0400
commit765208efe3772d5aebf1680c4c5fac87a9b33136 (patch)
treec905d59a60fd7ab37c02de41b00f9e2ef70f53a9
parent11f25cd802901f5f4ddfbad579520a8de83d67ff (diff)
downloadmate-settings-daemon-765208efe3772d5aebf1680c4c5fac87a9b33136.tar.bz2
mate-settings-daemon-765208efe3772d5aebf1680c4c5fac87a9b33136.tar.xz
Add shortcut to start mate-control-center
Some laptops have a setting hotkey. This is bound by default to XF86Tools. Add shortcut to start mate-control-center to support it. Signed-off-by: Zhang Xianwei <[email protected]>
-rw-r--r--data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in5
-rw-r--r--plugins/media-keys/acme.h2
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c6
3 files changed, 13 insertions, 0 deletions
diff --git a/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in b/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in
index 88947de..8cea9ee 100644
--- a/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in
+++ b/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in
@@ -70,6 +70,11 @@
<summary>Launch email client</summary>
<description>Binding to launch the email client.</description>
</key>
+ <key name="control-center" type="s">
+ <default>'XF86Tools'</default>
+ <summary>Launch settings</summary>
+ <description>Binding to launch MATE settings.</description>
+ </key>
<key name="screensaver" type="s">
<default>'&lt;Control&gt;&lt;Alt&gt;l'</default>
<summary>Lock screen</summary>
diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h
index be277ed..64e361c 100644
--- a/plugins/media-keys/acme.h
+++ b/plugins/media-keys/acme.h
@@ -39,6 +39,7 @@ enum {
CALCULATOR_KEY,
SEARCH_KEY,
EMAIL_KEY,
+ CONTROL_CENTER_KEY,
SCREENSAVER_KEY,
HELP_KEY,
WWW_KEY,
@@ -77,6 +78,7 @@ static struct {
{ CALCULATOR_KEY, "calculator", NULL, NULL },
{ SEARCH_KEY, "search", NULL, NULL },
{ EMAIL_KEY, "email", NULL, NULL },
+ { CONTROL_CENTER_KEY, "control-center", NULL, NULL },
{ SCREENSAVER_KEY, "screensaver", NULL, NULL },
{ HELP_KEY, "help", NULL, NULL },
{ WWW_KEY, "www", NULL, NULL },
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
index 14434e5..f092702 100644
--- a/plugins/media-keys/msd-media-keys-manager.c
+++ b/plugins/media-keys/msd-media-keys-manager.c
@@ -976,6 +976,12 @@ do_action (MsdMediaKeysManager *manager,
case EMAIL_KEY:
do_url_action (manager, "mailto");
break;
+ case CONTROL_CENTER_KEY:
+ if ((cmd = g_find_program_in_path ("mate-control-center")))
+ execute (manager, "mate-control-center", FALSE, FALSE);
+
+ g_free (cmd);
+ break;
case SCREENSAVER_KEY:
if ((cmd = g_find_program_in_path ("mate-screensaver-command"))) {
execute (manager, "mate-screensaver-command --lock", FALSE, FALSE);