[gnome-maps] locationServiceNotification: Dismiss if service enabled
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] locationServiceNotification: Dismiss if service enabled
- Date: Tue, 10 Feb 2015 19:34:22 +0000 (UTC)
commit 00db586df02f9b246d2868f9ba38a94ff749fb8e
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Tue Feb 10 20:09:05 2015 +0100
locationServiceNotification: Dismiss if service enabled
src/locationServiceNotification.js | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/locationServiceNotification.js b/src/locationServiceNotification.js
index 185c78f..fb91955 100644
--- a/src/locationServiceNotification.js
+++ b/src/locationServiceNotification.js
@@ -24,6 +24,8 @@ const Gdk = imports.gi.Gdk;
const Gio = imports.gi.Gio;
const Lang = imports.lang;
+const Application = imports.application;
+const Geoclue = imports.geoclue;
const Notification = imports.notification;
const Utils = imports.utils;
@@ -49,6 +51,15 @@ const LocationServiceNotification = new Lang.Class({
} catch(e) {
Utils.debug('launching privacy panel failed: ' + e);
}
+
+ Application.geoclue.connect('notify::state', (function() {
+ if (!this.parent)
+ return;
+
+ if (Application.geoclue.state == Geoclue.State.ON)
+ this.dismiss();
+ }).bind(this));
+
}).bind(this));
this._ui.body.add(ui.grid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]