Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libshumate for openSUSE:Factory 
checked in at 2022-10-25 11:18:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libshumate (Old)
 and      /work/SRC/openSUSE:Factory/.libshumate.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libshumate"

Tue Oct 25 11:18:39 2022 rev:4 rq:1030679 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libshumate/libshumate.changes    2022-10-14 
15:40:20.343697957 +0200
+++ /work/SRC/openSUSE:Factory/.libshumate.new.2275/libshumate.changes  
2022-10-25 11:18:51.365983538 +0200
@@ -1,0 +2,9 @@
+Sat Oct 22 11:29:40 UTC 2022 - Bj??rn Lie <[email protected]>
+
+- Update to version 1.0.2:
+  + Avoid flickering when panning the map.
+  + Fix warnings about min/max zoom levels for the viewport.
+  + Fix documentation comments.
+  + Fix cross-compilation for gi-docgen.
+
+-------------------------------------------------------------------

Old:
----
  libshumate-1.0.1.obscpio

New:
----
  libshumate-1.0.2.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libshumate.spec ++++++
--- /var/tmp/diff_new_pack.WNWtOG/_old  2022-10-25 11:18:51.917984761 +0200
+++ /var/tmp/diff_new_pack.WNWtOG/_new  2022-10-25 11:18:51.921984770 +0200
@@ -21,7 +21,7 @@
 %define soname libshumate-%{somajor}_%{sominor}-1
 
 Name:           libshumate
-Version:        1.0.1
+Version:        1.0.2
 Release:        0
 Summary:        C library providing a GtkWidget to display maps
 License:        LGPL-2.1-or-later

++++++ _service ++++++
--- /var/tmp/diff_new_pack.WNWtOG/_old  2022-10-25 11:18:51.953984842 +0200
+++ /var/tmp/diff_new_pack.WNWtOG/_new  2022-10-25 11:18:51.957984850 +0200
@@ -4,7 +4,7 @@
     <param name="url">https://gitlab.gnome.org/GNOME/libshumate.git</param>
     <param name="scm">git</param>
     <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
-    <param name="revision">refs/tags/1.0.1</param>
+    <param name="revision">refs/tags/1.0.2</param>
     <param name="versionrewrite-pattern">(.*)\+0</param>
     <param name="versionrewrite-replacement">\1</param>
   </service>

++++++ libshumate-1.0.1.obscpio -> libshumate-1.0.2.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/NEWS new/libshumate-1.0.2/NEWS
--- old/libshumate-1.0.1/NEWS   2022-09-18 21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/NEWS   2022-10-22 12:26:42.000000000 +0200
@@ -1,4 +1,12 @@
 =====================
+Version 1.0.2
+=====================
+ - Avoid flickering when panning the map
+ - Fix warnings about min/max zoom levels for the viewport
+ - Fix documentation comments
+ - Fix cross-compilation for gi-docgen
+
+=====================
 Version 1.0.1
 =====================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/meson.build 
