diff options
author | Denis Gorodnichev <[email protected]> | 2014-10-06 08:21:19 +0400 |
---|---|---|
committer | Monsta <[email protected]> | 2015-09-28 12:22:34 +0300 |
commit | 0902fc2a7b84ce2446bcbba6681d2d8ded17a380 (patch) | |
tree | e8106b1c46db6a4a3c6e92d85d027bbc72b911c6 | |
parent | bf04794b99e7248af922b3a5c95a7446ff6571e9 (diff) | |
download | mate-settings-daemon-0902fc2a7b84ce2446bcbba6681d2d8ded17a380.tar.bz2 mate-settings-daemon-0902fc2a7b84ce2446bcbba6681d2d8ded17a380.tar.xz |
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
-rw-r--r-- | data/org.mate.SettingsDaemon.plugins.media-keys.gschema.xml.in | 5 | ||||
-rw-r--r-- | plugins/media-keys/acme.h | 6 | ||||
-rw-r--r-- | 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 @@ </key> <key name="power" type="s"> <default>'<Control><Alt>Delete'</default> + <summary>Shut down</summary> + <description>Binding to shut down.</description> + </key> + <key name="logout" type="s"> + <default>''</default> <summary>Log out</summary> <description>Binding to log out.</description> </key> 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,12 +499,18 @@ 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, MsdMediaKeysManager *manager) @@ -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; |