[gnome-maps] mainWindow: Remove unused arguments



commit 865ca352f73b8115c6a162293ff25c2bed62e244
Author: Marcus Lundblad <ml update uu se>
Date:   Mon Nov 6 22:25:52 2017 +0100

    mainWindow: Remove unused arguments
    
    https://bugzilla.gnome.org/show_bug.cgi?id=782861

 src/mainWindow.js |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 373e4fc..f9b80d5 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -63,7 +63,9 @@ var ShapeLayerFileChooser = new Lang.Class({
         ShapeLayer.SUPPORTED_TYPES.forEach((function(layerClass) {
             let filter = new Gtk.FileFilter();
             [filter, allFilter].forEach(function(f) {
-                layerClass.mimeTypes.forEach(f.add_mime_type.bind(f));
+                layerClass.mimeTypes.forEach(function(type) {
+                    f.add_mime_type(type);
+                });
             });
             filter.set_name(layerClass.displayName);
             this.add_filter(filter);
@@ -150,10 +152,12 @@ var MainWindow = new Lang.Class({
         }).bind(this));
 
         let popover = placeEntry.popover;
-        popover.connect('selected',
-                        this._mapView.grab_focus.bind(this._mapView));
-        this._mapView.view.connect('button-press-event',
-                                   popover.hide.bind(popover));
+        popover.connect('selected', (function() {
+            this._mapView.grab_focus();
+        }).bind(this));
+        this._mapView.view.connect('button-press-event', (function () {
+            popover.hide();
+        }));
         return placeEntry;
     },
 
@@ -500,8 +504,9 @@ var MainWindow = new Lang.Class({
             transient_for: this
         });
         aboutDialog.show();
-        aboutDialog.connect('response',
-                            aboutDialog.destroy.bind(aboutDialog));
+        aboutDialog.connect('response', (function() {
+            aboutDialog.destroy();
+        }));
     },
 
     _onOpenShapeLayer: function() {


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