[gnome-settings-daemon] media-keys: Don't assert if the user sets the 'button-power' action to 'shutdown'
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Don't assert if the user sets the 'button-power' action to 'shutdown'
- Date: Fri, 30 Sep 2011 13:51:24 +0000 (UTC)
commit f268b2d26805d4735e4d4dc571cd3afabedbb077
Author: Richard Hughes <richard hughsie com>
Date: Fri Sep 30 14:48:17 2011 +0100
media-keys: Don't assert if the user sets the 'button-power' action to 'shutdown'
If the user sets the 'button-power' action to 'shutdown' then we want to show
the interactive session shutdown window and not just assert.
Actually doing the shutdown without warning is a recipe for disaster in case
the user has _accidentally_ pressed the button...
plugins/media-keys/gsd-media-keys-manager.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 561918d..f9beab9 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1277,6 +1277,7 @@ do_config_power_action (GsdMediaKeysManager *manager,
}
break;
case GSD_POWER_ACTION_INTERACTIVE:
+ case GSD_POWER_ACTION_SHUTDOWN:
gnome_session_shutdown ();
break;
case GSD_POWER_ACTION_HIBERNATE:
@@ -1288,7 +1289,6 @@ do_config_power_action (GsdMediaKeysManager *manager,
g_error_free (error);
}
break;
- case GSD_POWER_ACTION_SHUTDOWN:
case GSD_POWER_ACTION_BLANK:
case GSD_POWER_ACTION_NOTHING:
/* these actions cannot be handled by media-keys and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]