[gnome-shell] system: Remove rogue separator in lock screen



commit 52ec5cf8e7fba6f73a72e24dc44ef4f9932e4d38
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Aug 12 13:08:53 2013 -0400

    system: Remove rogue separator in lock screen
    
    Hide the actions box when none are showing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705845

 js/ui/status/system.js |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index 74eb002..8e889dc 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -113,11 +113,21 @@ const Indicator = new Lang.Class({
         this._sessionUpdated();
     },
 
+    _updateActionsVisibility: function() {
+        let visible = (this._settingsAction.visible ||
+                       this._orientationLockAction.visible ||
+                       this._lockScreenAction.visible ||
+                       this._powerOffAction.visible);
+
+        this._actionsItem.actor.visible = visible;
+    },
+
     _sessionUpdated: function() {
         this._updateLockScreen();
         this._updatePowerOff();
         this._updateMultiUser();
         this._settingsAction.visible = Main.sessionMode.allowSettings;
+        this._updateActionsVisibility();
     },
 
     _updateMultiUser: function() {
@@ -183,12 +193,15 @@ const Indicator = new Lang.Class({
         let locked = this._orientationSettings.get_boolean('orientation-lock');
         let icon = this._orientationLockAction.child;
         icon.icon_name = locked ? 'rotation-locked-symbolic' : 'rotation-allowed-symbolic';
+
+        this._updateActionsVisibility();
     },
 
     _updateLockScreen: function() {
         let showLock = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter;
         let allowLockScreen = !this._lockdownSettings.get_boolean(DISABLE_LOCK_SCREEN_KEY);
         this._lockScreenAction.visible = showLock && allowLockScreen && LoginManager.canLock();
+        this._updateActionsVisibility();
     },
 
     _updateHaveShutdown: function() {
@@ -203,6 +216,7 @@ const Indicator = new Lang.Class({
 
     _updatePowerOff: function() {
         this._powerOffAction.visible = this._haveShutdown && !Main.sessionMode.isLocked;
+        this._updateActionsVisibility();
     },
 
     _createActionButton: function(iconName, accessibleName) {
@@ -269,6 +283,7 @@ const Indicator = new Lang.Class({
                                                  can_focus: false });
         item.addActor(hbox, { expand: true });
 
+        this._actionsItem = item;
         this.menu.addMenuItem(item);
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]