[gnome-maps/wip/notifications2: 14/14] Notification test patch



commit a7f0368b3b1f73ca7afada500d33cfcbbbb00697
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date:   Sat Feb 15 06:55:27 2014 +0100

    Notification test patch
    
    With this applied, try pushing the location button or changing base
    layer.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723996

 src/application.js |    1 +
 src/mainWindow.js  |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index f185339..f19e412 100644
--- a/src/application.js
+++ b/src/application.js
@@ -103,6 +103,7 @@ const Application = new Lang.Class({
     vfunc_activate: function() {
         this._createWindow();
         notificationManager = new NotificationManager.NotificationManager(this._mainWindow.getOverlay());
+        notificationManager.showNotification(Notification.Type.NO_NETWORK);
         this._mainWindow.window.present();
     },
 
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 0d53751..72cf930 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;
 
@@ -344,6 +345,8 @@ const MainWindow = new Lang.Class({
     },
 
     _onGotoUserLocationActivate: function() {
+        Application.notificationManager.showNotification(Notification.Type.NO_LOCATION);
+        log(this._windowContent.get_children().length);
         if (this.mapView.geoclue.userSetLocation) {
             Utils.once(this.mapView.geoclue,
                        'location-changed',
@@ -363,6 +366,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]);
     },
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]