[libshumate] Remove ShumateErrorTileSource
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] Remove ShumateErrorTileSource
- Date: Tue, 6 Apr 2021 21:11:29 +0000 (UTC)
commit 86925e40df1e3fd52ede87c0b1f93ede9721d58d
Author: James Westman <james jwestman net>
Date: Fri Mar 26 15:55:39 2021 -0500
Remove ShumateErrorTileSource
Errors are now handled using GError and
shumate_map_source_fill_tile_finish().
demos/shumate-demo-window.c | 2 +-
docs/reference/libshumate-docs.sgml | 1 -
docs/reference/libshumate-sections.txt | 18 --------
docs/reference/libshumate.types | 1 -
shumate/meson.build | 2 -
shumate/shumate-error-tile-source.c | 77 ----------------------------------
shumate/shumate-error-tile-source.h | 51 ----------------------
shumate/shumate-map-source-factory.c | 61 ---------------------------
shumate/shumate-map-source-factory.h | 4 --
shumate/shumate-view.c | 2 +-
shumate/shumate.h | 1 -
tests/coordinate.c | 2 +-
12 files changed, 3 insertions(+), 219 deletions(-)
---
diff --git a/demos/shumate-demo-window.c b/demos/shumate-demo-window.c
index 0129bb7..6011bfc 100644
--- a/demos/shumate-demo-window.c
+++ b/demos/shumate-demo-window.c
@@ -97,7 +97,7 @@ on_layers_dropdown_notify_selected (ShumateDemoWindow *self, GParamSpec *pspec,
switch (gtk_drop_down_get_selected (dropdown)) {
case 0:
factory = shumate_map_source_factory_dup_default ();
- set_map_source (self, shumate_map_source_factory_create_cached_source (factory,
SHUMATE_MAP_SOURCE_OSM_MAPNIK));
+ set_map_source (self, shumate_map_source_factory_create (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK));
break;
case 1:
set_map_source (self, SHUMATE_MAP_SOURCE (shumate_test_tile_source_new ()));
diff --git a/docs/reference/libshumate-docs.sgml b/docs/reference/libshumate-docs.sgml
index 0e3b482..01ef4cc 100644
--- a/docs/reference/libshumate-docs.sgml
+++ b/docs/reference/libshumate-docs.sgml
@@ -77,7 +77,6 @@
<title>Tile Sources</title>
<xi:include href="xml/shumate-tile-source.xml"/>
<xi:include href="xml/shumate-network-tile-source.xml"/>
- <xi:include href="xml/shumate-error-tile-source.xml"/>
</chapter>
<chapter>
<title>Tile Caches</title>
diff --git a/docs/reference/libshumate-sections.txt b/docs/reference/libshumate-sections.txt
index 87f682b..25981ed 100644
--- a/docs/reference/libshumate-sections.txt
+++ b/docs/reference/libshumate-sections.txt
@@ -195,24 +195,6 @@ ShumateNetworkTileSourceClass
ShumateNetworkTileSourcePrivate
</SECTION>
-<SECTION>
-<FILE>shumate-error-tile-source</FILE>
-<TITLE>ShumateErrorTileSource</TITLE>
-ShumateErrorTileSource
-shumate_error_tile_source_new_full
-<SUBSECTION Standard>
-SHUMATE_ERROR_TILE_SOURCE
-SHUMATE_IS_ERROR_TILE_SOURCE
-SHUMATE_TYPE_ERROR_TILE_SOURCE
-shumate_error_tile_source_get_type
-SHUMATE_ERROR_TILE_SOURCE_CLASS
-SHUMATE_IS_ERROR_TILE_SOURCE_CLASS
-SHUMATE_ERROR_TILE_SOURCE_GET_CLASS
-<SUBSECTION Private>
-ShumateErrorTileSourceClass
-ShumateErrorTileSourcePrivate
-</SECTION>
-
<SECTION>
<FILE>shumate-tile</FILE>
<TITLE>ShumateTile</TITLE>
diff --git a/docs/reference/libshumate.types b/docs/reference/libshumate.types
index 09ddd6e..bdd76b8 100644
--- a/docs/reference/libshumate.types
+++ b/docs/reference/libshumate.types
@@ -1,5 +1,4 @@
shumate_coordinate_get_type
-shumate_error_tile_source_get_type
shumate_file_cache_get_type
shumate_layer_get_type
shumate_license_get_type
diff --git a/shumate/meson.build b/shumate/meson.build
index 9bec3f0..a8d6c37 100644
--- a/shumate/meson.build
+++ b/shumate/meson.build
@@ -1,6 +1,5 @@
libshumate_public_h = [
'shumate-coordinate.h',
- 'shumate-error-tile-source.h',
'shumate-file-cache.h',
'shumate-layer.h',
'shumate-license.h',
@@ -33,7 +32,6 @@ libshumate_private_h = [
libshumate_sources = [
'shumate-coordinate.c',
'shumate-debug.c',
- 'shumate-error-tile-source.c',
'shumate-file-cache.c',
'shumate-kinetic-scrolling.c',
'shumate-layer.c',
diff --git a/shumate/shumate-map-source-factory.c b/shumate/shumate-map-source-factory.c
index 86f68c8..ce08e84 100644
--- a/shumate/shumate-map-source-factory.c
+++ b/shumate/shumate-map-source-factory.c
@@ -290,67 +290,6 @@ shumate_map_source_factory_create (ShumateMapSourceFactory *factory,
}
-/**
- * shumate_map_source_factory_create_cached_source:
- * @factory: the Factory
- * @id: the wanted map source id
- *
- * Creates a cached map source.
- *
- * Returns: (transfer none): a ready to use #ShumateMapSourceChain consisting of
- * #ShumateMapSource matching the given name and
- * an error tile source created with shumate_map_source_factory_create_error_source ().
- * Returns NULL if the source with the given name doesn't exist.
- */
-ShumateMapSource *
-shumate_map_source_factory_create_cached_source (ShumateMapSourceFactory *factory,
- const char *id)
-{
- ShumateMapSourceChain *source_chain;
- ShumateMapSource *tile_source;
- ShumateMapSource *error_source;
- guint tile_size;
-
- g_return_val_if_fail (SHUMATE_IS_MAP_SOURCE_FACTORY (factory), NULL);
-
- tile_source = shumate_map_source_factory_create (factory, id);
- if (!tile_source)
- return NULL;
-
- tile_size = shumate_map_source_get_tile_size (tile_source);
- error_source = shumate_map_source_factory_create_error_source (factory, tile_size);
-
- source_chain = shumate_map_source_chain_new ();
- shumate_map_source_chain_push (source_chain, error_source);
- shumate_map_source_chain_push (source_chain, tile_source);
-
- return SHUMATE_MAP_SOURCE (source_chain);
-}
-
-
-/**
- * shumate_map_source_factory_create_error_source:
- * @factory: the Factory
- * @tile_size: the size of the error tile
- *
- * Creates a map source generating error tiles.
- *
- * Returns: (transfer none): a ready to use map source generating error tiles.
- */
-ShumateMapSource *
-shumate_map_source_factory_create_error_source (ShumateMapSourceFactory *factory,
- guint tile_size)
-{
- ShumateMapSource *error_source;
-
- g_return_val_if_fail (SHUMATE_IS_MAP_SOURCE_FACTORY (factory), NULL);
-
- error_source = SHUMATE_MAP_SOURCE (shumate_error_tile_source_new_full ());
-
- return error_source;
-}
-
-
static int
compare_id (ShumateMapSourceDesc *a, ShumateMapSourceDesc *b)
{
diff --git a/shumate/shumate-map-source-factory.h b/shumate/shumate-map-source-factory.h
index eb4ca15..7541c35 100644
--- a/shumate/shumate-map-source-factory.h
+++ b/shumate/shumate-map-source-factory.h
@@ -46,10 +46,6 @@ ShumateMapSourceFactory *shumate_map_source_factory_dup_default (void);
ShumateMapSource *shumate_map_source_factory_create (ShumateMapSourceFactory *factory,
const char *id);
-ShumateMapSource *shumate_map_source_factory_create_cached_source (ShumateMapSourceFactory *factory,
- const char *id);
-ShumateMapSource *shumate_map_source_factory_create_error_source (ShumateMapSourceFactory *factory,
- guint tile_size);
gboolean shumate_map_source_factory_register (ShumateMapSourceFactory *factory,
ShumateMapSourceDesc *desc);
diff --git a/shumate/shumate-view.c b/shumate/shumate-view.c
index a2342a9..fff54ba 100644
--- a/shumate/shumate-view.c
+++ b/shumate/shumate-view.c
@@ -922,7 +922,7 @@ shumate_view_new_simple (void)
viewport = shumate_view_get_viewport (view);
factory = shumate_map_source_factory_dup_default ();
- source = shumate_map_source_factory_create_cached_source (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK);
+ source = shumate_map_source_factory_create (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK);
shumate_viewport_set_reference_map_source (viewport, source);
map_layer = shumate_map_layer_new (source, viewport);
shumate_view_add_layer (view, SHUMATE_LAYER (map_layer));
diff --git a/shumate/shumate.h b/shumate/shumate.h
index ad49089..f59c89e 100644
--- a/shumate/shumate.h
+++ b/shumate/shumate.h
@@ -48,7 +48,6 @@
#include "shumate/shumate-map-source-chain.h"
#include "shumate/shumate-network-tile-source.h"
-#include "shumate/shumate-error-tile-source.h"
#include "shumate/shumate-memory-cache.h"
#include "shumate/shumate-file-cache.h"
diff --git a/tests/coordinate.c b/tests/coordinate.c
index 3924aa3..004b1c1 100644
--- a/tests/coordinate.c
+++ b/tests/coordinate.c
@@ -16,7 +16,7 @@ test_coordinate_convert (void)
g_assert_nonnull (factory);
- source = shumate_map_source_factory_create_cached_source (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK);
+ source = shumate_map_source_factory_create (factory, SHUMATE_MAP_SOURCE_OSM_MAPNIK);
g_assert_nonnull (source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]