[sushi] js: fix include syntax



commit a3275618cd71eee1364cab842d8db9c4c726091e
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Sat Feb 15 17:37:55 2014 -0800

    js: fix include syntax
    
    This makes sushi work correctly against gjs master.

 src/js/ui/fallbackRenderer.js |   15 +++++++++------
 src/js/ui/mainWindow.js       |    1 +
 src/js/ui/mimeHandler.js      |    2 +-
 src/js/ui/spinnerBox.js       |   11 +++++++----
 src/js/ui/utils.js            |    7 ++++++-
 src/js/viewers/audio.js       |   21 ++++++++++++---------
 src/js/viewers/evince.js      |   19 +++++++++++--------
 src/js/viewers/font.js        |   13 ++++++++-----
 src/js/viewers/gst.js         |   21 +++++++++++----------
 src/js/viewers/html.js        |   15 +++++++--------
 src/js/viewers/image.js       |   17 +++++++++--------
 src/js/viewers/text.js        |   17 +++++++++--------
 12 files changed, 91 insertions(+), 68 deletions(-)
---
diff --git a/src/js/ui/fallbackRenderer.js b/src/js/ui/fallbackRenderer.js
index a54842d..aaa94a0 100644
--- a/src/js/ui/fallbackRenderer.js
+++ b/src/js/ui/fallbackRenderer.js
@@ -23,14 +23,17 @@
  *
  */
 
-let Gtk = imports.gi.Gtk;
-let Sushi = imports.gi.Sushi;
+const Gio = imports.gi.Gio;
+const Gtk = imports.gi.Gtk;
+const GtkClutter = imports.gi.GtkClutter;
+const Sushi = imports.gi.Sushi;
 
-let Gettext = imports.gettext.domain('sushi');
-let _ = Gettext.gettext;
+const Gettext = imports.gettext.domain('sushi');
+const _ = Gettext.gettext;
+const Lang = imports.lang;
 