new/libshumate-1.0.2/meson.build
--- old/libshumate-1.0.1/meson.build    2022-09-18 21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/meson.build    2022-10-22 12:26:42.000000000 +0200
@@ -1,6 +1,6 @@
 project(
   'libshumate', 'c',
-  version: '1.0.1',
+  version: '1.0.2',
   license: 'LGPLv2.1+',
   meson_version: '>= 0.53.0',
   default_options: [
@@ -81,6 +81,7 @@
   dependency('gi-docgen',
     version: '>= 2021.1',
     fallback: ['gi-docgen', 'dummy_dep'],
+    native : true,
   )
   gidocgen = find_program('gi-docgen')
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/po/LINGUAS 
new/libshumate-1.0.2/po/LINGUAS
--- old/libshumate-1.0.1/po/LINGUAS     2022-09-18 21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/po/LINGUAS     2022-10-22 12:26:42.000000000 +0200
@@ -17,6 +17,7 @@
 hr
 hu
 id
+it
 ka
 kk
 ko
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/po/it.po 
new/libshumate-1.0.2/po/it.po
--- old/libshumate-1.0.1/po/it.po       1970-01-01 01:00:00.000000000 +0100
+++ new/libshumate-1.0.2/po/it.po       2022-10-22 12:26:42.000000000 +0200
@@ -0,0 +1,42 @@
+# Italian translation for libshumate.
+# Copyright (C) 2022 libshumate's COPYRIGHT HOLDER
+# This file is distributed under the same license as the libshumate package.
+# Davide Ferracin <[email protected]>, 2022.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: libshumate main\n"
+"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libshumate/issues\n";
+"POT-Creation-Date: 2022-09-20 11:54+0000\n"
+"PO-Revision-Date: 2022-09-21 15:53+0200\n"
+"Last-Translator: Davide Ferracin <[email protected]>\n"
+"Language-Team: Italian <[email protected]>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. m is the unit for meters
+#: shumate/shumate-scale.c:197
+#, c-format
+msgid "%d??m"
+msgstr "%d??m"
+
+#. km is the unit for kilometers
+#: shumate/shumate-scale.c:200
+#, c-format
+msgid "%d??km"
+msgstr "%d??km"
+
+#. ft is the unit for feet
+#: shumate/shumate-scale.c:206
+#, c-format
+msgid "%d??ft"
+msgstr "%d??ft"
+
+#. mi is the unit for miles
+#: shumate/shumate-scale.c:209
+#, c-format
+msgid "%d??mi"
+msgstr "%d??mi"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-file-cache.h 
new/libshumate-1.0.2/shumate/shumate-file-cache.h
--- old/libshumate-1.0.1/shumate/shumate-file-cache.h   2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-file-cache.h   2022-10-22 
12:26:42.000000000 +0200
@@ -57,12 +57,12 @@
     const char *cache_key,
     const char *cache_dir);
 
-guint shumate_file_cache_get_size_limit (ShumateFileCache *file_cache);
-void shumate_file_cache_set_size_limit (ShumateFileCache *file_cache,
+guint shumate_file_cache_get_size_limit (ShumateFileCache *self);
+void shumate_file_cache_set_size_limit (ShumateFileCache *self,
     guint size_limit);
 
-const char *shumate_file_cache_get_cache_dir (ShumateFileCache *file_cache);
-const char *shumate_file_cache_get_cache_key (ShumateFileCache *file_cache);
+const char *shumate_file_cache_get_cache_dir (ShumateFileCache *self);
+const char *shumate_file_cache_get_cache_key (ShumateFileCache *self);
 
 void shumate_file_cache_purge_cache_async (ShumateFileCache *self,
                                            GCancellable *cancellable,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-map-layer.c 
new/libshumate-1.0.2/shumate/shumate-map-layer.c
--- old/libshumate-1.0.1/shumate/shumate-map-layer.c    2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-map-layer.c    2022-10-22 
12:26:42.000000000 +0200
@@ -39,14 +39,12 @@
   ShumateMapSource *map_source;
 
   GHashTable *tile_children;
-  int tile_initial_row;
-  int tile_initial_column;
-  int required_tiles_rows;
-  int required_tiles_columns;
   GHashTable *tile_fill;
 
   guint recompute_grid_idle_id;
 
+  float last_recompute_x, last_recompute_y;
+
   ShumateMemoryCache *memcache;
 
 #ifdef SHUMATE_HAS_VECTOR_RENDERER
@@ -286,11 +284,12 @@
   );
 
   // This is the (column, row) of the top left tile
-  int tile_initial_column = floor ((longitude_x - size_x) / (double) 
tile_size);
-  int tile_initial_row = floor ((latitude_y - size_y) / (double) tile_size);
-
-  int required_columns = (size_x * 2 / tile_size) + 2;
-  int required_rows = (size_y * 2 / tile_size) + 2;
+  int tile_initial_column = floor ((longitude_x - size_x) / (double) 
tile_size) - 1;
+  int tile_initial_row = floor ((latitude_y - size_y) / (double) tile_size) - 
1;
+  int tile_final_column = ceil ((longitude_x + size_x) / (double) tile_size) + 
1;
+  int tile_final_row = ceil ((latitude_y + size_y) / (double) tile_size) + 1;
+  int required_columns = tile_final_column - tile_initial_column;
+  int required_rows = tile_final_row - tile_initial_row;
 
   gboolean all_filled = TRUE;
 
@@ -314,8 +313,7 @@
         }
     }
 
-  /* Next, make sure every visible tile position has a matching ShumateTile
-   * widget. */
+  /* Next, make sure every visible tile position has a matching ShumateTile. */
   for (int x = tile_initial_column; x < tile_initial_column + 
required_columns; x ++)
     {
       for (int y = tile_initial_row; y < tile_initial_row + required_rows; y 
++)
@@ -352,10 +350,8 @@
         }
     }
 
-  self->tile_initial_column = tile_initial_column;
-  self->tile_initial_row = tile_initial_row;
-  self->required_tiles_columns = required_columns;
-  self->required_tiles_rows = required_rows;
+  self->last_recompute_y = latitude_y / (double) (tile_size * source_rows);
+  self->last_recompute_x = longitude_x / (double) (tile_size * source_columns);
 
   gtk_widget_queue_draw (GTK_WIDGET (self));
 }
@@ -540,6 +536,14 @@
     }
 }
 
