From 0902fc2a7b84ce2446bcbba6681d2d8ded17a380 Mon Sep 17 00:00:00 2001 From: Denis Gorodnichev Date: Mon, 6 Oct 2014 08:21:19 +0400 Subject: clarify "power" key bindings logic historically "power" key bindings calls shutdown dialog but described as logout. this is confuses users. updated "power" key bindings description provided additional "logout" key bindings --- ...rg.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in | 5 +++++ plugins/media-keys/acme.h | 6 ++++-- plugins/media-keys/msd-media-keys-manager.c | 13 +++++++++++-- 3 files changed, 20 insertions(+), 4 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 1ce1038..589af5a 100644 --- a/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in +++ b/data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in @@ -37,6 +37,11 @@ '<Control><Alt>Delete' + Shut down + Binding to shut down. + + + '' Log out Binding to log out. diff --git a/plugins/media-keys/acme.h b/plugins/media-keys/acme.h index 7c9013c..a1cc5c1 100644 --- a/plugins/media-keys/acme.h +++ b/plugins/media-keys/acme.h @@ -52,7 +52,8 @@ enum { MAGNIFIER_KEY, SCREENREADER_KEY, ON_SCREEN_KEYBOARD_KEY, - HANDLED_KEYS + LOGOUT_KEY, + HANDLED_KEYS, }; static struct { @@ -84,10 +85,11 @@ static struct { { REWIND_KEY, NULL, "XF86AudioRewind", NULL }, { FORWARD_KEY, NULL, "XF86AudioForward", NULL }, { REPEAT_KEY, NULL, "XF86AudioRepeat", NULL }, - { RANDOM_KEY, NULL, "XF86AudioRandomPlay", NULL}, + { RANDOM_KEY, NULL, "XF86AudioRandomPlay", NULL }, { MAGNIFIER_KEY, "magnifier", NULL, NULL }, { SCREENREADER_KEY, "screenreader", NULL, NULL }, { ON_SCREEN_KEYBOARD_KEY, "on-screen-keyboard", NULL, NULL }, + { LOGOUT_KEY, "logout", NULL, NULL }, }; #endif /* __ACME_H__ */ diff --git a/plugins/media-keys/msd-media-keys-manager.c b/plugins/media-keys/msd-media-keys-manager.c index 95ef52a..9ae91be 100644 --- a/plugins/media-keys/msd-media-keys-manager.c +++ b/plugins/media-keys/msd-media-keys-manager.c @@ -499,11 +499,17 @@ do_media_action (MsdMediaKeysManager *manager) } static void -do_exit_action (MsdMediaKeysManager *manager) +do_shutdown_action (MsdMediaKeysManager *manager) { execute (manager, "mate-session-save --shutdown-dialog", FALSE, FALSE); } +static void +do_logout_action (MsdMediaKeysManager *manager) +{ + execute (manager, "mate-session-save --logout-dialog", FALSE, FALSE); +} + static void do_eject_action_cb (GDrive *drive, GAsyncResult *res, @@ -923,8 +929,11 @@ do_action (MsdMediaKeysManager *manager, #endif break; case POWER_KEY: - do_exit_action (manager); + do_shutdown_action (manager); break; + case LOGOUT_KEY: + do_logout_action (manager); + break; case EJECT_KEY: do_eject_action (manager); break; -- cgit v1.2.1