-let Constants = imports.util.constants;
-let Utils = imports.ui.utils;
+const Constants = imports.util.constants;
+const Utils = imports.ui.utils;
 
 function FallbackRenderer(args) {
     this._init(args);
diff --git a/src/js/ui/mainWindow.js b/src/js/ui/mainWindow.js
index b5d4436..2804add 100644
--- a/src/js/ui/mainWindow.js
+++ b/src/js/ui/mainWindow.js
@@ -23,6 +23,7 @@
  *
  */
 
+const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
 const GObject = imports.gi.GObject;
 const Gdk = imports.gi.Gdk;
diff --git a/src/js/ui/mimeHandler.js b/src/js/ui/mimeHandler.js
index 1b5110d..c6e583c 100644
--- a/src/js/ui/mimeHandler.js
+++ b/src/js/ui/mimeHandler.js
@@ -25,7 +25,7 @@
 
 const FallbackRenderer = imports.ui.fallbackRenderer;
 
-let Gio = imports.gi.Gio;
+const Gio = imports.gi.Gio;
 
 let _mimeHandler = null;
 
diff --git a/src/js/ui/spinnerBox.js b/src/js/ui/spinnerBox.js
index d4ef4f6..d31396f 100644
--- a/src/js/ui/spinnerBox.js
+++ b/src/js/ui/spinnerBox.js
@@ -23,11 +23,14 @@
  *
  */
 
-let Clutter = imports.gi.Clutter;
-let Gtk = imports.gi.Gtk;
-
-let Tweener = imports.ui.tweener;
-let Mainloop = imports.mainloop;
+const Gettext = imports.gettext.domain('sushi');
+const _ = Gettext.gettext;
+const Gtk = imports.gi.Gtk;
+const GtkClutter = imports.gi.GtkClutter;
+
+const Tweener = imports.ui.tweener;
+const Lang = imports.lang;
+const Mainloop = imports.mainloop;
 
 let SPINNER_SIZE = 48;
 let TIMEOUT = 500;
diff --git a/src/js/ui/utils.js b/src/js/ui/utils.js
index e3944b4..11c192f 100644
--- a/src/js/ui/utils.js
+++ b/src/js/ui/utils.js
@@ -23,7 +23,12 @@
  *
  */
 
-let Constants = imports.util.constants;
+const Gdk = imports.gi.Gdk;
+const Gtk = imports.gi.Gtk;
+
+const Lang = imports.lang;
+
+const Constants = imports.util.constants;
 
 let slowDownFactor = 0;
 
diff --git a/src/js/viewers/audio.js b/src/js/viewers/audio.js
index 7d47c7d..c00d953 100644
--- a/src/js/viewers/audio.js
+++ b/src/js/viewers/audio.js
@@ -23,17 +23,20 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let Gst = imports.gi.Gst;
-let Gio = imports.gi.Gio;
-
-let Gettext = imports.gettext.domain('sushi');
-let _ = Gettext.gettext;
-
-let Constants = imports.util.constants;
-let TotemMimeTypes = imports.util.totemMimeTypes;
-
-let Utils = imports.ui.utils;
+const Gio = imports.gi.Gio;
+const Gst = imports.gi.Gst;
+const Gtk = imports.gi.Gtk;
+const GtkClutter = imports.gi.GtkClutter;
+const Sushi = imports.gi.Sushi;
+
+const Gettext = imports.gettext.domain('sushi');
+const _ = Gettext.gettext;
+const Lang = imports.lang;
+
+const Constants = imports.util.constants;
+const MimeHandler = imports.ui.mimeHandler;
+const TotemMimeTypes = imports.util.totemMimeTypes;
+const Utils = imports.ui.utils;
 
 function AudioRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/evince.js b/src/js/viewers/evince.js
index cdf84d2..a680482 100644
--- a/src/js/viewers/evince.js
+++ b/src/js/viewers/evince.js
@@ -23,16 +23,19 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let EvDoc = imports.gi.EvinceDocument;
-let EvView = imports.gi.EvinceView;
-
-let Sushi = imports.gi.Sushi;
-
-let Gettext = imports.gettext.domain('sushi');
-let _ = Gettext.gettext;
-
-let Utils = imports.ui.utils;
+const EvDoc = imports.gi.EvinceDocument;
+const EvView = imports.gi.EvinceView;
+const Gtk = imports.gi.Gtk;
+const GtkClutter = imports.gi.GtkClutter;
+const Sushi = imports.gi.Sushi;
+
+const Gettext = imports.gettext.domain('sushi');
+const _ = Gettext.gettext;
+const Lang = imports.lang;
+
+const Constants = imports.util.constants;
+const MimeHandler = imports.ui.mimeHandler;
+const Utils = imports.ui.utils;
 
 function EvinceRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/font.js b/src/js/viewers/font.js
index 6e146bb..64a11cd 100644
--- a/src/js/viewers/font.js
+++ b/src/js/viewers/font.js
@@ -23,12 +23,15 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let GtkClutter = imports.gi.GtkClutter;
-let Gtk = imports.gi.Gtk;
-let GLib = imports.gi.GLib;
+const MimeHandler = imports.ui.mimeHandler;
+const Utils = imports.ui.utils;
 
-let Sushi = imports.gi.Sushi;
+const Lang = imports.lang;
+
+const GtkClutter = imports.gi.GtkClutter;
+const Gtk = imports.gi.Gtk;
+const GLib = imports.gi.GLib;
+const Sushi = imports.gi.Sushi;
 
 function FontRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/gst.js b/src/js/viewers/gst.js
index bc2d0fc..3ba8a70 100644
--- a/src/js/viewers/gst.js
+++ b/src/js/viewers/gst.js
@@ -24,18 +24,19 @@
  */
 
 imports.gi.versions.ClutterGst = '2.0';
-let ClutterGst = imports.gi.ClutterGst;
-
-let MimeHandler = imports.ui.mimeHandler;
-let Clutter = imports.gi.Clutter;
-let Gdk = imports.gi.Gdk;
-let GObject = imports.gi.GObject;
-
-let Lang = imports.lang;
-
-let Utils = imports.ui.utils;
-let Constants = imports.util.constants;
-let TotemMimeTypes = imports.util.totemMimeTypes;
+const ClutterGst = imports.gi.ClutterGst;
+const Clutter = imports.gi.Clutter;
+const Gdk = imports.gi.Gdk;
+const GObject = imports.gi.GObject;
+const Gtk = imports.gi.Gtk;
+const GtkClutter = imports.gi.GtkClutter;
+
+const Lang = imports.lang;
+
+const Constants = imports.util.constants;
+const MimeHandler = imports.ui.mimeHandler;
+const TotemMimeTypes = imports.util.totemMimeTypes;
+const Utils = imports.ui.utils;
 
 function GstRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/html.js b/src/js/viewers/html.js
index 3eb0704..8cd9aa8 100644
--- a/src/js/viewers/html.js
+++ b/src/js/viewers/html.js
@@ -23,15 +23,14 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let GtkClutter = imports.gi.GtkClutter;
-let Gtk = imports.gi.Gtk;
-let GLib = imports.gi.GLib;
-let WebKit = imports.gi.WebKit;
-
-let Sushi = imports.gi.Sushi;
-
-let Utils = imports.ui.utils;
+const GtkClutter = imports.gi.GtkClutter;
+const Gtk = imports.gi.Gtk;
+const GLib = imports.gi.GLib;
+const WebKit = imports.gi.WebKit;
+const Sushi = imports.gi.Sushi;
+
+const MimeHandler = imports.ui.mimeHandler;
+const Utils = imports.ui.utils;
 
 function HTMLRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/image.js b/src/js/viewers/image.js
index e1b7aea..2437993 100644
--- a/src/js/viewers/image.js
+++ b/src/js/viewers/image.js
@@ -23,16 +23,17 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let GdkPixbuf = imports.gi.GdkPixbuf;
-let GtkClutter = imports.gi.GtkClutter;
-let Gtk = imports.gi.Gtk;
-let GLib = imports.gi.GLib;
+const GdkPixbuf = imports.gi.GdkPixbuf;
+const GtkClutter = imports.gi.GtkClutter;
+const Gtk = imports.gi.Gtk;
+const GLib = imports.gi.GLib;
 
-let Gettext = imports.gettext.domain('sushi');
-let _ = Gettext.gettext;
+const Gettext = imports.gettext.domain('sushi');
+const _ = Gettext.gettext;
+const Lang = imports.lang;
 
-let Utils = imports.ui.utils;
+const MimeHandler = imports.ui.mimeHandler;
+const Utils = imports.ui.utils;
 
 function ImageRenderer(args) {
     this._init(args);
diff --git a/src/js/viewers/text.js b/src/js/viewers/text.js
index 02aad6c..1e5fe46 100644
--- a/src/js/viewers/text.js
+++ b/src/js/viewers/text.js
@@ -23,16 +23,17 @@
  *
  */
 
-let MimeHandler = imports.ui.mimeHandler;
-let GtkClutter = imports.gi.GtkClutter;
-let Gtk = imports.gi.Gtk;
-let GLib = imports.gi.GLib;
-let GtkSource = imports.gi.GtkSource;
-let Gio = imports.gi.Gio;
+const GtkClutter = imports.gi.GtkClutter;
+const Gtk = imports.gi.Gtk;
+const GLib = imports.gi.GLib;
+const GtkSource = imports.gi.GtkSource;
+const Gio = imports.gi.Gio;
+const Sushi = imports.gi.Sushi;
 
-let Sushi = imports.gi.Sushi;
+const MimeHandler = imports.ui.mimeHandler;
+const Utils = imports.ui.utils;
 
-let Utils = imports.ui.utils;
+const Lang = imports.lang;
 
 function TextRenderer(args) {
     this._init(args);


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