summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-06-13 09:46:40 +0200
committerraveit65 <[email protected]>2019-06-13 21:54:37 +0200
commit6ca4da27100e181821ce2735a910b7b9c93a9c09 (patch)
tree28e588eb9c015aef36b7c8c15bc705ccd6a8c0c6 /plugins
parent638dcf8259cdf6a4d966db5c5c7212a1ae551533 (diff)
downloadmate-settings-daemon-6ca4da27100e181821ce2735a910b7b9c93a9c09.tar.bz2
mate-settings-daemon-6ca4da27100e181821ce2735a910b7b9c93a9c09.tar.xz
media-keys: Execute default instant messaging application defined by schema
Diffstat (limited to 'plugins')
-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: