[gnome-settings-daemon/gnome-3-2] media-keys: Don't assert if the user sets the 'button-power' action to 'shutdown'



commit df730ed9372fb74a0785afcf18df8da27af81280
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 522bf1e..b97207a 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1283,6 +1283,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:
@@ -1294,7 +1295,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]