[gnome-maps] geoclue: Make findLocation() public
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] geoclue: Make findLocation() public
- Date: Sat, 31 Aug 2013 18:30:00 +0000 (UTC)
commit 182f301c523d64cb3e05bc860e74533f44daccd1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Aug 27 04:16:38 2013 +0300
geoclue: Make findLocation() public
https://bugzilla.gnome.org/show_bug.cgi?id=706726
src/geoclue.js | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/geoclue.js b/src/geoclue.js
index 2ad5243..4c0eee0 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -78,6 +78,18 @@ const Geoclue = new Lang.Class({
this._updateLocation(location, true);
},
+ findLocation: function() {
+ this._locationUpdatedId =
+ this._clientProxy.connectSignal("LocationUpdated",
+ this._onLocationUpdated.bind(this));
+
+ this._clientProxy.StartRemote(function(result, e) {
+ if (e) {
+ log ("Failed to connect to GeoClue2 service: " + e.message);
+ }
+ });
+ },
+
_init: function() {
let lastLocation = Application.settings.get_value('last-location');
if (lastLocation.n_children() >= 3) {
@@ -100,18 +112,6 @@ const Geoclue = new Lang.Class({
this._managerProxy.GetClientRemote(this._onGetClientReady.bind(this));
},
- _findLocation: function() {
- this._locationUpdatedId =
- this._clientProxy.connectSignal("LocationUpdated",
- this._onLocationUpdated.bind(this));
-
- this._clientProxy.StartRemote(function(result, e) {
- if (e) {
- log ("Failed to connect to GeoClue2 service: " + e.message);
- }
- });
- },
-
_onGetClientReady: function(result, e) {
if (e) {
log ("Failed to connect to GeoClue2 service: " + e.message);
@@ -125,7 +125,7 @@ const Geoclue = new Lang.Class({
clientPath);
if (!this.userSetLocation)
- this._findLocation();
+ this.findLocation();
},
_onLocationUpdated: function(proxy, sender, [oldPath, newPath]) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]