[gnome-shell] location: Don't hide location menu



commit 0117fcb0e78a66a8d38df6918db543ca9ccafd51
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Mar 31 18:26:04 2014 +0100

    location: Don't hide location menu
    
    If geoclue reports that we can't aquire location, we hide the menu. This
    will typically happen when user is offline (and doesn't have a 3G
    modem). This is likely not what we want since this like a temporary
    situation and user would want the ability to toggle geolocation still
    even if its currently not possible any applications to query the
    location.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727398

 js/ui/status/location.js |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/status/location.js b/js/ui/status/location.js
index 2111379..8ae7633 100644
--- a/js/ui/status/location.js
+++ b/js/ui/status/location.js
@@ -123,7 +123,7 @@ const Indicator = new Lang.Class({
         this._propertiesChangedId = this._proxy.connect('g-properties-changed',
                                                         Lang.bind(this, this._onGeocluePropsChanged));
 
-        this._updateMenu();
+        this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
         this._syncIndicator();
 
         this._proxy.AddAgentRemote('gnome-shell', Lang.bind(this, this._onAgentRegistered));
@@ -187,17 +187,12 @@ const Indicator = new Lang.Class({
         this._agent.emit_property_changed('MaxAccuracyLevel', variant);
     },
 
-    _updateMenu: function() {
-        this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
-        this.menu.actor.visible = (this._availableAccuracyLevel != 0);
-    },
-
     _onGeocluePropsChanged: function(proxy, properties) {
         let unpacked = properties.deep_unpack();
         if ("InUse" in unpacked)
             this._syncIndicator();
         if ("AvailableAccuracyLevel" in unpacked)
-            this._updateMenu();
+            this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
     }
 });
 


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