[gnome-shell] location: Don't show menu if geoclue is totally incapable
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] location: Don't show menu if geoclue is totally incapable
- Date: Sat, 15 Feb 2014 17:41:18 +0000 (UTC)
commit 9217f2c91682d9ce2d25a175e1e0c197adce0756
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Sat Feb 15 15:46:07 2014 +0000
location: Don't show menu if geoclue is totally incapable
If geoclue can't provide location at all (no GPS or network), don't
bother to show controls that don't serve any purpose.
https://bugzilla.gnome.org/show_bug.cgi?id=723684
js/ui/status/location.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/status/location.js b/js/ui/status/location.js
index d83aaf6..7f68b36 100644
--- a/js/ui/status/location.js
+++ b/js/ui/status/location.js
@@ -127,6 +127,7 @@ const Indicator = new Lang.Class({
if (!this._availableAccuracyLevel) {
this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel;
this._maxAccuracyLevel = this._availableAccuracyLevel;
+ this._updateMenuVisibility();
}
this._syncIndicator();
@@ -183,6 +184,10 @@ const Indicator = new Lang.Class({
var variant = new GLib.Variant('u', this._maxAccuracyLevel);
this._agent.emit_property_changed ('MaxAccuracyLevel', variant);
this._userSetAccuracy = false;
+ },
+
+ _updateMenuVisibility: function() {
+ this.menu.actor.visible = (this._availableAccuracyLevel != 0);
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]