summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias Bengtsson <mattias.jc.bengtsson@gmail.com>2014-02-15 06:55:27 +0100
committerMattias Bengtsson <mattias.jc.bengtsson@gmail.com>2014-02-24 02:02:59 +0100
commitbc58e06a44b0e6965deb3a4ffea50a1e09e164d6 (patch)
treeb1a1972abc01e4904ef77fdbb389fb197e114853
parent42a63e69b1ba45715e08a6575ac20a31c1c9bed9 (diff)
downloadgnome-maps-wip/notifications3.tar.gz
Notification test patchwip/notifications3
With this applied, try pushing the location button or changing base layer. https://bugzilla.gnome.org/show_bug.cgi?id=723996
-rw-r--r--src/application.js1
-rw-r--r--src/mainWindow.js3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/application.js b/src/application.js
index 4c06bb2c..d15c7838 100644
--- a/src/application.js
+++ b/src/application.js
@@ -96,6 +96,7 @@ const Application = new Lang.Class({
let overlay = new Gtk.Overlay({ visible: true });
notificationManager = new Notification.Manager(overlay);
+ notificationManager.showNotification(Notification.Type.NO_NETWORK);
this._mainWindow = new MainWindow.MainWindow(this, overlay);
this._mainWindow.window.connect('destroy', this._onWindowDestroy.bind(this));
},
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 8e784b5c..027d9285 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -39,6 +39,7 @@ const PlaceStore = imports.placeStore;
const Utils = imports.utils;
const Config = imports.config;
const ZoomControl = imports.zoomControl;
+const Notification = imports.notification;
const _ = imports.gettext.gettext;
@@ -339,6 +340,7 @@ const MainWindow = new Lang.Class({
},
_onGotoUserLocationActivate: function() {
+ Application.notificationManager.showNotification(Notification.Type.NO_LOCATION);
if (this.mapView.geoclue.userSetLocation) {
Utils.once(this.mapView.geoclue,
'location-changed',
@@ -358,6 +360,7 @@ const MainWindow = new Lang.Class({
_onMapTypeActivate: function(action, value) {
action.set_state(value);
let [mapType, len] = value.get_string();
+ Application.notificationManager.showMessage("Changed base layer to " + mapType);
this.mapView.setMapType(MapView.MapType[mapType]);
},