[sushi] Don't use Lang.bind() outside of a class



commit 04d5aef934b2c8a9540eb7e8586dbe78c36c7a4d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Fri Jun 26 20:10:07 2015 -0700

    Don't use Lang.bind() outside of a class
    
    Makes no sense to bind "this" here, as these are just functions.

 src/js/ui/utils.js |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/js/ui/utils.js b/src/js/ui/utils.js
index 11c192f..02f655f 100644
--- a/src/js/ui/utils.js
+++ b/src/js/ui/utils.js
@@ -105,13 +105,13 @@ function createToolButton(iconName, callback) {
 }
 
 function createFullScreenButton(mainWindow) {
-    return createToolButton('view-fullscreen-symbolic', Lang.bind(this, function() {
+    return createToolButton('view-fullscreen-symbolic', function() {
         mainWindow.toggleFullScreen();
-    }));
+    });
 }
 
 function createOpenButton(file, mainWindow) {
-    return createToolButton('document-open-symbolic', Lang.bind(this, function(widget) {
+    return createToolButton('document-open-symbolic', function(widget) {
         let timestamp = Gtk.get_current_event_time();
         try {
             Gtk.show_uri(widget.get_screen(),
@@ -123,7 +123,7 @@ function createOpenButton(file, mainWindow) {
             log('Unable to execute the default application for ' +
                 file.get_uri() + ' : ' + e.toString());
         }
-    }));
+    });
 }
 
 function formatTimeString(timeVal) {


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