location: Adapt to new Geoclue agent interface
To be able to correctly setup dbus policy, I had to change the expected agent D-Bus API a bit: Now object path is fixed and not different for each user. https://bugzilla.gnome.org/show_bug.cgi?id=725082
This commit is contained in:
parent
fb61ab8df7
commit
8b866efe92
@ -52,11 +52,8 @@ const Indicator = new Lang.Class({
|
|||||||
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Location"), true);
|
this._item = new PopupMenu.PopupSubMenuMenuItem(_("Location"), true);
|
||||||
this._item.icon.icon_name = 'find-location-symbolic';
|
this._item.icon.icon_name = 'find-location-symbolic';
|
||||||
|
|
||||||
var credentials = new Gio.Credentials();
|
|
||||||
var uid = credentials.get_unix_user();
|
|
||||||
this._agent = Gio.DBusExportedObject.wrapJSObject(AgentIface, this);
|
this._agent = Gio.DBusExportedObject.wrapJSObject(AgentIface, this);
|
||||||
this._agent.export(Gio.DBus.system,
|
this._agent.export(Gio.DBus.system, '/org/freedesktop/GeoClue2/Agent');
|
||||||
'/org/freedesktop/GeoClue2/Agent/' + uid);
|
|
||||||
|
|
||||||
this._item.status.text = _("On");
|
this._item.status.text = _("On");
|
||||||
this._onOffAction = this._item.menu.addAction(_("Turn Off"), Lang.bind(this, this._onOnOffAction));
|
this._onOffAction = this._item.menu.addAction(_("Turn Off"), Lang.bind(this, this._onOnOffAction));
|
||||||
|
Loading…
Reference in New Issue
Block a user