[gnome-maps] Sort all module imports
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Sort all module imports
- Date: Thu, 16 Oct 2014 05:49:07 +0000 (UTC)
commit 42dd720f2858abbeea599f28e462e1413418b205
Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
Date: Thu Oct 16 07:17:00 2014 +0200
Sort all module imports
Sort all module imports and divide them by local and external
modules (like in gnome-shell).
https://bugzilla.gnome.org/show_bug.cgi?id=738603
src/application.js | 13 ++++++-------
src/geoclue.js | 3 +--
src/http.js | 3 +--
src/layersPopover.js | 2 +-
src/mainWindow.js | 11 +++++------
src/mapMarker.js | 1 -
src/mapView.js | 9 ++++-----
src/mapWalker.js | 3 +--
src/notification.js | 4 ++--
src/notificationManager.js | 4 ++--
src/placeEntry.js | 2 +-
src/placeStore.js | 5 ++---
src/route.js | 2 +-
src/routeQuery.js | 3 +--
src/routeService.js | 3 +--
src/searchPopup.js | 6 +++---
src/searchResultBubble.js | 3 +--
src/settings.js | 5 ++---
src/turnPointMarker.js | 1 -
src/userLocationMarker.js | 1 -
src/utils.js | 11 +++++------
src/zoomControl.js | 2 +-
22 files changed, 41 insertions(+), 56 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index 84a9627..3abff49 100644
--- a/src/application.js
+++ b/src/application.js
@@ -21,25 +21,24 @@
* Zeeshan Ali (Khattak) <zeeshanak gnome org>
*/
-const Lang = imports.lang;
+const GLib = imports.gi.GLib;
const Gettext = imports.gettext;
-const _ = imports.gettext.gettext;
-
-const GtkClutter = imports.gi.GtkClutter;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
-const GLib = imports.gi.GLib;
+const GtkClutter = imports.gi.GtkClutter;
+const Lang = imports.lang;
+const _ = imports.gettext.gettext;
const Format = imports.format;
const Geoclue = imports.geoclue;
const GeocodeService = imports.geocodeService;
const MainWindow = imports.mainWindow;
const NotificationManager = imports.notificationManager;
-const Utils = imports.utils;
const Path = imports.path;
-const Settings = imports.settings;
const PlaceStore = imports.placeStore;
const RouteService = imports.routeService;
+const Settings = imports.settings;
+const Utils = imports.utils;
// used globally
let application = null;
diff --git a/src/geoclue.js b/src/geoclue.js
index 8fdf9c0..66106db 100644
--- a/src/geoclue.js
+++ b/src/geoclue.js
@@ -21,9 +21,8 @@
*/
const GObject = imports.gi.GObject;
-const Gio = imports.gi.Gio;
const Geocode = imports.gi.GeocodeGlib;
-
+const Gio = imports.gi.Gio;
const Lang = imports.lang;
const Application = imports.application;
diff --git a/src/http.js b/src/http.js
index 0d9b102..acd2529 100644
--- a/src/http.js
+++ b/src/http.js
@@ -20,9 +20,8 @@
* Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
-const Soup = imports.gi.Soup;
-
const Lang = imports.lang;
+const Soup = imports.gi.Soup;
function encode(data) {
if(data === null)
diff --git a/src/layersPopover.js b/src/layersPopover.js
index 511b3e6..5055a6c 100644
--- a/src/layersPopover.js
+++ b/src/layersPopover.js
@@ -19,8 +19,8 @@
*/
const Gtk = imports.gi.Gtk;
-
const Lang = imports.lang;
+
const Utils = imports.utils;
const LayersPopover = new Lang.Class({
diff --git a/src/mainWindow.js b/src/mainWindow.js
index e804a67..975e224 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -21,22 +21,21 @@
* Zeeshan Ali (Khattak) <zeeshanak gnome org>
*/
-const Gdk = imports.gi.Gdk;
const GLib = imports.gi.GLib;
-const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;
-
+const Gdk = imports.gi.Gdk;
+const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Application = imports.application;
-const MapView = imports.mapView;
-const LayersPopover = imports.layersPopover;
+const Config = imports.config;
const ContextMenu = imports.contextMenu;
+const LayersPopover = imports.layersPopover;
+const MapView = imports.mapView;
const PlaceEntry = imports.placeEntry;
const Sidebar = imports.sidebar;
const Utils = imports.utils;
-const Config = imports.config;
const ZoomControl = imports.zoomControl;
const _ = imports.gettext.gettext;
diff --git a/src/mapMarker.js b/src/mapMarker.js
index bef3ace..96185d5 100644
--- a/src/mapMarker.js
+++ b/src/mapMarker.js
@@ -24,7 +24,6 @@ const Cairo = imports.gi.cairo;
const Champlain = imports.gi.Champlain;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
-
const Lang = imports.lang;
const Mainloop = imports.mainloop;
diff --git a/src/mapView.js b/src/mapView.js
index c38485c..b24e00c 100644
--- a/src/mapView.js
+++ b/src/mapView.js
@@ -20,20 +20,19 @@
* Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
*/
-const Clutter = imports.gi.Clutter;
-const GtkChamplain = imports.gi.GtkChamplain;
const Champlain = imports.gi.Champlain;
-const Geocode = imports.gi.GeocodeGlib;
+const Clutter = imports.gi.Clutter;
const GObject = imports.gi.GObject;
-
+const Geocode = imports.gi.GeocodeGlib;
+const GtkChamplain = imports.gi.GtkChamplain;
const Lang = imports.lang;
const Application = imports.application;
-const Utils = imports.utils;
const MapWalker = imports.mapWalker;
const SearchResultMarker = imports.searchResultMarker;
const TurnPointMarker = imports.turnPointMarker;
const UserLocationMarker = imports.userLocationMarker;
+const Utils = imports.utils;
const MapType = {
STREET: Champlain.MAP_SOURCE_OSM_MAPQUEST,
diff --git a/src/mapWalker.js b/src/mapWalker.js
index 247fd9e..c9f6e86 100644
--- a/src/mapWalker.js
+++ b/src/mapWalker.js
@@ -22,10 +22,9 @@
* Damián Nohales <damiannohales gmail com>
*/
-const Clutter = imports.gi.Clutter;
const Champlain = imports.gi.Champlain;
+const Clutter = imports.gi.Clutter;
const Geocode = imports.gi.GeocodeGlib;
-
const Lang = imports.lang;
const Utils = imports.utils;
diff --git a/src/notification.js b/src/notification.js
index b65189b..fe2027f 100644
--- a/src/notification.js
+++ b/src/notification.js
@@ -21,9 +21,9 @@
*/
const Gtk = imports.gi.Gtk;
-
-const Mainloop = imports.mainloop;
const Lang = imports.lang;
+const Mainloop = imports.mainloop;
+
const Utils = imports.utils;
const Notification = new Lang.Class({
diff --git a/src/notificationManager.js b/src/notificationManager.js
index 583e16e..4a2df14 100644
--- a/src/notificationManager.js
+++ b/src/notificationManager.js
@@ -21,10 +21,10 @@
* Jonas Danielsson <jonas threetimestwo org>
*/
-const Notification = imports.notification;
-
const Lang = imports.lang;
+const Notification = imports.notification;
+
const NotificationManager = new Lang.Class({
Name: 'NotificationManager',
diff --git a/src/placeEntry.js b/src/placeEntry.js
index 37f3b00..ff05eb6 100644
--- a/src/placeEntry.js
+++ b/src/placeEntry.js
@@ -21,9 +21,9 @@
* Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
-const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;
const Geocode = imports.gi.GeocodeGlib;
+const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Application = imports.application;
diff --git a/src/placeStore.js b/src/placeStore.js
index 34df0d0..3d2e5fa 100644
--- a/src/placeStore.js
+++ b/src/placeStore.js
@@ -18,16 +18,15 @@
* Author: Jonas Danielsson <jonas threetimestwo org>
*/
-const Geocode = imports.gi.GeocodeGlib;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const GdkPixbuf = imports.gi.GdkPixbuf;
+const Geocode = imports.gi.GeocodeGlib;
const Gtk = imports.gi.Gtk;
-
const Lang = imports.lang;
-const Utils = imports.utils;
const Application = imports.application;
+const Utils = imports.utils;
const _PLACES_STORE_FILE = 'maps-places.json';
const _ICON_SIZE = 20;
diff --git a/src/route.js b/src/route.js
index e1cdb74..cda2ea8 100644
--- a/src/route.js
+++ b/src/route.js
@@ -20,8 +20,8 @@
* Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
-const Lang = imports.lang;
const Champlain = imports.gi.Champlain;
+const Lang = imports.lang;
const Utils = imports.utils;
diff --git a/src/routeQuery.js b/src/routeQuery.js
index c706aed..fa7099c 100644
--- a/src/routeQuery.js
+++ b/src/routeQuery.js
@@ -20,9 +20,8 @@
* Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
-const Geocode = imports.gi.GeocodeGlib;
const GObject = imports.gi.GObject;
-
+const Geocode = imports.gi.GeocodeGlib;
const Lang = imports.lang;
const Transportation = {
diff --git a/src/routeService.js b/src/routeService.js
index 73f2a60..6134e0b 100644
--- a/src/routeService.js
+++ b/src/routeService.js
@@ -22,9 +22,8 @@
const Champlain = imports.gi.Champlain;
const GLib = imports.gi.GLib;
-const Soup = imports.gi.Soup;
-
const Lang = imports.lang;
+const Soup = imports.gi.Soup;
const _ = imports.gettext.gettext;
const Application = imports.application;
diff --git a/src/searchPopup.js b/src/searchPopup.js
index e7d0aaa..753eb6b 100644
--- a/src/searchPopup.js
+++ b/src/searchPopup.js
@@ -18,12 +18,12 @@
* Author: Jonas Danielsson <jonas threetimestwo org>
*/
-const Gtk = imports.gi.Gtk;
const GLib = imports.gi.GLib;
-const GdkPixbuf = imports.gi.GdkPixbuf;
-
const GObject = imports.gi.GObject;
+const GdkPixbuf = imports.gi.GdkPixbuf;
+const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
+
const Utils = imports.utils;
const Columns = {
diff --git a/src/searchResultBubble.js b/src/searchResultBubble.js
index fb40535..83d7a78 100644
--- a/src/searchResultBubble.js
+++ b/src/searchResultBubble.js
@@ -22,12 +22,11 @@
const Geocode = imports.gi.GeocodeGlib;
const Gtk = imports.gi.Gtk;
-
const Lang = imports.lang;
+const _ = imports.gettext.gettext;
const MapBubble = imports.mapBubble;
const Utils = imports.utils;
-const _ = imports.gettext.gettext;
const SearchResultBubble = new Lang.Class({
Name: "SearchResultBubble",
diff --git a/src/settings.js b/src/settings.js
index 5636fae..10d1221 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -20,10 +20,9 @@
* Author: Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
-const Lang = imports.lang;
-
-const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
+const Gio = imports.gi.Gio;
+const Lang = imports.lang;
const Settings = new Lang.Class({
Name: "Settings",
diff --git a/src/turnPointMarker.js b/src/turnPointMarker.js
index 4252b64..c2f2e6a 100644
--- a/src/turnPointMarker.js
+++ b/src/turnPointMarker.js
@@ -21,7 +21,6 @@
*/
const Geocode = imports.gi.GeocodeGlib;
-
const Lang = imports.lang;
const Application = imports.application;
diff --git a/src/userLocationMarker.js b/src/userLocationMarker.js
index edd16fd..ca114c3 100644
--- a/src/userLocationMarker.js
+++ b/src/userLocationMarker.js
@@ -22,7 +22,6 @@
const Champlain = imports.gi.Champlain;
const Clutter = imports.gi.Clutter;
-
const Lang = imports.lang;
const MapMarker = imports.mapMarker;
diff --git a/src/utils.js b/src/utils.js
index 9a0a77b..d9ac452 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -21,17 +21,16 @@
* Zeeshan Ali (Khattak) <zeeshanak gnome org>
*/
-const Gdk = imports.gi.Gdk;
+const Clutter = imports.gi.Clutter;
+const Cogl = imports.gi.Cogl;
const GLib = imports.gi.GLib;
+const Gdk = imports.gi.Gdk;
+const GdkPixbuf = imports.gi.GdkPixbuf;
+const Geocode = imports.gi.GeocodeGlib;
const Gio = imports.gi.Gio;
const Gtk = imports.gi.Gtk;
const Signals = imports.signals;
-const Geocode = imports.gi.GeocodeGlib;
-const GdkPixbuf = imports.gi.GdkPixbuf;
-const Clutter = imports.gi.Clutter;
-const Cogl = imports.gi.Cogl;
const Soup = imports.gi.Soup;
-
const _ = imports.gettext.gettext;
const METRIC_SYSTEM = 1;
diff --git a/src/zoomControl.js b/src/zoomControl.js
index d565593..0f98121 100644
--- a/src/zoomControl.js
+++ b/src/zoomControl.js
@@ -19,9 +19,9 @@
* Mattias Bengtsson <mattias jc bengtsson gmail com>
*/
+const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
-const Gtk = imports.gi.Gtk;
const Utils = imports.utils;
const ZoomControl = new Lang.Class({
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]