summaryrefslogtreecommitdiff
path: root/plugins/media-keys
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/media-keys')
-rw-r--r--plugins/media-keys/acme.h2
-rw-r--r--plugins/media-keys/msd-media-keys-manager.c19
2 files changed, 21 insertions, 0 deletions
diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h
index fa64cbb..412ad59 100644
--- a/plugins/media-keys/acme.h
+++ b/plugins/media-keys/acme.h
@@ -41,6 +41,7 @@ enum {
HOME_KEY,
MEDIA_KEY,
CALCULATOR_KEY,
+ MESSENGER_KEY,
SEARCH_KEY,
EMAIL_KEY,
CONTROL_CENTER_KEY,
@@ -87,6 +88,7 @@ static struct {
{ HOME_KEY, "home", NULL, NULL },
{ MEDIA_KEY, "media", NULL, NULL },
{ CALCULATOR_KEY, "calculator", NULL, NULL },
+ { MESSENGER_KEY, "messenger", NULL, NULL },
{ SEARCH_KEY, "search", NULL, NULL },
{ EMAIL_KEY, "email", NULL, NULL },
{ CONTROL_CENTER_KEY, "control-center", NULL, NULL },
diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c
index fc9bee7..a68835f 100644
--- a/plugins/media-keys/msd-media-keys-manager.c
+++ b/plugins/media-keys/msd-media-keys-manager.c
@@ -543,6 +543,22 @@ do_calculator_action (MsdMediaKeysManager *manager)
}
static void
+do_messenger_action (MsdMediaKeysManager *manager)
+{
+ GSettings *settings;
+ char *messenger;
+
+ settings = g_settings_new ("org.mate.applications-messenger");
+ messenger = g_settings_get_string (settings, "exec");
+
+ if (messenger)
+ execute (manager, messenger, FALSE, FALSE);
+
+ g_free (messenger);
+ g_object_unref (settings);
+}
+
+static void
do_shutdown_action (MsdMediaKeysManager *manager)
{
execute (manager, "mate-session-save --shutdown-dialog", FALSE, FALSE);
@@ -1263,6 +1279,9 @@ do_action (MsdMediaKeysManager *manager,
case CALCULATOR_KEY:
do_calculator_action (manager);
break;
+ case MESSENGER_KEY:
+ do_messenger_action (manager);
+ break;
case PLAY_KEY:
return do_multimedia_player_action (manager, "Play");
case PAUSE_KEY: