[sushi/alex-changes: 2/11] Use let, not const to import things in viewers



commit 3c7fdbf955b79c0b9fa9402356f0834ae68ce4a2
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Apr 29 08:23:34 2011 +0200

    Use let, not const to import things in viewers
    
    All the viewers share a context, so if any two viewers import the
    same module, then you'll get an error about redeclaration if const
    is used.

 src/js/viewers/audio.js |    4 ++--
 src/js/viewers/gst.js   |   12 ++++++------
 src/js/viewers/image.js |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/js/viewers/audio.js b/src/js/viewers/audio.js
index 8a4e75f..7020880 100644
--- a/src/js/viewers/audio.js
+++ b/src/js/viewers/audio.js
@@ -1,5 +1,5 @@
-const Gst = imports.gi.Gst;
-const Gio = imports.gi.Gio;
+let Gst = imports.gi.Gst;
+let Gio = imports.gi.Gio;
 
 let Constants = imports.util.constants;
 
diff --git a/src/js/viewers/gst.js b/src/js/viewers/gst.js
index e423d2b..e043b88 100644
--- a/src/js/viewers/gst.js
+++ b/src/js/viewers/gst.js
@@ -1,10 +1,10 @@
-const MimeHandler = imports.ui.mimeHandler;
-const ClutterGst = imports.gi.ClutterGst;
-const Clutter = imports.gi.Clutter;
-const Gdk = imports.gi.Gdk;
-const GObject = imports.gi.GObject;
+let MimeHandler = imports.ui.mimeHandler;
+let ClutterGst = imports.gi.ClutterGst;
+let Clutter = imports.gi.Clutter;
+let Gdk = imports.gi.Gdk;
+let GObject = imports.gi.GObject;
 
-const Lang = imports.lang;
+let Lang = imports.lang;
 
 let Utils = imports.ui.utils;
 let Constants = imports.util.constants;
diff --git a/src/js/viewers/image.js b/src/js/viewers/image.js
index 78614b8..3b4d6a5 100644
--- a/src/js/viewers/image.js
+++ b/src/js/viewers/image.js
@@ -1,5 +1,5 @@
-const GdkPixbuf = imports.gi.GdkPixbuf;
-const GtkClutter = imports.gi.GtkClutter;
+let GdkPixbuf = imports.gi.GdkPixbuf;
+let GtkClutter = imports.gi.GtkClutter;
 let Gtk = imports.gi.Gtk;
 
 let Utils = imports.ui.utils;



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