+static double
+snap_coordinate (double point,
+                 double translate,
+                 double size)
+{
+  return round ((point - translate) / size) * size + translate;
+}
+
 static void
 shumate_map_layer_snapshot (GtkWidget *widget, GtkSnapshot *snapshot)
 {
@@ -554,15 +558,46 @@
   double latitude_y = shumate_map_source_get_y (self->map_source, zoom_level, 
latitude);
   double longitude_x = shumate_map_source_get_x (self->map_source, zoom_level, 
longitude);
   int tile_size = shumate_map_source_get_tile_size (self->map_source);
+  double tile_size_for_zoom = shumate_map_source_get_tile_size_at_zoom 
(self->map_source, zoom_level);
+  double map_width = shumate_map_source_get_column_count (self->map_source, 
zoom_level)
+    * tile_size_for_zoom;
+  double map_height = shumate_map_source_get_row_count (self->map_source, 
zoom_level)
+    * tile_size_for_zoom;
 
   GHashTableIter iter;
   gpointer key;
   gpointer value;
 
+  /* Because Earth is round [citation needed], cylindrical projections like
+   * Mercator wrap around at the antimeridian. Moving across the antimeridian
+   * is the same as teleporting across the world: at one frame the longitude
+   * is just less than 180, and the next it's just more than -180.
+   *
+   * ShumateMapLayer doesn't handle teleportation well. Widgets can only be
+   * added/removed between frames, but animations are calculated during the
+   * frame. This means that by the time we know about the new viewport 
location,
+   * it's too late to move tiles around. recompute_grid(), which will fix the
+   * problem, won't be called until after the current frame.
+   *
+   * To fix this, recompute_grid() remembers the most recent location
+   * it saw. Then, to reduce "teleportation", here in snapshot() we render
+   * the "copy" of the new location that is closest to the one from
+   * recompute_grid(). This just means snapping the current location to a grid
+   * translated by the old location.
+   * */
+  longitude_x = snap_coordinate (self->last_recompute_x * map_width, 
longitude_x, map_width);
+  latitude_y = snap_coordinate (self->last_recompute_y * map_height, 
latitude_y, map_height);
+
   /* Scale and rotate around the center of the view */
   gtk_snapshot_save (snapshot);
   gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (width / 2.0, height 
/ 2.0));
   gtk_snapshot_rotate (snapshot, rotation * 180 / G_PI);
+
+#define SHUMATE_DEBUG_MAP_LAYER 0
+#if SHUMATE_DEBUG_MAP_LAYER
+  gtk_snapshot_scale (snapshot, 0.5, 0.5);
+#endif
+
   gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (-width / 2.0, 
-height / 2.0));
 
   g_hash_table_iter_init (&iter, self->tile_children);
@@ -592,6 +627,17 @@
 
   gtk_snapshot_restore (snapshot);
 
+#if SHUMATE_DEBUG_MAP_LAYER
+  float border_width[] = { 3, 3, 3, 3 };
+  GdkRGBA colors[4] = {
+    { 0, 0, 0, 1 },
+    { 0, 0, 0, 1 },
+    { 0, 0, 0, 1 },
+    { 0, 0, 0, 1 },
+  };
+  gtk_snapshot_append_border (snapshot, &GSK_ROUNDED_RECT_INIT (width * 0.25, 
height * 0.25, width * 0.5, height * 0.5), border_width, colors);
+#endif
+
 #ifdef SHUMATE_HAS_VECTOR_RENDERER
   gtk_widget_snapshot_child (widget, GTK_WIDGET (self->symbols), snapshot);
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-marker-layer.c 
new/libshumate-1.0.2/shumate/shumate-marker-layer.c
--- old/libshumate-1.0.1/shumate/shumate-marker-layer.c 2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-marker-layer.c 2022-10-22 
12:26:42.000000000 +0200
@@ -372,9 +372,9 @@
  * shumate_marker_layer_new:
  * @viewport: the @ShumateViewport
  *
- * Creates a new instance of #ShumateMarkerLayer.
+ * Creates a new instance of [class@MarkerLayer].
  *
- * Returns: a new #ShumateMarkerLayer ready to be used as a container for the 
markers.
+ * Returns: a new [class@MarkerLayer] ready to be used as a container for the 
markers.
  */
 ShumateMarkerLayer *
 shumate_marker_layer_new (ShumateViewport *viewport)
@@ -390,9 +390,9 @@
  * @viewport: the @ShumateViewport
  * @mode: Selection mode
  *
- * Creates a new instance of #ShumateMarkerLayer with the specified selection 
mode.
+ * Creates a new instance of [class@MarkerLayer] with the specified selection 
mode.
  *
- * Returns: a new #ShumateMarkerLayer ready to be used as a container for the 
markers.
+ * Returns: a new [class@MarkerLayer] ready to be used as a container for the 
markers.
  */
 ShumateMarkerLayer *
 shumate_marker_layer_new_full (ShumateViewport *viewport,
@@ -440,52 +440,52 @@
 
 /**
  * shumate_marker_layer_add_marker:
- * @layer: a #ShumateMarkerLayer
- * @marker: a #ShumateMarker
+ * @self: a [class@MarkerLayer]
+ * @marker: a [class@Marker]
  *
  * Adds the marker to the layer.
  */
 void
-shumate_marker_layer_add_marker (ShumateMarkerLayer *layer,
+shumate_marker_layer_add_marker (ShumateMarkerLayer *self,
     ShumateMarker *marker)
 {
-  g_return_if_fail (SHUMATE_IS_MARKER_LAYER (layer));
+  g_return_if_fail (SHUMATE_IS_MARKER_LAYER (self));
   g_return_if_fail (SHUMATE_IS_MARKER (marker));
 
   g_signal_connect_object (G_OBJECT (marker), "notify::latitude",
-      G_CALLBACK (marker_position_notify), layer, 0);
+      G_CALLBACK (marker_position_notify), self, 0);
   g_signal_connect_object (G_OBJECT (marker), "notify::longitude",
-      G_CALLBACK (marker_position_notify), layer, 0);
+      G_CALLBACK (marker_position_notify), self, 0);
 
   /*g_signal_connect (G_OBJECT (marker), "drag-motion",
       G_CALLBACK (marker_move_by_cb), layer);*/
 
   shumate_marker_set_selected (marker, FALSE);
 
-  gtk_widget_insert_before (GTK_WIDGET(marker), GTK_WIDGET (layer), NULL);
-  update_marker_visibility (layer, marker);
+  gtk_widget_insert_before (GTK_WIDGET(marker), GTK_WIDGET (self), NULL);
+  update_marker_visibility (self, marker);
 }
 
 
 /**
  * shumate_marker_layer_remove_all:
- * @layer: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Removes all markers from the layer.
  */
 void
