[gnome-maps] Convert to Gjs "package.js" application conventions
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Convert to Gjs "package.js" application conventions
- Date: Mon, 5 Jan 2015 09:19:02 +0000 (UTC)
commit f4465af7d0f87c1bdd71bf9ef07714fff86437a8
Author: Damián Nohales <damiannohales gmail com>
Date: Mon Dec 22 17:21:50 2014 -0300
Convert to Gjs "package.js" application conventions
Unify resource names and GSettings schemas as org.gnome.Maps.
Remove the C shim which is not needed.
Copy the Makefiles from gtk-js-app, and replace the names appropriately
Remove the config.js and path.js modules, as their functionality
is provided by package.js
Remove C compiler dependency.
https://bugzilla.gnome.org/show_bug.cgi?id=733411
.gitignore | 9 +--
.jshintrc | 2 +-
configure.ac | 14 +--
data/Makefile.am | 70 +++++++++---
data/org.gnome.Maps.data.gresource.xml | 28 +++++
...aps.desktop.in.in => org.gnome.Maps.desktop.in} | 2 +-
...schema.xml.in => org.gnome.Maps.gschema.xml.in} | 2 +-
data/org.gnome.Maps.service.in | 3 +
po/POTFILES.in | 4 +-
src/Makefile-js.am | 42 -------
src/Makefile.am | 113 +++++++-------------
src/application.js | 9 +-
src/config.js.in | 4 -
src/gnome-maps.data.gresource.xml | 28 -----
src/main.c | 69 ------------
src/main.js | 4 +-
src/mainWindow.js | 3 +-
src/org.gnome.Maps.in | 5 +
...source.xml => org.gnome.Maps.src.gresource.xml} | 22 ++--
src/path.js.in | 4 -
src/routeService.js | 3 +-
21 files changed, 158 insertions(+), 282 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index fe33f27..1b19054 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,9 +19,8 @@ missing
data/org.gnome.Maps.appdata.xml
data/org.gnome.Maps.desktop
-data/org.gnome.Maps.desktop.in
-data/org.gnome.maps.gschema.valid
-data/org.gnome.maps.gschema.xml
+data/org.gnome.Maps.gschema.valid
+data/org.gnome.Maps.gschema.xml
m4/*.m4
@@ -36,10 +35,6 @@ po/*.gmo
po/*.sin
po/*.header
-src/config.js
src/gnome-maps
src/*.gresource
-src/path.js
-src/gnome-maps-js.[ch]
-src/gnome-maps-data.[ch]
src/org.gnome.Maps.service
diff --git a/.jshintrc b/.jshintrc
index bb1cdff..cee7941 100644
--- a/.jshintrc
+++ b/.jshintrc
@@ -78,5 +78,5 @@
"white" : false, // true: Check against strict whitespace and indentation rules
// Custom Globals
- "predef" : [ "log", "logError", "print", "printerr", "imports", "ARGV" ]
+ "predef" : [ "log", "logError", "print", "printerr", "imports", "ARGV", "pkg" ]
}
diff --git a/configure.ac b/configure.ac
index 691ef8d..6c9aa1e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,9 +5,10 @@ AC_INIT([gnome-maps],
[gnome-maps])
AC_CONFIG_HEADERS([config/config.h])
-AC_CONFIG_SRCDIR([src/main.c])
+AC_CONFIG_SRCDIR([src/main.js])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
+AC_PROG_LN_S
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
@@ -32,17 +33,9 @@ PKG_CHECK_MODULES(GNOME_MAPS, [
gobject-introspection-1.0 >= $GOBJECT_INTROSPECTION_MIN_VERSION
])
-
-# no stupid static libraries
-AM_DISABLE_STATIC
-# enable libtool
-AC_PROG_LIBTOOL
-# avoid libtool for LTCOMPILE, use it only to link
-
GLIB_GSETTINGS
-GJS_CONSOLE=`$PKG_CONFIG --variable=gjs_console gjs-1.0`
-AC_SUBST(GJS_CONSOLE)
+AC_PATH_PROG([GJS],[gjs])
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)
@@ -51,7 +44,6 @@ AC_CONFIG_FILES([
Makefile
src/Makefile
data/Makefile
- data/org.gnome.Maps.desktop.in
data/icons/Makefile
po/Makefile.in
])
diff --git a/data/Makefile.am b/data/Makefile.am
index 6a7a41a..0f9370c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,16 +1,27 @@
SUBDIRS = icons
-# The desktop files
-desktopdir = $(datadir)/applications
-desktop_DATA = \
- org.gnome.Maps.desktop
+app_resource_files =
+ $(shell $(GLIB_COMPILE_RESOURCES) \
+ --sourcedir=$(srcdir) \
+ --generate-dependencies \
+ $(srcdir)/org.gnome.Maps.data.gresource \
+ )
+org.gnome.Maps.data.gresource: org.gnome.Maps.data.gresource.xml $(app_resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
+ --target=$@ \
+ --sourcedir=$(srcdir) $<
+
+resourcedir = $(pkgdatadir)
+resource_DATA = org.gnome.Maps.data.gresource
+
+appsdir = $(datadir)/applications
+apps_DATA = org.gnome.Maps.desktop
+
@INTLTOOL_DESKTOP_RULE@
-gsettingsschema_in_files = org.gnome.maps.gschema.xml.in
-gsettings_SCHEMAS = $(gsettingsschema_in_files:.xml.in=.xml)
-.PRECIOUS: $(gsettings_SCHEMAS)
+gsettings_SCHEMAS = org.gnome.Maps.gschema.xml
- INTLTOOL_XML_NOMERGE_RULE@
+ INTLTOOL_XML_RULE@
@GSETTINGS_RULES@
appdatadir = $(datadir)/appdata
@@ -18,13 +29,38 @@ appdata_in_file = org.gnome.Maps.appdata.xml.in
appdata_DATA = $(appdata_in_file:.xml.in=.xml)
@INTLTOOL_XML_RULE@
-EXTRA_DIST= \
- $(desktop_DATA) \
- $(desktop_in_files) \
- $(appdata_in_file) \
- $(gsettingsschema_in_files)
+org.gnome.Maps.service: org.gnome.Maps.service.in
+ $(AM_V_GEN) sed \
+ -e "s|[ ]pkgdatadir@|$(pkgdatadir)|g" \
+ -e "s|[ ]pkglibdir@|$(pkglibdir)|g" \
+ $< > $@
+
+servicedir = $(datadir)/dbus-1/services
+service_DATA = org.gnome.Maps.service
+
+EXTRA_DIST = \
+ org.gnome.Maps.desktop.in \
+ org.gnome.Maps.service.in \
+ org.gnome.Maps.data.gresource.xml \
+ org.gnome.Maps.appdata.xml.in \
+ org.gnome.Maps.gschema.xml.in \
+ $(app_resource_files) \
+ $(NULL)
+
+CLEANFILES = \
+ org.gnome.Maps.service \
+ org.gnome.Maps.data.gresource \
+ org.gnome.Maps.appdata.xml \
+ org.gnome.Maps.appdata.valid \
+ $(apps_DATA) \
+ org.gnome.Maps.gschema.xml \
+ org.gnome.Maps.gschema.valid \
+ gschemas.compiled \
+ $(gsettings_SCHEMAS) \
+ $(NULL)
+
+# For uninstalled use
+all-local:
+ $(GLIB_COMPILE_SCHEMAS) $(builddir)
-CLEANFILES = \
- $(desktop_DATA) \
- $(appdata_DATA) \
- $(gsettings_SCHEMAS)
+-include $(top_srcdir)/git.mk
diff --git a/data/org.gnome.Maps.data.gresource.xml b/data/org.gnome.Maps.data.gresource.xml
new file mode 100644
index 0000000..6b68250
--- /dev/null
+++ b/data/org.gnome.Maps.data.gresource.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/maps">
+ <file preprocess="xml-stripblanks" alias="account-row.ui">../src/account-row.ui</file>
+ <file preprocess="xml-stripblanks" alias="app-menu.ui">../src/app-menu.ui</file>
+ <file preprocess="xml-stripblanks" alias="check-in-dialog.ui">../src/check-in-dialog.ui</file>
+ <file preprocess="xml-stripblanks" alias="context-menu.ui">../src/context-menu.ui</file>
+ <file preprocess="xml-stripblanks" alias="favorites-popover.ui">../src/favorites-popover.ui</file>
+ <file preprocess="xml-stripblanks" alias="layers-popover.ui">../src/layers-popover.ui</file>
+ <file preprocess="xml-stripblanks" alias="main-window.ui">../src/main-window.ui</file>
+ <file preprocess="xml-stripblanks" alias="map-bubble.ui">../src/map-bubble.ui</file>
+ <file preprocess="xml-stripblanks" alias="notification.ui">../src/notification.ui</file>
+ <file preprocess="xml-stripblanks" alias="place-entry.ui">../src/place-entry.ui</file>
+ <file preprocess="xml-stripblanks" alias="place-list-row.ui">../src/place-list-row.ui</file>
+ <file preprocess="xml-stripblanks" alias="route-entry.ui">../src/route-entry.ui</file>
+ <file preprocess="xml-stripblanks" alias="search-popup.ui">../src/search-popup.ui</file>
+ <file preprocess="xml-stripblanks" alias="search-result-bubble.ui">../src/search-result-bubble.ui</file>
+ <file preprocess="xml-stripblanks" alias="share-dialog.ui">../src/share-dialog.ui</file>
+ <file preprocess="xml-stripblanks" alias="sidebar.ui">../src/sidebar.ui</file>
+ <file preprocess="xml-stripblanks"
alias="social-place-more-results-row.ui">../src/social-place-more-results-row.ui</file>
+ <file preprocess="xml-stripblanks" alias="social-place-row.ui">../src/social-place-row.ui</file>
+ <file preprocess="xml-stripblanks" alias="user-location-bubble.ui">../src/user-location-bubble.ui</file>
+ <file preprocess="xml-stripblanks" alias="zoom-control.ui">../src/zoom-control.ui</file>
+ <file alias="application.css">gnome-maps.css</file>
+ <file alias="maptype-aerial.png">media/maptype-aerial.png</file>
+ <file alias="maptype-street.png">media/maptype-street.png</file>
+ </gresource>
+</gresources>
\ No newline at end of file
diff --git a/data/org.gnome.Maps.desktop.in.in b/data/org.gnome.Maps.desktop.in
similarity index 83%
rename from data/org.gnome.Maps.desktop.in.in
rename to data/org.gnome.Maps.desktop.in
index 9ecf859..f3f904d 100644
--- a/data/org.gnome.Maps.desktop.in.in
+++ b/data/org.gnome.Maps.desktop.in
@@ -2,7 +2,7 @@
Version=1.0
_Name=Maps
_Comment=A simple maps application
-Exec=gnome-maps
+Exec=gapplication launch org.gnome.Maps
Icon=gnome-maps
Terminal=false
Type=Application
diff --git a/data/org.gnome.maps.gschema.xml.in b/data/org.gnome.Maps.gschema.xml.in
similarity index 97%
rename from data/org.gnome.maps.gschema.xml.in
rename to data/org.gnome.Maps.gschema.xml.in
index 96df8c4..6492678 100644
--- a/data/org.gnome.maps.gschema.xml.in
+++ b/data/org.gnome.Maps.gschema.xml.in
@@ -1,5 +1,5 @@
<schemalist gettext-domain="gnome-maps">
- <schema id="org.gnome.maps" path="/org/gnome/maps/">
+ <schema id="org.gnome.Maps" path="/org/gnome/maps/">
<key name="window-size" type="ai">
<default>[768, 600]</default>
<_summary>Window size</_summary>
diff --git a/data/org.gnome.Maps.service.in b/data/org.gnome.Maps.service.in
new file mode 100644
index 0000000..f8a854f
--- /dev/null
+++ b/data/org.gnome.Maps.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Maps
+Exec= pkgdatadir@/org.gnome.Maps --gapplication-service
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 69d26c1..7cb79d8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,7 @@
[encoding: UTF-8]
data/org.gnome.Maps.appdata.xml.in
-data/org.gnome.Maps.desktop.in.in
-data/org.gnome.maps.gschema.xml.in
+data/org.gnome.Maps.desktop.in
+data/org.gnome.Maps.gschema.xml.in
src/application.js
[type: gettext/glade]src/app-menu.ui
[type: gettext/glade]src/check-in-dialog.ui
diff --git a/src/Makefile.am b/src/Makefile.am
index 3d2f61d..295f399 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,80 +1,49 @@
-BUILT_SOURCES =
-EXTRA_DIST =
-CLEANFILES =
+NULL =
-# convenience command for doing Makefile variable substitutions in non-Makefile
-# files (scripts, service files, etc.)
-do_subst = sed -e 's|@abs_top_srcdir[ ]|$(abs_top_srcdir)|g' \
- -e 's|@abs_top_builddir[ ]|$(abs_top_builddir)|g' \
- -e 's|@localedir[ ]|$(localedir)|g' \
- -e 's|@bindir[ ]|$(bindir)|g' \
- -e 's|@libdir[ ]|$(libdir)|g' \
- -e 's|@libexecdir[ ]|$(libexecdir)|g' \
- -e 's|@pkglibdir[ ]|$(pkglibdir)|g' \
- -e 's|@pkgdatadir[ ]|$(pkgdatadir)|g' \
- -e 's|@GJS_CONSOLE[ ]|$(GJS_CONSOLE)|g' \
- -e 's|@PACKAGE_NAME[ ]|$(PACKAGE_NAME)|g' \
- -e 's|@PACKAGE_VERSION[ ]|$(PACKAGE_VERSION)|g' \
- -e 's|@GETTEXT_PACKAGE[ ]|$(GETTEXT_PACKAGE)|g'
+appdir = $(pkgdatadir)
+nodist_app_SCRIPTS = org.gnome.Maps
-include $(INTROSPECTION_MAKEFILE)
-include Makefile-js.am
-
-data_files = $(shell $(GLIB_COMPILE_RESOURCES) \
+app_resource_files =
+ $(shell $(GLIB_COMPILE_RESOURCES) \
--sourcedir=$(srcdir) \
- --generate-dependencies $(srcdir)/gnome-maps.data.gresource.xml)
-
-dbusservicedir = $(datadir)/dbus-1/services
-dbusservice_DATA = org.gnome.Maps.service
+ --generate-dependencies \
+ $(srcdir)/org.gnome.Maps.src.gresource.xml \
+ )
-org.gnome.Maps.service: Makefile
- $(AM_V_GEN) (echo '[D-BUS Service]'; \
- echo 'Name=org.gnome.Maps'; \
- echo 'Exec=${bindir}/gnome-maps --gapplication-service') > $ tmp && \
- mv $ tmp $@
-
-gnome-maps-data.h: gnome-maps.data.gresource.xml $(data_files)
- $(AM_V_GEN) \
- $(GLIB_COMPILE_RESOURCES) \
+org.gnome.Maps.src.gresource: org.gnome.Maps.src.gresource.xml $(app_resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) \
--target=$@ \
- --sourcedir=$(srcdir) \
- --sourcedir=$(builddir) \
- --generate \
- --c-name gnome_maps_data $<
-gnome-maps-data.c: gnome-maps.data.gresource.xml $(data_files)
- $(AM_V_GEN) \
- $(GLIB_COMPILE_RESOURCES) \
- --target=$@ \
- --sourcedir=$(srcdir) \
- --sourcedir=$(builddir) \
- --generate \
- --c-name gnome_maps_data $<
-
-EXTRA_DIST += gnome-maps.data.gresource.xml $(data_files)
-
-data_built_sources = gnome-maps-data.c gnome-maps-data.h
-
-BUILT_SOURCES += $(data_built_sources)
-
-bin_PROGRAMS = gnome-maps
-
-CLEANFILES += \
- gnome-maps \
- $(dbusservice_DATA) \
- $(data_built_sources)
-
-gnome_maps_SOURCES = main.c \
+ --sourcedir=$(srcdir) $<
+
+resourcedir = $(pkgdatadir)
+resource_DATA = org.gnome.Maps.src.gresource
+
+org.gnome.Maps: org.gnome.Maps.in
+ $(AM_V_GEN) sed \
+ -e "s|[ ]GJS@|$(GJS)|g" \
+ -e "s|[ ]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
+ -e "s|[ ]prefix@|$(prefix)|g" \
+ -e "s|[ ]libdir@|$(libdir)|g" \
+ -e "s|[ ]pkgdatadir@|$(pkgdatadir)|g" \
+ $< > $@
+ @chmod +x $@
+
+EXTRA_DIST = \
+ org.gnome.Maps.in \
+ org.gnome.Maps.src.gresource.xml \
+ $(app_resource_files) \
+ $(service_resource_files) \
$(NULL)
-nodist_gnome_maps_SOURCES = \
- $(top_builddir)/src/gnome-maps-data.c \
- $(top_builddir)/src/gnome-maps-data.h \
- $(top_builddir)/src/gnome-maps-js.c \
- $(top_builddir)/src/gnome-maps-js.h \
+
+CLEANFILES = \
+ org.gnome.Maps \
+ org.gnome.Maps.src.gresource \
$(NULL)
-gnome_maps_CPPFLAGS = \
- $(GNOME_MAPS_CFLAGS) \
- -DLOCALEDIR=\"$(localedir)\" \
- -DGNOME_MAPS_PKGLIBDIR=\"$(pkglibdir)\"
-gnome_maps_LDADD = \
- $(GNOME_MAPS_LIBS)
+install-exec-hook:
+ $(MKDIR_P) $(DESTDIR)$(bindir)
+ $(LN_S) $(appdir)/org.gnome.Maps $(DESTDIR)$(bindir)/gnome-maps
+uninstall-hook:
+ -rm -f $(DESTDIR)$(bindir)/gnome-maps
+
+-include $(top_srcdir)/git.mk
diff --git a/src/application.js b/src/application.js
index 0cd1506..3068dd9 100644
--- a/src/application.js
+++ b/src/application.js
@@ -36,7 +36,6 @@ const Geoclue = imports.geoclue;
const GeocodeService = imports.geocodeService;
const MainWindow = imports.mainWindow;
const NotificationManager = imports.notificationManager;
-const Path = imports.path;
const PlaceStore = imports.placeStore;
const RouteService = imports.routeService;
const Settings = imports.settings;
@@ -74,9 +73,8 @@ const Application = new Lang.Class({
},
_init: function() {
- Gettext.bindtextdomain('gnome-maps', Path.LOCALE_DIR);
+ Gettext.bindtextdomain('gnome-maps', pkg.localedir);
Gettext.textdomain('gnome-maps');
- GLib.set_prgname('gnome-maps');
/* Translators: This is the program name. */
GLib.set_application_name(_("Maps"));
@@ -141,7 +139,7 @@ const Application = new Lang.Class({
},
_initServices: function() {
- settings = new Settings.Settings('org.gnome.maps');
+ settings = new Settings.Settings('org.gnome.Maps');
routeService = new RouteService.GraphHopper();
geoclue = new Geoclue.Geoclue();
geocodeService = new GeocodeService.GeocodeService();
@@ -155,7 +153,8 @@ const Application = new Lang.Class({
if (this._mainWindow)
return;
- Gtk.IconTheme.get_default().append_search_path(Path.ICONS_DIR);
+ Gtk.IconTheme.get_default().append_search_path(GLib.build_filenamev([pkg.pkgdatadir,
+ 'icons']));
let overlay = new Gtk.Overlay({ visible: true, can_focus: false });
notificationManager = new NotificationManager.NotificationManager(overlay);
this._mainWindow = new MainWindow.MainWindow(this, overlay);
diff --git a/src/main.js b/src/main.js
index be5ce27..7f903a5 100644
--- a/src/main.js
+++ b/src/main.js
@@ -23,7 +23,7 @@
const Application = imports.application;
-function start() {
+function main(args) {
let application = new Application.Application();
- return application.run(ARGV);
+ return application.run(args);
}
diff --git a/src/mainWindow.js b/src/mainWindow.js
index d09ffe0..5688499 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -29,7 +29,6 @@ const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Application = imports.application;
-const Config = imports.config;
const ContextMenu = imports.contextMenu;
const FavoritesPopover = imports.favoritesPopover;
const LayersPopover = imports.layersPopover;
@@ -329,7 +328,7 @@ const MainWindow = new Lang.Class({
'2013 Red Hat, Inc.',
license_type: Gtk.License.GPL_2_0,
logo_icon_name: 'gnome-maps',
- version: Config.PACKAGE_VERSION,
+ version: pkg.version,
website: 'https://live.gnome.org/Apps/Maps',
wrap_license: true,
diff --git a/src/org.gnome.Maps.in b/src/org.gnome.Maps.in
new file mode 100644
index 0000000..1cd7473
--- /dev/null
+++ b/src/org.gnome.Maps.in
@@ -0,0 +1,5 @@
+#! GJS@
+imports.package.start({ name: "gnome-maps",
+ version: "@PACKAGE_VERSION@",
+ prefix: "@prefix@",
+ libdir: "@libdir@" });
diff --git a/src/gnome-maps.js.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
similarity index 94%
rename from src/gnome-maps.js.gresource.xml
rename to src/org.gnome.Maps.src.gresource.xml
index d6342f4..3bd9f70 100644
--- a/src/gnome-maps.js.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
- <gresource prefix="/org/gnome/maps">
+ <gresource prefix="/org/gnome/Maps/js">
<file>accountListBox.js</file>
<file>application.js</file>
<file>checkIn.js</file>
<file>checkInDialog.js</file>
- <file>config.js</file>
<file>contextMenu.js</file>
<file>epaf.js</file>
+ <file>facebookBackend.js</file>
<file>favoritesPopover.js</file>
+ <file>foursquareBackend.js</file>
+ <file>foursquareGoaAuthorizer.js</file>
<file>geoclue.js</file>
<file>geocodeService.js</file>
<file>http.js</file>
@@ -22,7 +24,6 @@
<file>notification.js</file>
<file>notificationManager.js</file>
<file>overpass.js</file>
- <file>path.js</file>
<file>place.js</file>
<file>placeEntry.js</file>
<file>placeFormatter.js</file>
@@ -35,21 +36,18 @@
<file>searchPopup.js</file>
<file>searchResultBubble.js</file>
<file>searchResultMarker.js</file>
- <file>shareDialog.js</file>
- <file>turnPointBubble.js</file>
- <file>turnPointMarker.js</file>
+ <file>serviceBackend.js</file>
<file>settings.js</file>
+ <file>shareDialog.js</file>
<file>sidebar.js</file>
+ <file>socialPlace.js</file>
<file>socialPlaceListBox.js</file>
<file>socialPlaceMatcher.js</file>
<file>translations.js</file>
- <file>userLocationMarker.js</file>
+ <file>turnPointBubble.js</file>
+ <file>turnPointMarker.js</file>
<file>userLocationBubble.js</file>
- <file>facebookBackend.js</file>
- <file>foursquareBackend.js</file>
- <file>foursquareGoaAuthorizer.js</file>
- <file>serviceBackend.js</file>
- <file>socialPlace.js</file>
+ <file>userLocationMarker.js</file>
<file>utils.js</file>
<file>zoomControl.js</file>
</gresource>
diff --git a/src/routeService.js b/src/routeService.js
index 92f6e20..df0b2e3 100644
--- a/src/routeService.js
+++ b/src/routeService.js
@@ -27,7 +27,6 @@ const Soup = imports.gi.Soup;
const _ = imports.gettext.gettext;
const Application = imports.application;
-const Config = imports.config;
const EPAF = imports.epaf;
const HTTP = imports.http;
const Route = imports.route;
@@ -46,7 +45,7 @@ const GraphHopper = new Lang.Class({
},
_init: function() {
- this._session = new Soup.Session({ user_agent : Config.USER_AGENT });
+ this._session = new Soup.Session({ user_agent : 'gnome-maps/' + pkg.version });
this._key = "VCIHrHj0pDKb8INLpT4s5hVadNmJ1Q3vi0J4nJYP";
this._baseURL = "https://graphhopper.com/api/1/route?";
this._locale = GLib.get_language_names()[0];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]