]> err.no Git - libchamplain/commitdiff
Remove non filename friendly caracters from map ids and use them as directory name
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 12 Jun 2009 03:40:16 +0000 (23:40 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Fri, 12 Jun 2009 03:40:16 +0000 (23:40 -0400)
champlain/champlain-map-source-factory.c
champlain/champlain-map-source-factory.h
champlain/champlain-network-map-source.c

index a1d010d0febde322e5f981e49d5cca269027f6ce..23ef31d8c367eb18159c9868082f85e5d3937185 100644 (file)
@@ -299,6 +299,9 @@ champlain_map_source_factory_get_list (ChamplainMapSourceFactory *factory)
  * Returns a ready to use #ChamplainMapSource matching the given name, returns
  * NULL is none match.
  *
+ * The id should not contain any character that can't be in a filename as it
+ * will be used as the cache directory name for that map source.
+ *
  * Since: 0.4
  */
 ChamplainMapSource *
index 8bd869ed4fca60d2b4d5e78082412f96f235afec..1782c429cf48b9af9a23b8ce789e8ae9baae0bec 100644 (file)
@@ -69,11 +69,11 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
     ChamplainMapSourceDesc *desc, ChamplainMapSourceConstructor constructor,
     gpointer user_data);
 
-#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_MAPNIK "osm-mapnik"
+#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "osm-osmarender"
+#define CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP "osm-cyclemap"
 #define CHAMPLAIN_MAP_SOURCE_OAM "oam"
-#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "mff::relief"
+#define CHAMPLAIN_MAP_SOURCE_MFF_RELIEF "mff-relief"
 
 G_END_DECLS
 
index 1860c80652a0981ea96e8133521e917a14649d7a..9591cd97147583b2fb8a9d54f78f36e73f357125 100644 (file)
@@ -362,7 +362,7 @@ get_filename (ChamplainNetworkMapSource *source,
   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_name (CHAMPLAIN_MAP_SOURCE (source)),
+             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));
 }