[libchamplain/libchamplain-0-4] Add special paths for Maemo
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain/libchamplain-0-4] Add special paths for Maemo
- Date: Fri, 29 Jan 2010 02:51:57 +0000 (UTC)
commit 2ec700186d919e6683244b3fe32d724ff0b723ac
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Mon Jan 18 10:11:15 2010 -0500
Add special paths for Maemo
All tile using apps on Maemo agreed to use the same paths
champlain/champlain-map-source-factory.h | 9 +++++++++
champlain/champlain-network-map-source.c | 9 +++++++++
configure.ac | 14 +++++++++++++-
3 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-map-source-factory.h b/champlain/champlain-map-source-factory.h
index 49226e9..7178bb7 100644
--- a/champlain/champlain-map-source-factory.h
+++ b/champlain/champlain-map-source-factory.h
@@ -67,12 +67,21 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
ChamplainMapSourceDesc *desc, ChamplainMapSourceConstructor constructor,
gpointer data);
+#ifdef USE_MAEMO
+#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "OpenStreetMap I"
+#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "OpenStreetMap II"
+#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "OpenCycleMap"
+#define CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP "Opnvkarte"
+#define CHAMPLAIN_MAP_SOURCE_OAM "OpenAerialMap"
+#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "MapsForFree Relief"
+#else
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "osm-mapnik"
#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "osm-osmarender"
#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "osm-cyclemap"
#define CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP "osm-transportmap"
#define CHAMPLAIN_MAP_SOURCE_OAM "oam"
#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "mff-relief"
+#endif
G_END_DECLS
diff --git a/champlain/champlain-network-map-source.c b/champlain/champlain-network-map-source.c
index a2c1cfc..ad29e41 100644
--- a/champlain/champlain-network-map-source.c
+++ b/champlain/champlain-network-map-source.c
@@ -377,12 +377,21 @@ static gchar *
get_filename (ChamplainNetworkMapSource *source,
ChamplainTile *tile)
{
+#ifdef USE_MAEMO
+ return g_strdup_printf ("/home/user/MyDocs/.maps" G_DIR_SEPARATOR_S
+ "%s" G_DIR_SEPARATOR_S "%d" G_DIR_SEPARATOR_S
+ "%d" G_DIR_SEPARATOR_S "%d.png",
+ champlain_map_source_get_id (CHAMPLAIN_MAP_SOURCE (source)),
+ champlain_tile_get_zoom_level (tile),
+ champlain_tile_get_x (tile), champlain_tile_get_y (tile));
+#else
return g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s" G_DIR_SEPARATOR_S
"%s" G_DIR_SEPARATOR_S "%d" G_DIR_SEPARATOR_S
"%d" G_DIR_SEPARATOR_S "%d.png", g_get_user_cache_dir (),
CACHE_SUBDIR, champlain_map_source_get_id (CHAMPLAIN_MAP_SOURCE (source)),
champlain_tile_get_zoom_level (tile),
champlain_tile_get_x (tile), champlain_tile_get_y (tile));
+#endif
}
static ClutterActor *error_actor = NULL;
diff --git a/configure.ac b/configure.ac
index 5cd975b..9d8ee32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
m4_define([champlain_major_version], [0])
m4_define([champlain_minor_version], [4])
-m4_define([champlain_micro_version], [3])
+m4_define([champlain_micro_version], [4])
m4_define([champlain_version],
[champlain_major_version.champlain_minor_version.champlain_micro_version])
m4_define([api_version],
@@ -94,6 +94,18 @@ if test x$enable_debug = xyes; then
fi
# -----------------------------------------------------------
+# Enable Maemo optimizations
+# -----------------------------------------------------------
+
+AC_ARG_ENABLE(maemo,
+ AC_HELP_STRING([--enable-maemo],[compile with maemo optimizations]),
+ [enable_maemo=yes])
+
+if test x$enable_maemo = xyes; then
+ AC_DEFINE(USE_MAEMO, [], [Enable Maemo Optimizations])
+fi
+
+# -----------------------------------------------------------
# Enable gtk
# -----------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]