-shumate_marker_layer_remove_all (ShumateMarkerLayer *layer)
+shumate_marker_layer_remove_all (ShumateMarkerLayer *self)
 {
   GtkWidget *child;
 
-  g_return_if_fail (SHUMATE_IS_MARKER_LAYER (layer));
+  g_return_if_fail (SHUMATE_IS_MARKER_LAYER (self));
 
-  child = gtk_widget_get_first_child (GTK_WIDGET (layer));
+  child = gtk_widget_get_first_child (GTK_WIDGET (self));
   while (child)
     {
       GtkWidget *next = gtk_widget_get_next_sibling (child);
 
-      g_signal_handlers_disconnect_by_data (child, layer);
+      g_signal_handlers_disconnect_by_data (child, self);
       gtk_widget_unparent (child);
 
       child = next;
@@ -495,7 +495,7 @@
 
 /**
  * shumate_marker_layer_get_markers:
- * @layer: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Gets a copy of the list of all markers inserted into the layer. You should
  * free the list but not its contents.
@@ -503,14 +503,14 @@
  * Returns: (transfer container) (element-type ShumateMarker): the list
  */
 GList *
-shumate_marker_layer_get_markers (ShumateMarkerLayer *layer)
+shumate_marker_layer_get_markers (ShumateMarkerLayer *self)
 {
   GList *list = NULL;
   GtkWidget *child;
 
-  g_return_val_if_fail (SHUMATE_IS_MARKER_LAYER (layer), NULL);
+  g_return_val_if_fail (SHUMATE_IS_MARKER_LAYER (self), NULL);
 
-  for (child = gtk_widget_get_last_child (GTK_WIDGET (layer));
+  for (child = gtk_widget_get_last_child (GTK_WIDGET (self));
        child != NULL;
        child = gtk_widget_get_prev_sibling (child))
     {
@@ -524,7 +524,7 @@
 
 /**
  * shumate_marker_layer_get_selected:
- * @layer: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Gets a list of selected markers in the layer.
  *
@@ -540,12 +540,12 @@
 
 /**
  * shumate_marker_layer_select_marker:
- * @self: a #ShumateMarkerLayer
- * @marker: a #ShumateMarker that is a child of @self
+ * @self: a [class@MarkerLayer]
+ * @marker: a [class@Marker] that is a child of @self
  *
  * Selects a marker in this layer.
  *
- * If #ShumateMarkerLayer:selection-mode is %GTK_SELECTION_SINGLE or
+ * If [class@MarkerLayer]:selection-mode is %GTK_SELECTION_SINGLE or
  * %GTK_SELECTION_BROWSE, all other markers will be unselected. If the mode is
  * %GTK_SELECTION_NONE or @marker is not selectable, nothing will happen.
  *
@@ -589,12 +589,12 @@
 
 /**
  * shumate_marker_layer_unselect_marker:
- * @self: a #ShumateMarkerLayer
- * @marker: a #ShumateMarker that is a child of @self
+ * @self: a [class@MarkerLayer]
+ * @marker: a [class@Marker] that is a child of @self
  *
  * Unselects a marker in this layer.
  *
- * This works even if #ShumateMarkerLayer:selection-mode is
+ * This works even if [class@MarkerLayer]:selection-mode is
  * %GTK_SELECTION_BROWSE. Browse mode only prevents user interaction, not the
  * program, from unselecting a marker.
  */
@@ -618,8 +618,8 @@
 
 /**
  * shumate_marker_layer_remove_marker:
- * @self: a #ShumateMarkerLayer
- * @marker: a #ShumateMarker
+ * @self: a [class@MarkerLayer]
+ * @marker: a [class@Marker]
  *
  * Removes the marker from the layer.
  */
@@ -647,7 +647,7 @@
 
 /**
  * shumate_marker_layer_unselect_all_markers:
- * @layer: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Unselects all markers in the layer.
  */
@@ -668,7 +668,7 @@
 
 /**
  * shumate_marker_layer_select_all_markers:
- * @layer: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Selects all selectable markers in the layer.
  */
@@ -689,8 +689,8 @@
 
 /**
  * shumate_marker_layer_set_selection_mode:
- * @self: a #ShumateMarkerLayer
- * @mode: a #GtkSelectionMode value
+ * @self: a [class@MarkerLayer]
+ * @mode: a [[email protected]] value
  *
  * Sets the selection mode of the layer.
  *
@@ -717,7 +717,7 @@
 
 /**
  * shumate_marker_layer_get_selection_mode:
- * @self: a #ShumateMarkerLayer
+ * @self: a [class@MarkerLayer]
  *
  * Gets the selection mode of the layer.
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-marker-layer.h 
new/libshumate-1.0.2/shumate/shumate-marker-layer.h
--- old/libshumate-1.0.1/shumate/shumate-marker-layer.h 2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-marker-layer.h 2022-10-22 
12:26:42.000000000 +0200
@@ -41,22 +41,22 @@
 ShumateMarkerLayer *shumate_marker_layer_new_full (ShumateViewport *viewport,
                                                    GtkSelectionMode mode);
 
-void shumate_marker_layer_add_marker (ShumateMarkerLayer *layer,
+void shumate_marker_layer_add_marker (ShumateMarkerLayer *self,
     ShumateMarker *marker);
-void shumate_marker_layer_remove_marker (ShumateMarkerLayer *layer,
+void shumate_marker_layer_remove_marker (ShumateMarkerLayer *self,
     ShumateMarker *marker);
-void shumate_marker_layer_remove_all (ShumateMarkerLayer *layer);
-GList *shumate_marker_layer_get_markers (ShumateMarkerLayer *layer);
-GList *shumate_marker_layer_get_selected (ShumateMarkerLayer *layer);
+void shumate_marker_layer_remove_all (ShumateMarkerLayer *self);
+GList *shumate_marker_layer_get_markers (ShumateMarkerLayer *self);
+GList *shumate_marker_layer_get_selected (ShumateMarkerLayer *self);
 
 gboolean shumate_marker_layer_select_marker (ShumateMarkerLayer *self, 
ShumateMarker *marker);
 void shumate_marker_layer_unselect_marker (ShumateMarkerLayer *self, 
ShumateMarker *marker);
-void shumate_marker_layer_select_all_markers (ShumateMarkerLayer *layer);
-void shumate_marker_layer_unselect_all_markers (ShumateMarkerLayer *layer);
+void shumate_marker_layer_select_all_markers (ShumateMarkerLayer *self);
+void shumate_marker_layer_unselect_all_markers (ShumateMarkerLayer *self);
 
-void shumate_marker_layer_set_selection_mode (ShumateMarkerLayer *layer,
+void shumate_marker_layer_set_selection_mode (ShumateMarkerLayer *self,
                                               GtkSelectionMode    mode);
-GtkSelectionMode shumate_marker_layer_get_selection_mode (ShumateMarkerLayer 
*layer);
+GtkSelectionMode shumate_marker_layer_get_selection_mode (ShumateMarkerLayer 
*self);
 
 G_END_DECLS
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-path-layer.c 
new/libshumate-1.0.2/shumate/shumate-path-layer.c
--- old/libshumate-1.0.1/shumate/shumate-path-layer.c   2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-path-layer.c   2022-10-22 
12:26:42.000000000 +0200
@@ -24,9 +24,9 @@
  * A layer displaying line path between inserted [iface@Location] objects
  *
  * This layer shows a connection between inserted objects implementing the
- * [iface@Location] interface. This means that both #ShumateMarker
+ * [iface@Location] interface. This means that both [class@Marker]
  * objects and [class@Coordinate] objects can be inserted into the layer.
- * Of course, custom objects implementing the #ShumateLocation interface
+ * Of course, custom objects implementing the [iface@Location] interface
  * can be used as well.
  */
 
@@ -432,11 +432,11 @@
 
 /**
  * shumate_path_layer_new:
- * @viewport: the @ShumateViewport
+ * @viewport: the [class@Viewport]
  *
- * Creates a new instance of #ShumatePathLayer.
+ * Creates a new instance of [class@PathLayer].
  *
- * Returns: a new instance of #ShumatePathLayer.
+ * Returns: a new instance of [class@PathLayer].
  */
 ShumatePathLayer *
 shumate_path_layer_new (ShumateViewport *viewport)
@@ -473,10 +473,10 @@
 
 /**
  * shumate_path_layer_add_node:
- * @self: a #ShumatePathLayer
- * @location: a #ShumateLocation
+ * @self: a [class@PathLayer]
+ * @location: a [iface@Location]
  *
- * Adds a #ShumateLocation object to the layer.
+ * Adds a [iface@Location] object to the layer.
  * The node is prepended to the list.
  */
 void
@@ -492,9 +492,9 @@
 
 /**
  * shumate_path_layer_remove_all:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
- * Removes all #ShumateLocation objects from the layer.
+ * Removes all [iface@Location] objects from the layer.
  */
 void
 shumate_path_layer_remove_all (ShumatePathLayer *self)
@@ -520,9 +520,9 @@
 
 /**
  * shumate_path_layer_get_nodes:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
- * Gets a copy of the list of all #ShumateLocation objects inserted into the 
layer. You should
+ * Gets a copy of the list of all [iface@Location] objects inserted into the 
layer. You should
  * free the list but not its contents.
  *
  * Returns: (transfer container) (element-type ShumateLocation): the list
@@ -540,10 +540,10 @@
 
 /**
  * shumate_path_layer_remove_node:
- * @self: a #ShumatePathLayer
- * @location: a #ShumateLocation
+ * @self: a [class@PathLayer]
+ * @location: a [iface@Location]
  *
- * Removes the #ShumateLocation object from the layer.
+ * Removes the [iface@Location] object from the layer.
  */
 void
 shumate_path_layer_remove_node (ShumatePathLayer *self,
@@ -561,11 +561,11 @@
 
 /**
  * shumate_path_layer_insert_node:
- * @self: a #ShumatePathLayer
- * @location: a #ShumateLocation
- * @position: position in the list where the #ShumateLocation object should be 
inserted
+ * @self: a [class@PathLayer]
+ * @location: a [iface@Location]
+ * @position: position in the list where the [iface@Location] object should be 
inserted
  *
- * Inserts a #ShumateLocation object to the specified position.
+ * Inserts a [iface@Location] object to the specified position.
  */
 void
 shumate_path_layer_insert_node (ShumatePathLayer *self,
@@ -580,7 +580,7 @@
 
 /**
  * shumate_path_layer_set_fill_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @color: (nullable): The path's fill color or %NULL to reset to the
  *         default color. The color parameter is copied.
  *
@@ -607,7 +607,7 @@
 
 /**
  * shumate_path_layer_get_fill_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets the path's fill color.
  *
@@ -624,7 +624,7 @@
 
 /**
  * shumate_path_layer_set_stroke_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @color: (nullable): The path's stroke color or %NULL to reset to the
  *         default color. The color parameter is copied.
  *
@@ -651,7 +651,7 @@
 
 /**
  * shumate_path_layer_get_stroke_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets the path's stroke color.
  *
@@ -667,7 +667,7 @@
 
 /**
  * shumate_path_layer_set_outline_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @color: (nullable): The path's outline color or %NULL to reset to the
  *         default color. The color parameter is copied.
  *
@@ -693,7 +693,7 @@
 
 /**
  * shumate_path_layer_get_outline_color:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets the path's outline color.
  *
@@ -709,7 +709,7 @@
 
 /**
  * shumate_path_layer_set_stroke:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @value: if the path is stroked
  *
  * Sets the path to be stroked
@@ -729,7 +729,7 @@
 
 /**
  * shumate_path_layer_get_stroke:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Checks whether the path is stroked.
  *
@@ -746,7 +746,7 @@
 
 /**
  * shumate_path_layer_set_fill:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @value: if the path is filled
  *
  * Sets the path to be filled
@@ -766,7 +766,7 @@
 
 /**
  * shumate_path_layer_get_fill:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Checks whether the path is filled.
  *
@@ -783,7 +783,7 @@
 
 /**
  * shumate_path_layer_set_stroke_width:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @value: the width of the stroke (in pixels)
  *
  * Sets the width of the stroke
@@ -803,7 +803,7 @@
 
 /**
  * shumate_path_layer_get_stroke_width:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets the width of the stroke.
  *
@@ -819,7 +819,7 @@
 
 /**
  * shumate_path_layer_set_outline_width:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @value: the width of the outline (in pixels)
  *
  * Sets the width of the outline
@@ -839,7 +839,7 @@
 
 /**
  * shumate_path_layer_get_outline_width:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets the width of the outline.
  *
@@ -855,7 +855,7 @@
 
 /**
  * shumate_path_layer_set_closed:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @value: %TRUE to make the path closed
  *
  * Makes the path closed.
@@ -875,7 +875,7 @@
 
 /**
  * shumate_path_layer_get_closed:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Gets information whether the path is closed.
  *
@@ -892,7 +892,7 @@
 
 /**
  * shumate_path_layer_set_dash:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  * @dash_pattern: (element-type guint): list of integer values representing 
lengths
  *     of dashes/spaces (see cairo documentation of cairo_set_dash())
  *
@@ -924,7 +924,7 @@
 
 /**
  * shumate_path_layer_get_dash:
- * @self: a #ShumatePathLayer
+ * @self: a [class@PathLayer]
  *
  * Returns the list of dash segment lengths.
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-path-layer.h 
new/libshumate-1.0.2/shumate/shumate-path-layer.h
--- old/libshumate-1.0.1/shumate/shumate-path-layer.h   2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-path-layer.h   2022-10-22 
12:26:42.000000000 +0200
@@ -38,50 +38,50 @@
 
 ShumatePathLayer *shumate_path_layer_new (ShumateViewport *viewport);
 
-void shumate_path_layer_add_node (ShumatePathLayer *layer,
+void shumate_path_layer_add_node (ShumatePathLayer *self,
     ShumateLocation *location);
-void shumate_path_layer_remove_node (ShumatePathLayer *layer,
+void shumate_path_layer_remove_node (ShumatePathLayer *self,
     ShumateLocation *location);
-void shumate_path_layer_remove_all (ShumatePathLayer *layer);
-void shumate_path_layer_insert_node (ShumatePathLayer *layer,
+void shumate_path_layer_remove_all (ShumatePathLayer *self);
+void shumate_path_layer_insert_node (ShumatePathLayer *self,
     ShumateLocation *location,
     guint position);
-GList *shumate_path_layer_get_nodes (ShumatePathLayer *layer);
+GList *shumate_path_layer_get_nodes (ShumatePathLayer *self);
 
-GdkRGBA *shumate_path_layer_get_fill_color (ShumatePathLayer *layer);
-void shumate_path_layer_set_fill_color (ShumatePathLayer *layer,
+GdkRGBA *shumate_path_layer_get_fill_color (ShumatePathLayer *self);
+void shumate_path_layer_set_fill_color (ShumatePathLayer *self,
     const GdkRGBA *color);
 
-GdkRGBA *shumate_path_layer_get_stroke_color (ShumatePathLayer *layer);
-void shumate_path_layer_set_stroke_color (ShumatePathLayer *layer,
+GdkRGBA *shumate_path_layer_get_stroke_color (ShumatePathLayer *self);
+void shumate_path_layer_set_stroke_color (ShumatePathLayer *self,
     const GdkRGBA *color);
 
-GdkRGBA *shumate_path_layer_get_outline_color (ShumatePathLayer *layer);
-void shumate_path_layer_set_outline_color (ShumatePathLayer *layer,
+GdkRGBA *shumate_path_layer_get_outline_color (ShumatePathLayer *self);
+void shumate_path_layer_set_outline_color (ShumatePathLayer *self,
     const GdkRGBA *color);
 
-gboolean shumate_path_layer_get_fill (ShumatePathLayer *layer);
-void shumate_path_layer_set_fill (ShumatePathLayer *layer,
+gboolean shumate_path_layer_get_fill (ShumatePathLayer *self);
+void shumate_path_layer_set_fill (ShumatePathLayer *self,
     gboolean value);
 
-gboolean shumate_path_layer_get_stroke (ShumatePathLayer *layer);
-void shumate_path_layer_set_stroke (ShumatePathLayer *layer,
+gboolean shumate_path_layer_get_stroke (ShumatePathLayer *self);
+void shumate_path_layer_set_stroke (ShumatePathLayer *self,
     gboolean value);
 
-double shumate_path_layer_get_stroke_width (ShumatePathLayer *layer);
-void shumate_path_layer_set_stroke_width (ShumatePathLayer *layer,
+double shumate_path_layer_get_stroke_width (ShumatePathLayer *self);
+void shumate_path_layer_set_stroke_width (ShumatePathLayer *self,
     double value);
 
-double shumate_path_layer_get_outline_width (ShumatePathLayer *layer);
-void shumate_path_layer_set_outline_width (ShumatePathLayer *layer,
+double shumate_path_layer_get_outline_width (ShumatePathLayer *self);
+void shumate_path_layer_set_outline_width (ShumatePathLayer *self,
     double value);
 
-gboolean shumate_path_layer_get_closed (ShumatePathLayer *layer);
-void shumate_path_layer_set_closed (ShumatePathLayer *layer,
+gboolean shumate_path_layer_get_closed (ShumatePathLayer *self);
+void shumate_path_layer_set_closed (ShumatePathLayer *self,
     gboolean value);
 
-GList *shumate_path_layer_get_dash (ShumatePathLayer *layer);
-void shumate_path_layer_set_dash (ShumatePathLayer *layer,
+GList *shumate_path_layer_get_dash (ShumatePathLayer *self);
+void shumate_path_layer_set_dash (ShumatePathLayer *self,
     GList *dash_pattern);
 
 G_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-tile-downloader.c 
new/libshumate-1.0.2/shumate/shumate-tile-downloader.c
--- old/libshumate-1.0.1/shumate/shumate-tile-downloader.c      2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-tile-downloader.c      2022-10-22 
12:26:42.000000000 +0200
@@ -23,10 +23,10 @@
 /**
  * ShumateTileDownloader:
  *
- * A [[email protected]] that asynchronously downloads tiles from an 
online
+ * A [class@DataSource] that asynchronously downloads tiles from an online
  * service using a given template.
  *
- * It contains an internal [[email protected]] to cache the tiles on the 
system.
+ * It contains an internal [class@FileCache] to cache the tiles on the system.
  */
 
 struct _ShumateTileDownloader
@@ -163,10 +163,10 @@
    * A template for construting the URL to download a tile from.
    *
    * The template has the following replacements:
-   * - "#X#": The X coordinate of the tile
-   * - "#Y#": The Y coordinate of the tile
-   * - "#Z#": The zoom level of the tile
-   * - "#TMSY#": The inverted Y coordinate (i.e. tile numbering starts with 0 
at
+   * - "{x}": The X coordinate of the tile
+   * - "{y}": The Y coordinate of the tile
+   * - "{z}": The zoom level of the tile
+   * - "{tmsy}": The inverted Y coordinate (i.e. tile numbering starts with 0 
at
    * the bottom, rather than top, of the map)
    */
   properties[PROP_URL_TEMPLATE] =
@@ -231,7 +231,6 @@
 }
 
 
-#define SIZE 8
 static char *
 get_tile_uri (ShumateTileDownloader *self,
               int                    x,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-vector-renderer.c 
new/libshumate-1.0.2/shumate/shumate-vector-renderer.c
--- old/libshumate-1.0.1/shumate/shumate-vector-renderer.c      2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-vector-renderer.c      2022-10-22 
12:26:42.000000000 +0200
@@ -22,7 +22,7 @@
 /**
  * ShumateVectorRenderer:
  *
- * A [[email protected]] that renders tiles from a given vector data 
source.
+ * A [class@MapSource] that renders tiles from a given vector data source.
  */
 
 #ifdef SHUMATE_HAS_VECTOR_RENDERER
@@ -434,7 +434,7 @@
 /**
  * shumate_vector_renderer_set_sprite_sheet_data:
  * @self: a [class@VectorRenderer]
- * @sprites_pixbuf: a [[email protected]]
+ * @sprites_pixbuf: a [[email protected]]
  * @sprites_json: a JSON string
  * @error: return location for a #GError, or %NULL
  *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/shumate/shumate-viewport.c 
new/libshumate-1.0.2/shumate/shumate-viewport.c
--- old/libshumate-1.0.1/shumate/shumate-viewport.c     2022-09-18 
21:40:56.000000000 +0200
+++ new/libshumate-1.0.2/shumate/shumate-viewport.c     2022-10-22 
12:26:42.000000000 +0200
@@ -36,6 +36,9 @@
  * accessible via the interface methods.
  */
 
+#define DEFAULT_MIN_ZOOM 0
+#define DEFAULT_MAX_ZOOM 20
+
 struct _ShumateViewport
 {
   GObject parent_instance;
@@ -237,7 +240,7 @@
     g_param_spec_uint ("min-zoom-level",
                        "Min zoom level",
                        "The lowest allowed level of zoom",
-                       0, 20, 0,
+                       0, 20, DEFAULT_MIN_ZOOM,
                        G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | 
G_PARAM_STATIC_STRINGS);
 
   /**
@@ -249,7 +252,7 @@
     g_param_spec_uint ("max-zoom-level",
                        "Max zoom level",
                        "The highest allowed level of zoom",
-                       0, 20, 20,
+                       0, 20, DEFAULT_MAX_ZOOM,
                        G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | 
G_PARAM_STATIC_STRINGS);
 
   /**
@@ -292,6 +295,10 @@
 static void
 shumate_viewport_init (ShumateViewport *self)
 {
+  /* We need to set these here, otherwise the max_zoom >= min_zoom check in
+   * the setter functions may fail if they're not called in the right order. */
+  self->min_zoom_level = DEFAULT_MIN_ZOOM;
+  self->max_zoom_level = DEFAULT_MAX_ZOOM;
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libshumate-1.0.1/tests/viewport.c 
new/libshumate-1.0.2/tests/viewport.c
--- old/libshumate-1.0.1/tests/viewport.c       2022-09-18 21:40:56.000000000 
+0200
+++ new/libshumate-1.0.2/tests/viewport.c       2022-10-22 12:26:42.000000000 
+0200
@@ -30,11 +30,11 @@
   ShumateViewport *viewport;
 
   viewport = shumate_viewport_new ();
-  g_assert_cmpuint (shumate_viewport_get_max_zoom_level (viewport), ==, 0);
-
-  shumate_viewport_set_max_zoom_level (viewport, 20);
   g_assert_cmpuint (shumate_viewport_get_max_zoom_level (viewport), ==, 20);
 
+  shumate_viewport_set_max_zoom_level (viewport, 17);
+  g_assert_cmpuint (shumate_viewport_get_max_zoom_level (viewport), ==, 17);
+
   /* Setting the maximum zoom level must update the current zoom level too */
   shumate_viewport_set_zoom_level (viewport, 15);
   shumate_viewport_set_max_zoom_level (viewport, 10);
@@ -48,19 +48,19 @@
 
   viewport = shumate_viewport_new ();
   g_assert_cmpuint (shumate_viewport_get_min_zoom_level (viewport), ==, 0);
-  g_assert_cmpuint (shumate_viewport_get_max_zoom_level (viewport), ==, 0);
+  g_assert_cmpuint (shumate_viewport_get_max_zoom_level (viewport), ==, 20);
 
   /* Can't set min zoom level > max zoom level */
   g_test_expect_message ("shumate",
                          G_LOG_LEVEL_CRITICAL,
                          "shumate_viewport_set_min_zoom_level: assertion 
'min_zoom_level <= self->max_zoom_level' failed");
 
-  shumate_viewport_set_min_zoom_level (viewport, 5);
+  shumate_viewport_set_min_zoom_level (viewport, 21);
   g_test_assert_expected_messages ();
   g_assert_cmpuint (shumate_viewport_get_min_zoom_level (viewport), ==, 0);
 
-  shumate_viewport_set_max_zoom_level (viewport, 15);
   shumate_viewport_set_min_zoom_level (viewport, 5);
+  shumate_viewport_set_max_zoom_level (viewport, 15);
 
   /* Equally, can't set max zoom level < min zoom level */
   g_test_expect_message ("shumate",
@@ -127,7 +127,7 @@
                                NULL);
 
   /* Max zoom level */
-  for (i = 20; i > 15; i--)
+  for (i = 10; i > 5; i--)
     shumate_viewport_set_max_zoom_level (viewport, i);
   g_assert_cmpuint (max_zoom_level_notify_counter, ==, 5);
 

++++++ libshumate.obsinfo ++++++
--- /var/tmp/diff_new_pack.WNWtOG/_old  2022-10-25 11:18:52.141985258 +0200
+++ /var/tmp/diff_new_pack.WNWtOG/_new  2022-10-25 11:18:52.145985267 +0200
@@ -1,5 +1,5 @@
 name: libshumate
-version: 1.0.1
-mtime: 1663530056
-commit: 062c61815d2875beee19a1c704c473be8fabb3a7
+version: 1.0.2
+mtime: 1666434402
+commit: bcaeede96beb0ede116343aada1a25bab2a16ea4
 

Reply via email to