diff options
author | Zhang Xianwei <[email protected]> | 2018-10-12 02:46:30 -0400 |
---|---|---|
committer | lukefromdc <[email protected]> | 2018-10-17 23:10:19 -0400 |
commit | 765208efe3772d5aebf1680c4c5fac87a9b33136 (patch) | |
tree | c905d59a60fd7ab37c02de41b00f9e2ef70f53a9 /plugins/media-keys | |
parent | 11f25cd802901f5f4ddfbad579520a8de83d67ff (diff) | |
download | mate-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]>
Diffstat (limited to 'plugins/media-keys')
-rw-r--r-- | plugins/media-keys/acme.h | 2 | ||||
-rw-r--r-- | plugins/media-keys/msd-media-keys-manager.c | 6 |
2 files changed, 8 insertions, 0 deletions
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); |