Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libshumate for openSUSE:Factory checked in at 2025-09-24 15:21:41 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libshumate (Old) and /work/SRC/openSUSE:Factory/.libshumate.new.27445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libshumate" Wed Sep 24 15:21:41 2025 rev:20 rq:1305481 version:1.5.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/libshumate/libshumate.changes 2025-03-18 17:39:15.336405273 +0100 +++ /work/SRC/openSUSE:Factory/.libshumate.new.27445/libshumate.changes 2025-09-24 15:22:15.051218059 +0200 @@ -1,0 +2,21 @@ +Fri Sep 12 07:52:43 UTC 2025 - Dominique Leuenberger <[email protected]> + +- Update to version 1.5.0.1: + + Re-tagged due to broken 1.5.0 tag +- Changes from version 1.5.0: + + No changes since 1.5.beta + +------------------------------------------------------------------- +Tue Sep 2 13:25:12 UTC 2025 - Dominique Leuenberger <[email protected]> + +- Update to version 1.5.beta: + + Add ability to set alignment for markers + + Add missing since annotations for SimpleMap + + Update minimum Meson version to 0.57.0 + + Documentation fixes +- Changes from version 1.5.alpha: + + Add number of clicks property to symbol clicked events + + Add canonical documentation link + + Update header for SimpleMap to reflect current API + +------------------------------------------------------------------- Old: ---- libshumate-1.4.0.obscpio New: ---- libshumate-1.5.0.1.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libshumate.spec ++++++ --- /var/tmp/diff_new_pack.ZAGbcZ/_old 2025-09-24 15:22:15.595240975 +0200 +++ /var/tmp/diff_new_pack.ZAGbcZ/_new 2025-09-24 15:22:15.595240975 +0200 @@ -1,7 +1,7 @@ # # spec file for package libshumate # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ %bcond_with profiling Name: libshumate -Version: 1.4.0 +Version: 1.5.0.1 Release: 0 Summary: C library providing a GtkWidget to display maps License: Apache-2.0 AND LGPL-2.1-or-later AND BSD-3-Clause AND CC0-1.0 AND CC-BY-3.0 AND GFDL-1.2-only ++++++ _service ++++++ --- /var/tmp/diff_new_pack.ZAGbcZ/_old 2025-09-24 15:22:15.627242323 +0200 +++ /var/tmp/diff_new_pack.ZAGbcZ/_new 2025-09-24 15:22:15.631242492 +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">1.4.0</param> + <param name="revision">1.5.0.1</param> <param name="versionrewrite-pattern">(.*)\+0</param> <param name="versionrewrite-replacement">\1</param> </service> ++++++ libshumate-1.4.0.obscpio -> libshumate-1.5.0.1.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/.gitlab-ci.yml new/libshumate-1.5.0.1/.gitlab-ci.yml --- old/libshumate-1.4.0/.gitlab-ci.yml 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/.gitlab-ci.yml 2025-09-12 08:00:29.000000000 +0200 @@ -26,7 +26,7 @@ - ninja -C _build coverage - mv _build/meson-logs/coveragereport coverage - meson dist -C _build --no-tests - coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/' + coverage: '/^\s*lines\.*:\s+([\d.]+\%)\s+/' artifacts: paths: - docs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/NEWS new/libshumate-1.5.0.1/NEWS --- old/libshumate-1.4.0/NEWS 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/NEWS 2025-09-12 08:00:29.000000000 +0200 @@ -1,4 +1,29 @@ =================== +Version 1.5.0.1 +=================== + - Re-tagged due to broken 1.5.0 tag + +=================== +Version 1.5.0 +=================== + - No changes since 1.5.beta + +=================== +Version 1.5.beta +=================== + - Add ability to set alignment for markers + - Add missing since annotations for SimpleMap + - Update minimum Meson version to 0.57.0 + - Documentation fixes + +=================== +Version 1.5.alpha +=================== + - Add number of clicks property to symbol clicked events + - Add canonical documentation link + - Update header for SimpleMap to reflect current API + +=================== Version 1.4.0 =================== - No changes since 1.4.rc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/demos/shumate-demo-window.c new/libshumate-1.5.0.1/demos/shumate-demo-window.c --- old/libshumate-1.4.0/demos/shumate-demo-window.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/demos/shumate-demo-window.c 2025-09-12 08:00:29.000000000 +0200 @@ -50,6 +50,7 @@ { GtkWidget *image = gtk_image_new_from_icon_name ("map-marker-symbolic"); ShumateMarker *marker = shumate_marker_new (); + gtk_widget_set_valign (GTK_WIDGET (marker), GTK_ALIGN_END); shumate_location_set_location (SHUMATE_LOCATION (marker), lat, lng); shumate_marker_set_child (marker, image); @@ -67,20 +68,22 @@ const char *name = shumate_symbol_event_get_tag (event, "name"); if (name != NULL) - g_print ("Symbol %s (%s) clicked in layer %s (%s) at (%f, %f)\n", + g_print ("Symbol %s (%s) clicked in layer %s (%s) at (%f, %f), click %d\n", shumate_symbol_event_get_feature_id (event), name, shumate_symbol_event_get_layer (event), shumate_symbol_event_get_source_layer (event), shumate_location_get_latitude (SHUMATE_LOCATION (event)), - shumate_location_get_longitude (SHUMATE_LOCATION (event))); + shumate_location_get_longitude (SHUMATE_LOCATION (event)), + shumate_symbol_event_get_n_press (event)); else - g_print ("Symbol %s clicked in layer %s (%s) at (%f, %f)\n", + g_print ("Symbol %s clicked in layer %s (%s) at (%f, %f), click %d\n", shumate_symbol_event_get_feature_id (event), shumate_symbol_event_get_layer (event), shumate_symbol_event_get_source_layer (event), shumate_location_get_latitude (SHUMATE_LOCATION (event)), - shumate_location_get_longitude (SHUMATE_LOCATION (event))); + shumate_location_get_longitude (SHUMATE_LOCATION (event)), + shumate_symbol_event_get_n_press (event)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/docs/libshumate.toml.in new/libshumate-1.5.0.1/docs/libshumate.toml.in --- old/libshumate-1.4.0/docs/libshumate.toml.in 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/docs/libshumate.toml.in 2025-09-12 08:00:29.000000000 +0200 @@ -6,6 +6,7 @@ browse_url = "https://gitlab.gnome.org/GNOME/libshumate/" repository_url = "https://gitlab.gnome.org/GNOME/libshumate.git" website_url = "https://gnome.pages.gitlab.gnome.org/libshumate" +docs_url = "https://gnome.pages.gitlab.gnome.org/libshumate" logo_url = "libshumate-r.svg" dependencies = [ "GObject-2.0", @@ -17,7 +18,7 @@ [dependencies."GObject-2.0"] name = "GObject" description = "The base type system library" -docs_url = "https://developer.gnome.org/gobject/stable" +docs_url = "https://docs.gtk.org/gobject/" [dependencies."Gtk-4.0"] name = "GTK" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/docs/urlmap.js new/libshumate-1.5.0.1/docs/urlmap.js --- old/libshumate-1.4.0/docs/urlmap.js 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/docs/urlmap.js 2025-09-12 08:00:29.000000000 +0200 @@ -5,6 +5,7 @@ // A map between namespaces and base URLs for their online documentation baseURLs = [ + [ 'GObject', 'https://docs.gtk.org/gobject/' ], [ 'Gdk', 'https://docs.gtk.org/gdk4/' ], [ 'GdkWayland', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-wayland/' ], [ 'GdkX11', 'https://gnome.pages.gitlab.gnome.org/gtk/gdk4-x11/' ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/meson.build new/libshumate-1.5.0.1/meson.build --- old/libshumate-1.4.0/meson.build 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/meson.build 2025-09-12 08:00:29.000000000 +0200 @@ -1,8 +1,8 @@ project( 'libshumate', 'c', - version: '1.4.0', + version: '1.5.0.1', license: 'LGPLv2.1+', - meson_version: '>= 0.55.0', + meson_version: '>= 0.57.0', default_options: [ 'buildtype=debugoptimized', ] @@ -63,6 +63,7 @@ gtk_dep = dependency('gtk4') libsoup_dep = dependency('libsoup-3.0', version: '>= 3.0') +gi_scanner_dep = find_program('g-ir-scanner', required: false) introspection_dep = dependency('gobject-introspection-1.0', version: introspection_req, required: false) vapigen_dep = dependency('vapigen', version: vala_req, required: false) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/po/LINGUAS new/libshumate-1.5.0.1/po/LINGUAS --- old/libshumate-1.4.0/po/LINGUAS 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/po/LINGUAS 2025-09-12 08:00:29.000000000 +0200 @@ -47,5 +47,6 @@ sv tr uk +uz zh_CN zh_TW diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/po/uz.po new/libshumate-1.5.0.1/po/uz.po --- old/libshumate-1.4.0/po/uz.po 1970-01-01 01:00:00.000000000 +0100 +++ new/libshumate-1.5.0.1/po/uz.po 2025-09-12 08:00:29.000000000 +0200 @@ -0,0 +1,66 @@ +# Uzbek (Latin) translation for libshumate. +# Copyright (C) 2025 libshumate's COPYRIGHT HOLDER +# This file is distributed under the same license as the libshumate package. +# Islom Karimov <[email protected]>, 2025. +# +msgid "" +msgstr "" +"Project-Id-Version: libshumate main\n" +"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/libshumate/issues/\n" +"POT-Creation-Date: 2025-05-10 20:39+0000\n" +"PO-Revision-Date: 2025-05-23 18:34+0500\n" +"Last-Translator: Baxrom Raxmatov\n" +"Language-Team: Uzbek (Latin) <Uzbek>\n" +"Language: uz\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.6\n" + +#: data/shumate-inspector-page.ui:32 +msgid "Show Debug Overlay" +msgstr "Debugger oynasini ko'rsatish" + +#: data/shumate-inspector-page.ui:62 +msgid "Show Tile Bounds" +msgstr "Tile chegaralarini ko'rsatish" + +#: data/shumate-inspector-page.ui:92 +msgid "Show Collision Boxes" +msgstr "To'qnashuv qutilarini ko'rsatish" + +#: data/shumate-simple-map.ui:39 +msgid "Zoom In" +msgstr "Yaqinlashtirish" + +#: data/shumate-simple-map.ui:53 +msgid "Zoom Out" +msgstr "Uzoqlashtirish" + +#. 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 mil" + +#: shumate/shumate-inspector-page.c:61 +msgid "Shumate" +msgstr "Shumate" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/meson.build new/libshumate-1.5.0.1/shumate/meson.build --- old/libshumate-1.4.0/shumate/meson.build 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/meson.build 2025-09-12 08:00:29.000000000 +0200 @@ -214,6 +214,14 @@ 'Gtk-4.0', 'Gsk-4.0', ] + libshumate_gir_extra_args = [ + '-DSHUMATE_COMPILATION', + ] + if gi_scanner_dep.version().version_compare('>=1.83.2') + libshumate_gir_extra_args += [ + '--doc-format=gi-docgen', + ] + endif libshumate_gir = gnome.generate_gir( libshumate_lib, @@ -229,9 +237,7 @@ install_dir_gir: girdir, install_dir_typelib: typelibdir, fatal_warnings: true, - extra_args: [ - '-DSHUMATE_COMPILATION', - ] + extra_args: libshumate_gir_extra_args, ) libshumate_dep_sources += [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-map-layer.c new/libshumate-1.5.0.1/shumate/shumate-map-layer.c --- old/libshumate-1.4.0/shumate/shumate-map-layer.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-map-layer.c 2025-09-12 08:00:29.000000000 +0200 @@ -35,6 +35,10 @@ * * A [[email protected]] implementation that fetches tiles from a [[email protected]] * and draws them as a grid. + * + * ## CSS nodes + * + * `ShumatePoint` has a single CSS node with the name “map-layer”. */ struct _ShumateMapLayer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-map.c new/libshumate-1.5.0.1/shumate/shumate-map.c --- old/libshumate-1.4.0/shumate/shumate-map.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-map.c 2025-09-12 08:00:29.000000000 +0200 @@ -37,6 +37,10 @@ * layer and won't show anything. A [[email protected]] can be added or removed * using the [[email protected]_layer] or [[email protected]_layer] * methods. + * + * ## CSS nodes + * + * `ShumateMap` has a single CSS node with the name “map-view”. */ #include "shumate-map.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-marker-layer.c new/libshumate-1.5.0.1/shumate/shumate-marker-layer.c --- old/libshumate-1.4.0/shumate/shumate-marker-layer.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-marker-layer.c 2025-09-12 08:00:29.000000000 +0200 @@ -97,6 +97,63 @@ } static void +calculate_local_marker_offset (ShumateMarker *marker, + int marker_width, int marker_height, + gdouble *x, gdouble *y) +{ + double hotspot_x, hotspot_y; + + g_assert (SHUMATE_IS_MARKER (marker)); + + shumate_marker_get_hotspot (marker, &hotspot_x, &hotspot_y); + if (G_UNLIKELY (hotspot_x > marker_width)) { + g_warning ("Marker x hotspot (%lf) is more than the marker width (%d).", hotspot_x, marker_width); + hotspot_x = marker_width; + } + + if (G_UNLIKELY (hotspot_y > marker_height)) { + g_warning ("Marker y hotspot (%lf) is more than the marker height (%d).", hotspot_y, marker_height); + hotspot_y = marker_height; + } + + if (hotspot_x < 0) { + switch (gtk_widget_get_halign (GTK_WIDGET (marker))) { + case GTK_ALIGN_START: + if (gtk_widget_get_direction (GTK_WIDGET (marker)) == GTK_TEXT_DIR_RTL) + *x -= marker_width; + break; + case GTK_ALIGN_END: + if (gtk_widget_get_direction (GTK_WIDGET (marker)) != GTK_TEXT_DIR_RTL) + *x -= marker_width; + break; + default: + *x = floorf (*x - marker_width/2.f); + break; + } + } else { + if (gtk_widget_get_direction (GTK_WIDGET (marker)) == GTK_TEXT_DIR_RTL) + *x -= marker_width - hotspot_x; + else + *x -= hotspot_x; + } + + if (hotspot_y < 0) { + switch (gtk_widget_get_valign (GTK_WIDGET (marker))) { + case GTK_ALIGN_START: + break; + case GTK_ALIGN_END: + *y -= marker_height; + break; + default: + *y = floorf (*y - marker_height/2.f); + break; + } + } else { + *y -= hotspot_y; + } +} + +static void update_marker_visibility (ShumateMarkerLayer *layer, ShumateMarker *marker) { @@ -125,8 +182,7 @@ gtk_widget_measure (GTK_WIDGET (marker), GTK_ORIENTATION_VERTICAL, -1, 0, &marker_height, NULL, NULL); shumate_viewport_location_to_widget_coords (viewport, GTK_WIDGET (layer), lat, lon, &x, &y); - x = floorf (x - marker_width/2.f); - y = floorf (y - marker_height/2.f); + calculate_local_marker_offset (marker, marker_width, marker_height, &x, &y); within_viewport = x > -marker_width && x <= width && y > -marker_height && y <= height && @@ -199,8 +255,7 @@ gtk_widget_measure (child, GTK_ORIENTATION_VERTICAL, -1, 0, &marker_height, NULL, NULL); shumate_viewport_location_to_widget_coords (viewport, widget, lat, lon, &x, &y); - x = floorf (x - marker_width/2.f); - y = floorf (y - marker_height/2.f); + calculate_local_marker_offset (SHUMATE_MARKER (child), marker_width, marker_height, &x, &y); allocation.x = x; allocation.y = y; @@ -467,6 +522,14 @@ G_CALLBACK (marker_position_notify), self, 0); g_signal_connect_object (G_OBJECT (marker), "notify::longitude", G_CALLBACK (marker_position_notify), self, 0); + g_signal_connect_object (G_OBJECT (marker), "notify::x-hotspot", + G_CALLBACK (marker_position_notify), self, 0); + g_signal_connect_object (G_OBJECT (marker), "notify::y-hotspot", + G_CALLBACK (marker_position_notify), self, 0); + g_signal_connect_object (G_OBJECT (marker), "notify::halign", + G_CALLBACK (marker_position_notify), self, 0); + g_signal_connect_object (G_OBJECT (marker), "notify::valign", + G_CALLBACK (marker_position_notify), self, 0); /*g_signal_connect (G_OBJECT (marker), "drag-motion", G_CALLBACK (marker_move_by_cb), layer);*/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-marker.c new/libshumate-1.5.0.1/shumate/shumate-marker.c --- old/libshumate-1.4.0/shumate/shumate-marker.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-marker.c 2025-09-12 08:00:29.000000000 +0200 @@ -33,6 +33,10 @@ * instance to add a [[email protected]] with a pin image and add the * [[email protected]] controller to listen to click events and show * a [[email protected]] with the description of the marker. + * + * ## CSS nodes + * + * `ShumateMarker` has a single CSS node with the name “map-marker”. */ #include "shumate-marker.h" @@ -50,6 +54,8 @@ { PROP_SELECTABLE = 1, PROP_CHILD, + PROP_X_HOTSPOT, + PROP_Y_HOTSPOT, N_PROPERTIES, PROP_LONGITUDE, @@ -62,6 +68,8 @@ { double lon; double lat; + double x_hotspot; + double y_hotspot; gboolean selected; @@ -156,6 +164,14 @@ g_value_set_double (value, priv->lat); break; + case PROP_X_HOTSPOT: + g_value_set_double (value, priv->x_hotspot); + break; + + case PROP_Y_HOTSPOT: + g_value_set_double (value, priv->y_hotspot); + break; + case PROP_SELECTABLE: g_value_set_boolean (value, priv->selectable); break; @@ -195,6 +211,14 @@ break; } + case PROP_X_HOTSPOT: + shumate_marker_set_hotspot (marker, g_value_get_double (value), priv->y_hotspot); + break; + + case PROP_Y_HOTSPOT: + shumate_marker_set_hotspot (marker, priv->x_hotspot, g_value_get_double (value)); + break; + case PROP_SELECTABLE: { gboolean bvalue = g_value_get_boolean (value); @@ -258,6 +282,34 @@ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + /** + * ShumateMarker:x-hotspot: + * + * The x hotspot of the marker, a negative value means that the actual + * x hotspot is calculated with the [[email protected]:halign] property. + * The x hotspot should not be more than the width of the widget. + * + * Since: 1.5 + */ + obj_properties[PROP_X_HOTSPOT] = + g_param_spec_double ("x-hotspot", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, -1, + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + + /** + * ShumateMarker:y-hotspot: + * + * The y hotspot of the marker, a negative value means that the actual + * y hotspot is calculated with the [[email protected]:valign] property. + * The y hotspot should not be more than the height of the widget. + * + * Since: 1.5 + */ + obj_properties[PROP_Y_HOTSPOT] = + g_param_spec_double ("y-hotspot", NULL, NULL, + -G_MAXDOUBLE, G_MAXDOUBLE, -1, + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + g_object_class_install_properties (object_class, N_PROPERTIES, obj_properties); g_object_class_override_property (object_class, @@ -281,6 +333,8 @@ priv->lon = 0; priv->selected = FALSE; priv->selectable = TRUE; + priv->x_hotspot = -1; + priv->y_hotspot = -1; } static void @@ -440,3 +494,72 @@ GTK_STATE_FLAG_SELECTED); } } + +/** + * shumate_marker_set_hotspot: + * @marker: a #ShumateMarker + * @x_hotspot: the x hotspot + * @y_hotspot: the y hotspot + * + * Set the hotspot point for the given marker. The value is in pixel relative + * to the top-left corner. Use any negative value to fallback to the + * [[email protected]:halign] or [[email protected]:valign] properties. + * + * Since: 1.5 + */ +void +shumate_marker_set_hotspot (ShumateMarker *marker, + gdouble x_hotspot, + gdouble y_hotspot) +{ + ShumateMarkerPrivate *priv = shumate_marker_get_instance_private (marker); + + g_return_if_fail (SHUMATE_IS_MARKER (marker)); + + if (x_hotspot < 0) + x_hotspot = -1; + + if (y_hotspot < 0) + y_hotspot = -1; + + g_object_freeze_notify (G_OBJECT (marker)); + if (x_hotspot != priv->x_hotspot) { + priv->x_hotspot = x_hotspot; + g_object_notify_by_pspec (G_OBJECT (marker), obj_properties[PROP_X_HOTSPOT]); + } + + if (y_hotspot != priv->y_hotspot) { + priv->y_hotspot = y_hotspot; + g_object_notify_by_pspec (G_OBJECT (marker), obj_properties[PROP_Y_HOTSPOT]); + } + + g_object_thaw_notify (G_OBJECT (marker)); +} + +/** + * shumate_marker_get_hotspot: + * @marker: a #ShumateMarker + * @x_hotspot: (out) (optional): return value for the x hotspot + * @y_hotspot: (out) (optional): return value for the y hotspot + * + * Get the hotspot point for the given marker. The value is in pixel relative + * to the top-left corner. Any negative value means that the hotspot get + * computed with the [[email protected]:halign] or [[email protected]:valign] + * properties. + * + * Since: 1.5 + */ +void shumate_marker_get_hotspot (ShumateMarker *marker, + gdouble *x_hotspot, + gdouble *y_hotspot) +{ + ShumateMarkerPrivate *priv = shumate_marker_get_instance_private (marker); + + g_return_if_fail (SHUMATE_IS_MARKER (marker)); + + if (x_hotspot) + *x_hotspot = priv->x_hotspot; + + if (y_hotspot) + *y_hotspot = priv->y_hotspot; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-marker.h new/libshumate-1.5.0.1/shumate/shumate-marker.h --- old/libshumate-1.4.0/shumate/shumate-marker.h 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-marker.h 2025-09-12 08:00:29.000000000 +0200 @@ -67,6 +67,12 @@ void shumate_marker_set_child (ShumateMarker *marker, GtkWidget *child); +void shumate_marker_set_hotspot (ShumateMarker *marker, + gdouble x_hotspot, + gdouble y_hotspot); +void shumate_marker_get_hotspot (ShumateMarker *marker, + gdouble *x_hotspot, + gdouble *y_hotspot); G_END_DECLS #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-point.c new/libshumate-1.5.0.1/shumate/shumate-point.c --- old/libshumate-1.4.0/shumate/shumate-point.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-point.c 2025-09-12 08:00:29.000000000 +0200 @@ -22,6 +22,10 @@ * * A simple variant of [class@Marker] showing the location of the point as a * circle on the map. + * + * ## CSS nodes + * + * `ShumatePoint` has a single CSS node with the name “map-point”. */ #include "shumate-point.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-simple-map.c new/libshumate-1.5.0.1/shumate/shumate-simple-map.c --- old/libshumate-1.4.0/shumate/shumate-simple-map.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-simple-map.c 2025-09-12 08:00:29.000000000 +0200 @@ -454,6 +454,8 @@ * Inserts a map layer as an overlay on top of the base map. The layer will * appear above @sibling, or at the bottom (but still above the base map) * if @sibling is %NULL. + * + * Since: 1.5 */ void shumate_simple_map_insert_overlay_layer_above (ShumateSimpleMap *self, @@ -483,6 +485,8 @@ * * Inserts a map layer as an overlay on top of the base map. The layer will * appear just below @sibling, or above everything else if @sibling is %NULL. + * + * Since: 1.5 */ void shumate_simple_map_insert_overlay_layer_behind (ShumateSimpleMap *self, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-simple-map.h new/libshumate-1.5.0.1/shumate/shumate-simple-map.h --- old/libshumate-1.4.0/shumate/shumate-simple-map.h 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-simple-map.h 2025-09-12 08:00:29.000000000 +0200 @@ -42,9 +42,12 @@ void shumate_simple_map_add_overlay_layer (ShumateSimpleMap *self, ShumateLayer *layer); -void shumate_simple_map_insert_overlay_layer (ShumateSimpleMap *self, - ShumateLayer *layer, - guint idx); +void shumate_simple_map_insert_overlay_layer_above (ShumateSimpleMap *self, + ShumateLayer *layer, + ShumateLayer *sibling); +void shumate_simple_map_insert_overlay_layer_behind (ShumateSimpleMap *self, + ShumateLayer *layer, + ShumateLayer *sibling); void shumate_simple_map_remove_overlay_layer (ShumateSimpleMap *self, ShumateLayer *layer); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-symbol-event-private.h new/libshumate-1.5.0.1/shumate/shumate-symbol-event-private.h --- old/libshumate-1.4.0/shumate/shumate-symbol-event-private.h 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-symbol-event-private.h 2025-09-12 08:00:29.000000000 +0200 @@ -24,6 +24,14 @@ const char *feature_id, GHashTable *tags); +ShumateSymbolEvent *shumate_symbol_event_new_with_n_press (const char *layer, + const char *source_layer, + const char *feature_id, + GHashTable *tags, + gint n_press); + void shumate_symbol_event_set_lat_lon (ShumateSymbolEvent *self, double lat, double lon); + +void shumate_symbol_event_set_n_press (ShumateSymbolEvent *self, gint n_press); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-symbol-event.c new/libshumate-1.5.0.1/shumate/shumate-symbol-event.c --- old/libshumate-1.4.0/shumate/shumate-symbol-event.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-symbol-event.c 2025-09-12 08:00:29.000000000 +0200 @@ -44,6 +44,7 @@ char *feature_id; double lat, lon; GHashTable *tags; + gint n_press; }; static void location_interface_init (ShumateLocationInterface *iface); @@ -56,6 +57,7 @@ PROP_LAYER, PROP_SOURCE_LAYER, PROP_FEATURE_ID, + PROP_N_PRESS, N_PROPS, PROP_LONGITUDE, @@ -102,6 +104,9 @@ case PROP_LONGITUDE: g_value_set_double (value, self->lon); break; + case PROP_N_PRESS: + g_value_set_int (value, self->n_press); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -113,12 +118,17 @@ const GValue *value, GParamSpec *pspec) { + ShumateSymbolEvent *symbol_event = SHUMATE_SYMBOL_EVENT (object); + switch (prop_id) { case PROP_LATITUDE: case PROP_LONGITUDE: g_warning ("Cannot change the location of a ShumateSymbolEvent"); break; + case PROP_N_PRESS: + shumate_symbol_event_set_n_press (symbol_event, g_value_get_int (value)); + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -174,6 +184,22 @@ NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); + /** + * ShumateSymbolEvent:n-press: + * + * The number of clicks/presses triggering the symbol event. + * + * Since: 1.5 + */ + properties[PROP_N_PRESS] = + g_param_spec_uint ("n-press", + "Number of presses", + "Number of presses", + 1, + INT_MAX, + 1, + G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); + g_object_class_install_properties (object_class, N_PROPS, properties); g_object_class_override_property (object_class, @@ -334,6 +360,25 @@ self->source_layer = g_strdup (source_layer); self->feature_id = g_strdup (feature_id); self->tags = g_hash_table_ref (tags); + self->n_press = 1; + + return self; +} + +ShumateSymbolEvent * +shumate_symbol_event_new_with_n_press (const char *layer, + const char *source_layer, + const char *feature_id, + GHashTable *tags, + gint n_press) +{ + ShumateSymbolEvent *self = g_object_new (SHUMATE_TYPE_SYMBOL_EVENT, NULL); + + self->layer = g_strdup (layer); + self->source_layer = g_strdup (source_layer); + self->feature_id = g_strdup (feature_id); + self->tags = g_hash_table_ref (tags); + self->n_press = n_press; return self; } @@ -346,3 +391,35 @@ self->lat = lat; self->lon = lon; } + +/** + * shumate_symbol_event_get_n_press: + * @self: a [class@SymbolEvent] + * + * Gets the number of clicks/presses that initiated the event. + * + * Returns: the number of presses + * + * Since: 1.5 + */ +gint +shumate_symbol_event_get_n_press (ShumateSymbolEvent *self) +{ + return self->n_press; +} + +/** + * shumate_symbol_event_set_n_press: + * @self: a [class@SymbolEvent] + * @n_press: the number of presses of the event + * + * Sets the number of clicks/presses that initiated the event. + * + * + * Since: 1.5 + */ +void +shumate_symbol_event_set_n_press (ShumateSymbolEvent *self, gint n_press) +{ + self->n_press = n_press; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/shumate-symbol-event.h new/libshumate-1.5.0.1/shumate/shumate-symbol-event.h --- old/libshumate-1.4.0/shumate/shumate-symbol-event.h 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/shumate-symbol-event.h 2025-09-12 08:00:29.000000000 +0200 @@ -34,5 +34,6 @@ const GStrv shumate_symbol_event_get_keys (ShumateSymbolEvent *self); const char *shumate_symbol_event_get_tag (ShumateSymbolEvent *self, const char *tag_name); +gint shumate_symbol_event_get_n_press (ShumateSymbolEvent *self); G_END_DECLS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libshumate-1.4.0/shumate/vector/shumate-vector-symbol.c new/libshumate-1.5.0.1/shumate/vector/shumate-vector-symbol.c --- old/libshumate-1.4.0/shumate/vector/shumate-vector-symbol.c 2025-03-15 08:52:39.000000000 +0100 +++ new/libshumate-1.5.0.1/shumate/vector/shumate-vector-symbol.c 2025-09-12 08:00:29.000000000 +0200 @@ -810,10 +810,13 @@ double y, GtkGestureClick *click) { - g_autoptr(ShumateSymbolEvent) event = shumate_symbol_event_new (self->symbol_info->details->layer, - self->symbol_info->details->source_layer, - self->symbol_info->details->feature_id, - self->symbol_info->details->tags); + g_autoptr(ShumateSymbolEvent) event = + shumate_symbol_event_new_with_n_press (self->symbol_info->details->layer, + self->symbol_info->details->source_layer, + self->symbol_info->details->feature_id, + self->symbol_info->details->tags, + n_press); + g_signal_emit (self, signals[CLICKED], 0, event); } ++++++ libshumate.obsinfo ++++++ --- /var/tmp/diff_new_pack.ZAGbcZ/_old 2025-09-24 15:22:16.003258161 +0200 +++ /var/tmp/diff_new_pack.ZAGbcZ/_new 2025-09-24 15:22:16.007258329 +0200 @@ -1,5 +1,5 @@ name: libshumate -version: 1.4.0 -mtime: 1742025159 -commit: 06021e35f0d479612fb1a3af91a73ba562175e03 +version: 1.5.0.1 +mtime: 1757656829 +commit: ed5fe31377c050610d5932903a5217e1c7d1d0e4
