Hello community, here is the log from the commit of package libchamplain for openSUSE:Factory checked in at 2016-03-29 14:27:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libchamplain (Old) and /work/SRC/openSUSE:Factory/.libchamplain.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libchamplain" Changes: -------- --- /work/SRC/openSUSE:Factory/libchamplain/libchamplain.changes 2015-12-17 15:54:33.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.libchamplain.new/libchamplain.changes 2016-03-29 14:27:28.000000000 +0200 @@ -1,0 +2,11 @@ +Fri Feb 26 08:22:32 UTC 2016 - [email protected] + +- Update to version 0.12.13: + + Implement ChamplainExportable in MarkerLayer and + ChamplainPoint. + + Avoid runtime warnings due to the use of deprecated API. + + Make sure enums are introspectable. + + Fix occasional crash when closing map with layers. + + Various minor fixes and improvements. + +------------------------------------------------------------------- Old: ---- libchamplain-0.12.12.tar.xz New: ---- libchamplain-0.12.13.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libchamplain.spec ++++++ --- /var/tmp/diff_new_pack.RAXtcz/_old 2016-03-29 14:27:29.000000000 +0200 +++ /var/tmp/diff_new_pack.RAXtcz/_new 2016-03-29 14:27:29.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package libchamplain # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: libchamplain -Version: 0.12.12 +Version: 0.12.13 Release: 0 Summary: Library to display maps License: LGPL-2.1+ ++++++ libchamplain-0.12.12.tar.xz -> libchamplain-0.12.13.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/ChangeLog new/libchamplain-0.12.13/ChangeLog --- old/libchamplain-0.12.12/ChangeLog 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/ChangeLog 2016-02-25 21:10:06.000000000 +0100 @@ -1,5 +1,107 @@ # Generated by Makefile. Do not edit. +commit ceccc10eacce0d4ffef22233739ecbf05ea60180 +Author: Jiří Techet <[email protected]> +Date: Thu Feb 25 21:05:27 2016 +0100 + + 0.12.13 + +commit 5038ab1b704e609ba76958075a4b61eab13699b0 +Author: Jonas Danielsson <[email protected]> +Date: Tue Feb 16 10:54:00 2016 +0100 + + champlain-view: Remove children from user_layers in dispose + + https://bugzilla.gnome.org/show_bug.cgi?id=760012 + +commit a8073a3c837c291a3b3b5331ea2bc01f2f7ca2ca +Author: Jiří Techet <[email protected]> +Date: Fri Feb 12 16:45:37 2016 +0100 + + demos: Fix confusingly swapped latitude/longitude retrieval in Python demo + + Thanks to Pavel Machek for the patch. + +commit e641833c36620a712781b1ebce31311daa888535 +Author: Hashem Nasarat <[email protected]> +Date: Sun Jan 31 12:19:33 2016 -0500 + + build: Set G_LOG_DOMAIN to libchamplain + + "Libraries should define this so that any messages which they log can be + differentiated from messages from other libraries and application code" + + https://developer.gnome.org/glib/stable/glib-Message-Logging.html#G-LOG-DOMAIN:CAPS + + This enables us to filter debug messages to only see libchamplain + output — quite useful! + + E.g. G_MESSAGES_DEBUG=libchamplain CHAMPLAIN_DEBUG=view gnome-maps + + https://bugzilla.gnome.org/show_bug.cgi?id=761368 + +commit 9fcbddde94d9fbeb1ef9dfc82b16675c0a47acf1 +Author: Cosimo Cecchi <[email protected]> +Date: Wed Jan 27 14:59:03 2016 +0100 + + gtk-champlain-embed: avoid runtime warnings + + We need to set the state on the GtkStyleContext these days, to avoid GTK + emitting runtime warnings. + This change is retro-compatible with older versions of GTK. + + https://bugzilla.gnome.org/show_bug.cgi?id=761178 + +commit 713f73b933730d64d6e037c548cb9fbbe210d039 +Author: Emmanuele Bassi <[email protected]> +Date: Fri Jan 15 14:26:28 2016 +0000 + + Build fixes for builddir != srcdir + + Generated files go in builddir, which evaluates to '.', not in srcdir. + + Without this change, libchamplain fails to build in Continuous with the + following error: + + make[3]: *** No rule to make target '../../champlain/champlain-enum-types.h', needed by 'Champlain-0.12.gir'. Stop. + +commit 06de4514628b53996d46940e644e7b2ff8d7db02 +Author: Jonas Danielsson <[email protected]> +Date: Tue Jan 12 20:41:19 2016 +0100 + + build: Make sure enums are introspectable + +commit c8829c4f86569fe5c75dc96d3578e29edbb327bd +Author: Jonas Danielsson <[email protected]> +Date: Sat Jan 9 10:35:50 2016 +0100 + + ChamplainPoint: Implement ChamplainExportable interface + +commit 2814f9e2ad6812a0da8c23289b76c16b5edd5382 +Author: Jonas Danielsson <[email protected]> +Date: Sat Jan 9 10:34:57 2016 +0100 + + MarkerLayer: Implement ChamplainExportable interface + + Make MarkerLayer exportable. Will contain non-NULL surface + iff a marker in the layer implements ChamplainExportable + interface. + +commit 4350ac6d2ab5c77cfeeedc9e7d3a4b87d19f8ebc +Author: Jiří Techet <[email protected]> +Date: Tue Jan 12 11:59:12 2016 +0100 + + ChamplainView: Don't set state to DONE at the end of init + + The initial state is CHAMPLAIN_STATE_NONE and it should be changed to DONE + only after tiles get loaded which already happens in tile_state_notify(). + +commit 57fb0b10e679d0bd7686fcdde4d24170b2f085ba +Author: Jiří Techet <[email protected]> +Date: Wed Dec 2 20:59:39 2015 +0100 + + Post release version bump + commit c726e061eeb394d7a806b75e3377dce9ad7fa734 Author: Jiří Techet <[email protected]> Date: Wed Dec 2 20:41:25 2015 +0100 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/NEWS new/libchamplain-0.12.13/NEWS --- old/libchamplain-0.12.12/NEWS 2015-12-02 19:55:12.000000000 +0100 +++ new/libchamplain-0.12.13/NEWS 2016-02-25 21:01:16.000000000 +0100 @@ -1,3 +1,18 @@ +libchamplain 0.12.13 (2016-02-25) +================================= + +Stable release + +Changes: + +* Implement ChamplainExportable in MarkerLayer and ChamplainPoint + (Jonas Danielsson) +* Avoid runtime warnings due to the use of deprecated API (Cosimo Cecchi) +* Make sure enums are introspectable (Jonas Danielsson) +* Fix occasional crash when closing map with layers (Jonas Danielsson) +* Various minor fixes and improvements (Emmanuele Bassi, Hashem Nasarat, + Pavel Machek, Jiří Techet) + libchamplain 0.12.12 (2015-12-02) ================================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/Makefile.am new/libchamplain-0.12.13/champlain/Makefile.am --- old/libchamplain-0.12.12/champlain/Makefile.am 2015-11-16 23:32:03.000000000 +0100 +++ new/libchamplain-0.12.13/champlain/Makefile.am 2016-02-01 10:04:55.000000000 +0100 @@ -110,7 +110,7 @@ # glib-mkenums rules glib_enum_h = champlain-enum-types.h glib_enum_c = champlain-enum-types.c -glib_enum_headers = $(filter-out $(srcdir)/champlain-version.h,$(libchamplain_headers_public)) +glib_enum_headers = $(filter-out champlain-version.h,$(libchamplain_headers_public)) include $(top_srcdir)/build/Makefile.am.enums libchamplain_headers_built = \ @@ -139,12 +139,13 @@ -no-undefined \ -export-symbols-regex ^champlain_.* -AM_CPPFLAGS = \ - $(DEPS_CFLAGS) \ - $(MEMPHIS_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" \ - -I$(top_srcdir) \ - -DCHAMPLAIN_COMPILATION \ +AM_CPPFLAGS = \ + $(DEPS_CFLAGS) \ + $(MEMPHIS_CFLAGS) \ + -DDATADIR=\""$(datadir)"\" \ + -I$(top_srcdir) \ + -DCHAMPLAIN_COMPILATION \ + -DG_LOG_DOMAIN=\"$(PACKAGE_NAME)\" \ $(WARN_CFLAGS) @@ -165,6 +166,7 @@ INTROSPECTION_COMPILER_ARGS = introspection_sources = \ $(filter-out $(srcdir)/champlain-version.h,$(libchamplain_headers_public)) \ + champlain-enum-types.h \ $(libchamplain_sources) if ENABLE_MEMPHIS memphis_gir_include = Memphis-0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/Makefile.in new/libchamplain-0.12.13/champlain/Makefile.in --- old/libchamplain-0.12.12/champlain/Makefile.in 2015-12-02 20:43:04.000000000 +0100 +++ new/libchamplain-0.12.13/champlain/Makefile.in 2016-02-25 21:09:46.000000000 +0100 @@ -612,7 +612,7 @@ # glib-mkenums rules glib_enum_h = champlain-enum-types.h glib_enum_c = champlain-enum-types.c -glib_enum_headers = $(filter-out $(srcdir)/champlain-version.h,$(libchamplain_headers_public)) +glib_enum_headers = $(filter-out champlain-version.h,$(libchamplain_headers_public)) enum_tmpl_h = $(glib_enum_h:.h=.h.in) enum_tmpl_c = $(glib_enum_c:.c=.c.in) libchamplain_headers_built = \ @@ -640,11 +640,12 @@ -export-symbols-regex ^champlain_.* AM_CPPFLAGS = \ - $(DEPS_CFLAGS) \ - $(MEMPHIS_CFLAGS) \ - -DDATADIR=\""$(datadir)"\" \ - -I$(top_srcdir) \ - -DCHAMPLAIN_COMPILATION \ + $(DEPS_CFLAGS) \ + $(MEMPHIS_CFLAGS) \ + -DDATADIR=\""$(datadir)"\" \ + -I$(top_srcdir) \ + -DCHAMPLAIN_COMPILATION \ + -DG_LOG_DOMAIN=\"$(PACKAGE_NAME)\" \ $(WARN_CFLAGS) lib_LTLIBRARIES = libchamplain-@[email protected] @@ -656,6 +657,7 @@ @HAVE_INTROSPECTION_TRUE@INTROSPECTION_COMPILER_ARGS = @HAVE_INTROSPECTION_TRUE@introspection_sources = \ @HAVE_INTROSPECTION_TRUE@ $(filter-out $(srcdir)/champlain-version.h,$(libchamplain_headers_public)) \ +@HAVE_INTROSPECTION_TRUE@ champlain-enum-types.h \ @HAVE_INTROSPECTION_TRUE@ $(libchamplain_sources) @ENABLE_MEMPHIS_TRUE@@HAVE_INTROSPECTION_TRUE@memphis_gir_include = Memphis-0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/champlain-0.12.vapi new/libchamplain-0.12.13/champlain/champlain-0.12.vapi --- old/libchamplain-0.12.12/champlain/champlain-0.12.vapi 2015-12-02 20:05:05.000000000 +0100 +++ new/libchamplain-0.12.13/champlain/champlain-0.12.vapi 2016-02-25 20:43:39.000000000 +0100 @@ -232,6 +232,7 @@ public uint max_zoom_level { get; construct; } public uint min_zoom_level { get; construct; } public string name { get; construct; } + public Champlain.MapProjection projection { get; construct; } public uint tile_size { get; construct; } public string uri_format { get; construct; } } @@ -274,7 +275,7 @@ public signal void drag_motion (double dx, double dy, Clutter.Event event); } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_marker_layer_get_type ()")] - public class MarkerLayer : Champlain.Layer, Atk.Implementor, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { + public class MarkerLayer : Champlain.Layer, Atk.Implementor, Champlain.Exportable, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { [CCode (has_construct_function = false)] public MarkerLayer (); public void add_marker (Champlain.Marker marker); @@ -294,6 +295,7 @@ public void set_selection_mode (Champlain.SelectionMode mode); public void show_all_markers (); public void unselect_all_markers (); + public Champlain.SelectionMode selection_mode { get; set; } } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_memory_cache_get_type ()")] public class MemoryCache : Champlain.TileCache { @@ -318,6 +320,8 @@ public string api_uri { get; set; } [NoAccessorMethod] public string proxy_uri { owned get; set; } + [NoAccessorMethod] + public Champlain.State state { get; set; } } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_network_tile_source_get_type ()")] public class NetworkTileSource : Champlain.TileSource { @@ -376,7 +380,7 @@ public bool visible { get; set; } } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_point_get_type ()")] - public class Point : Champlain.Marker, Atk.Implementor, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { + public class Point : Champlain.Marker, Atk.Implementor, Champlain.Exportable, Champlain.Location, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { [CCode (has_construct_function = false, type = "ClutterActor*")] public Point (); [CCode (has_construct_function = false, type = "ClutterActor*")] @@ -406,6 +410,7 @@ public void set_max_width (uint value); public void set_unit (Champlain.Unit unit); public uint max_width { get; set; } + public Champlain.Unit unit { get; set; } } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_tile_get_type ()")] public class Tile : Clutter.Actor, Atk.Implementor, Champlain.Exportable, Clutter.Animatable, Clutter.Container, Clutter.Scriptable { @@ -436,6 +441,7 @@ public string etag { get; set; } public bool fade_in { get; set; } public uint size { get; set; } + public Champlain.State state { get; set; } public uint x { get; set; } public uint y { get; set; } public uint zoom_level { get; set; } @@ -477,6 +483,8 @@ [NoAccessorMethod] public string name { owned get; set construct; } [NoAccessorMethod] + public Champlain.MapProjection projection { get; set construct; } + [NoAccessorMethod] public uint tile_size { get; set construct; } } [CCode (cheader_filename = "champlain/champlain.h", type_id = "champlain_view_get_type ()")] @@ -548,6 +556,7 @@ public Champlain.MapSource map_source { get; set; } public uint max_zoom_level { get; set; } public uint min_zoom_level { get; set; } + public Champlain.State state { get; } public Champlain.BoundingBox world { get; set; } public uint zoom_level { get; set; } public bool zoom_on_double_click { get; set; } @@ -592,25 +601,24 @@ [NoAccessorMethod] public abstract double longitude { get; set; } } - [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_MAP_PROJECTION_", has_type_id = false)] + [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_MAP_PROJECTION_", type_id = "champlain_map_projection_get_type ()")] public enum MapProjection { - [CCode (cname = "CHAMPLAIN_MAP_PROJECTION_MERCATOR")] - MAP_PROJECTION_MERCATOR + MERCATOR } - [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_SELECTION_", has_type_id = false)] + [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_SELECTION_", type_id = "champlain_selection_mode_get_type ()")] public enum SelectionMode { NONE, SINGLE, MULTIPLE } - [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_STATE_", has_type_id = false)] + [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_STATE_", type_id = "champlain_state_get_type ()")] public enum State { NONE, LOADING, LOADED, DONE } - [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_UNIT_", has_type_id = false)] + [CCode (cheader_filename = "champlain/champlain.h", cprefix = "CHAMPLAIN_UNIT_", type_id = "champlain_unit_get_type ()")] public enum Unit { KM, MILES diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/champlain-marker-layer.c new/libchamplain-0.12.13/champlain/champlain-marker-layer.c --- old/libchamplain-0.12.12/champlain/champlain-marker-layer.c 2014-08-11 21:42:22.000000000 +0200 +++ new/libchamplain-0.12.13/champlain/champlain-marker-layer.c 2016-01-15 14:46:30.000000000 +0100 @@ -37,7 +37,10 @@ #include <clutter/clutter.h> #include <glib.h> -G_DEFINE_TYPE (ChamplainMarkerLayer, champlain_marker_layer, CHAMPLAIN_TYPE_LAYER) +static void exportable_interface_init (ChamplainExportableIface *iface); + +G_DEFINE_TYPE_WITH_CODE (ChamplainMarkerLayer, champlain_marker_layer, CHAMPLAIN_TYPE_LAYER, + G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_EXPORTABLE, exportable_interface_init)); #define GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_MARKER_LAYER, ChamplainMarkerLayerPrivate)) @@ -52,6 +55,7 @@ { PROP_0, PROP_SELECTION_MODE, + PROP_SURFACE, }; @@ -61,6 +65,9 @@ ChamplainView *view; }; +static void set_surface (ChamplainExportable *exportable, + cairo_surface_t *surface); +static cairo_surface_t *get_surface (ChamplainExportable *exportable); static void marker_selected_cb (ChamplainMarker *marker, G_GNUC_UNUSED GParamSpec *arg1, @@ -87,6 +94,10 @@ g_value_set_enum (value, priv->mode); break; + case PROP_SURFACE: + g_value_set_boxed (value, get_surface (CHAMPLAIN_EXPORTABLE (self))); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } @@ -107,6 +118,10 @@ champlain_marker_layer_set_selection_mode (self, g_value_get_enum (value)); break; + case PROP_SURFACE: + set_surface (CHAMPLAIN_EXPORTABLE (object), g_value_get_boxed (value)); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } @@ -164,6 +179,10 @@ CHAMPLAIN_TYPE_SELECTION_MODE, CHAMPLAIN_SELECTION_NONE, CHAMPLAIN_PARAM_READWRITE)); + + g_object_class_override_property (object_class, + PROP_SURFACE, + "surface"); } @@ -179,6 +198,77 @@ } +static void +set_surface (ChamplainExportable *exportable, + cairo_surface_t *surface) +{ + /* no need */ +} + +static cairo_surface_t * +get_surface (ChamplainExportable *exportable) +{ + g_return_val_if_fail (CHAMPLAIN_IS_MARKER_LAYER (exportable), NULL); + + ClutterActorIter iter; + ClutterActor *child; + ChamplainMarkerLayer *layer = CHAMPLAIN_MARKER_LAYER (exportable); + ChamplainMarkerLayerPrivate *priv = layer->priv; + cairo_surface_t *surface = NULL; + cairo_t *cr; + gboolean has_marker = FALSE; + + clutter_actor_iter_init (&iter, CLUTTER_ACTOR (layer)); + while (clutter_actor_iter_next (&iter, &child)) + { + ChamplainMarker *marker = CHAMPLAIN_MARKER (child); + + if (CHAMPLAIN_IS_EXPORTABLE (marker)) + { + gfloat x, y, tx, ty; + gint origin_x, origin_y; + cairo_surface_t *marker_surface; + ChamplainExportable *exportable; + + if (!has_marker) + { + gfloat width, height; + + width = 256; + height = 256; + if (priv->view != NULL) + clutter_actor_get_size (CLUTTER_ACTOR (priv->view),&width, &height); + surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); + has_marker = TRUE; + } + + exportable = CHAMPLAIN_EXPORTABLE (marker); + marker_surface = champlain_exportable_get_surface (exportable); + + champlain_view_get_viewport_origin (priv->view, &origin_x, &origin_y); + clutter_actor_get_translation (CLUTTER_ACTOR (marker), &tx, &ty, NULL); + clutter_actor_get_position (CLUTTER_ACTOR (marker), &x, &y); + + cr = cairo_create (surface); + cairo_set_source_surface (cr, marker_surface, + (x + tx) - origin_x, + (y + ty) - origin_y); + cairo_paint (cr); + cairo_destroy (cr); + } + } + + return surface; +} + +static void +exportable_interface_init (ChamplainExportableIface *iface) +{ + iface->get_surface = get_surface; + iface->set_surface = set_surface; +} + + /** * champlain_marker_layer_new: * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/champlain-point.c new/libchamplain-0.12.13/champlain/champlain-point.c --- old/libchamplain-0.12.12/champlain/champlain-point.c 2014-08-11 21:42:22.000000000 +0200 +++ new/libchamplain-0.12.13/champlain/champlain-point.c 2016-01-15 14:46:30.000000000 +0100 @@ -55,6 +55,7 @@ PROP_0, PROP_COLOR, PROP_SIZE, + PROP_SURFACE, }; /* static guint champlain_point_signals[LAST_SIGNAL] = { 0, }; */ @@ -64,11 +65,19 @@ ClutterColor *color; gdouble size; ClutterContent *canvas; + cairo_surface_t *surface; guint redraw_id; }; -G_DEFINE_TYPE (ChamplainPoint, champlain_point, CHAMPLAIN_TYPE_MARKER); +static void set_surface (ChamplainExportable *exportable, + cairo_surface_t *surface); +static cairo_surface_t *get_surface (ChamplainExportable *exportable); + +static void exportable_interface_init (ChamplainExportableIface *iface); + +G_DEFINE_TYPE_WITH_CODE (ChamplainPoint, champlain_point, CHAMPLAIN_TYPE_MARKER, + G_IMPLEMENT_INTERFACE (CHAMPLAIN_TYPE_EXPORTABLE, exportable_interface_init)); #define GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), CHAMPLAIN_TYPE_POINT, ChamplainPointPrivate)) @@ -92,6 +101,10 @@ g_value_set_double (value, priv->size); break; + case PROP_SURFACE: + g_value_set_boxed (value, get_surface (CHAMPLAIN_EXPORTABLE (object))); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -116,6 +129,10 @@ champlain_point_set_size (point, g_value_get_double (value)); break; + case PROP_SURFACE: + set_surface (CHAMPLAIN_EXPORTABLE (object), g_value_get_boxed (value)); + break; + default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); } @@ -146,6 +163,10 @@ static void champlain_point_dispose (GObject *object) { + ChamplainPointPrivate *priv = CHAMPLAIN_POINT (object)->priv; + + g_clear_pointer (&priv->surface, cairo_surface_destroy); + G_OBJECT_CLASS (champlain_point_parent_class)->dispose (object); } @@ -201,6 +222,11 @@ G_MAXDOUBLE, 12, CHAMPLAIN_PARAM_READWRITE)); + + g_object_class_override_property (object_class, + PROP_SURFACE, + "surface"); + } @@ -216,6 +242,8 @@ gdouble radius = size / 2.0; const ClutterColor *color; + set_surface (CHAMPLAIN_EXPORTABLE (point), cairo_get_target (cr)); + cairo_set_operator (cr, CAIRO_OPERATOR_CLEAR); cairo_paint (cr); cairo_set_operator (cr, CAIRO_OPERATOR_OVER); @@ -270,6 +298,40 @@ } +static void +set_surface (ChamplainExportable *exportable, + cairo_surface_t *surface) +{ + g_return_if_fail (CHAMPLAIN_POINT (exportable)); + g_return_if_fail (surface != NULL); + + ChamplainPoint *self = CHAMPLAIN_POINT (exportable); + + if (self->priv->surface == surface) + return; + + cairo_surface_destroy (self->priv->surface); + self->priv->surface = cairo_surface_reference (surface); + g_object_notify (G_OBJECT (self), "surface"); +} + +static cairo_surface_t * +get_surface (ChamplainExportable *exportable) +{ + g_return_val_if_fail (CHAMPLAIN_POINT (exportable), NULL); + + return CHAMPLAIN_POINT (exportable)->priv->surface; +} + + +static void +exportable_interface_init (ChamplainExportableIface *iface) +{ + iface->get_surface = get_surface; + iface->set_surface = set_surface; +} + + /** * champlain_point_new: * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/champlain-version.h new/libchamplain-0.12.13/champlain/champlain-version.h --- old/libchamplain-0.12.12/champlain/champlain-version.h 2015-12-02 20:43:07.000000000 +0100 +++ new/libchamplain-0.12.13/champlain/champlain-version.h 2016-02-25 21:09:48.000000000 +0100 @@ -49,14 +49,14 @@ * * The micro version of libchamplain (3, if %CHAMPLAIN_VERSION is 1.2.3) */ -#define CHAMPLAIN_MICRO_VERSION (12) +#define CHAMPLAIN_MICRO_VERSION (13) /** * CHAMPLAIN_VERSION: * * The full version of libchamplain, like 1.2.3 */ -#define CHAMPLAIN_VERSION 0.12.12 +#define CHAMPLAIN_VERSION 0.12.13 /** * CHAMPLAIN_VERSION_S: @@ -64,7 +64,7 @@ * The full version of libchamplain, in string form (suited for * string concatenation) */ -#define CHAMPLAIN_VERSION_S "0.12.12" +#define CHAMPLAIN_VERSION_S "0.12.13" /** * CHAMPLAIN_VERSION_HEX: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain/champlain-view.c new/libchamplain-0.12.13/champlain/champlain-view.c --- old/libchamplain-0.12.12/champlain/champlain-view.c 2015-11-30 23:12:47.000000000 +0100 +++ new/libchamplain-0.12.13/champlain/champlain-view.c 2016-02-25 19:50:21.000000000 +0100 @@ -726,6 +726,10 @@ priv->map_layer = NULL; priv->license_actor = NULL; + + /* This is needed to prevent race condition see bug #760012 */ + if (priv->user_layers) + clutter_actor_remove_all_children (priv->user_layers); priv->user_layers = NULL; priv->zoom_layer = NULL; @@ -1417,9 +1421,6 @@ clutter_actor_set_x_align (priv->license_actor, CLUTTER_ACTOR_ALIGN_END); clutter_actor_set_y_align (priv->license_actor, CLUTTER_ACTOR_ALIGN_END); clutter_actor_add_child (CLUTTER_ACTOR (view), priv->license_actor); - - priv->state = CHAMPLAIN_STATE_DONE; - g_object_notify (G_OBJECT (view), "state"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/champlain-gtk/gtk-champlain-embed.c new/libchamplain-0.12.13/champlain-gtk/gtk-champlain-embed.c --- old/libchamplain-0.12.12/champlain-gtk/gtk-champlain-embed.c 2015-11-16 22:51:16.000000000 +0100 +++ new/libchamplain-0.12.13/champlain-gtk/gtk-champlain-embed.c 2016-02-01 09:44:35.000000000 +0100 @@ -327,8 +327,11 @@ /* Set selection color */ style = gtk_widget_get_style_context (widget); - - gtk_style_context_get_color (style, GTK_STATE_FLAG_SELECTED, &gdk_rgba_color); + gtk_style_context_save (style); + gtk_style_context_set_state (style, GTK_STATE_FLAG_SELECTED); + + gtk_style_context_get_color (style, gtk_style_context_get_state (style), + &gdk_rgba_color); gdk_rgba_to_clutter_color (&gdk_rgba_color, &color); if (color.alpha == 0 && color.red == 0 && color.green == 0 && color.blue == 0) { @@ -338,7 +341,8 @@ } champlain_marker_set_selection_text_color (&color); - gtk_style_context_get_background_color (style, GTK_STATE_FLAG_SELECTED, &gdk_rgba_color); + gtk_style_context_get_background_color (style, gtk_style_context_get_state (style), + &gdk_rgba_color); gdk_rgba_to_clutter_color (&gdk_rgba_color, &color); if (color.alpha == 0) color.alpha = 255; @@ -349,6 +353,8 @@ color.blue = 131; } champlain_marker_set_selection_color (&color); + + gtk_style_context_restore (style); #endif /* Setup mouse cursor to a hand */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/configure new/libchamplain-0.12.13/configure --- old/libchamplain-0.12.12/configure 2015-12-02 20:43:04.000000000 +0100 +++ new/libchamplain-0.12.13/configure 2016-02-25 21:09:45.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libchamplain 0.12.12. +# Generated by GNU Autoconf 2.69 for libchamplain 0.12.13. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=libchamplain>. # @@ -651,8 +651,8 @@ # Identity of this package. PACKAGE_NAME='libchamplain' PACKAGE_TARNAME='libchamplain' -PACKAGE_VERSION='0.12.12' -PACKAGE_STRING='libchamplain 0.12.12' +PACKAGE_VERSION='0.12.13' +PACKAGE_STRING='libchamplain 0.12.13' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=libchamplain' PACKAGE_URL='https://wiki.gnome.org/Projects/libchamplain' @@ -1464,7 +1464,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libchamplain 0.12.12 to adapt to many kinds of systems. +\`configure' configures libchamplain 0.12.13 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1534,7 +1534,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libchamplain 0.12.12:";; + short | recursive ) echo "Configuration of libchamplain 0.12.13:";; esac cat <<\_ACEOF @@ -1676,7 +1676,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libchamplain configure 0.12.12 +libchamplain configure 0.12.13 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1954,7 +1954,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libchamplain $as_me 0.12.12, which was +It was created by libchamplain $as_me 0.12.13, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2822,7 +2822,7 @@ # Define the identity of the package. PACKAGE='libchamplain' - VERSION='0.12.12' + VERSION='0.12.13' cat >>confdefs.h <<_ACEOF @@ -12328,13 +12328,13 @@ # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A -LIBRARY_VERSION=7:4:7 +LIBRARY_VERSION=8:0:8 CHAMPLAIN_API_VERSION=0.12 CHAMPLAIN_API_VERSION_NORM=0_12 CHAMPLAIN_MAJOR_VERSION=0 CHAMPLAIN_MINOR_VERSION=12 -CHAMPLAIN_MICRO_VERSION=12 -CHAMPLAIN_VERSION=0.12.12 +CHAMPLAIN_MICRO_VERSION=13 +CHAMPLAIN_VERSION=0.12.13 CHAMPLAIN_MAJORMINOR=0.12 @@ -14795,7 +14795,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libchamplain $as_me 0.12.12, which was +This file was extended by libchamplain $as_me 0.12.13, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14862,7 +14862,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libchamplain config.status 0.12.12 +libchamplain config.status 0.12.13 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/configure.ac new/libchamplain-0.12.13/configure.ac --- old/libchamplain-0.12.12/configure.ac 2015-12-02 19:59:21.000000000 +0100 +++ new/libchamplain-0.12.13/configure.ac 2016-02-25 20:43:00.000000000 +0100 @@ -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], [12]) -m4_define([champlain_micro_version], [12]) +m4_define([champlain_micro_version], [13]) m4_define([champlain_version], [champlain_major_version.champlain_minor_version.champlain_micro_version]) m4_define([champlain_minor_api_version], [m4_eval(champlain_minor_version + champlain_minor_version%2)]) @@ -36,7 +36,7 @@ # - If binary compatibility has been broken (eg removed or changed interfaces) # change to C+1:0:0 # - If the interface is the same as the previous version, change to C:R+1:A -LIBRARY_VERSION=7:4:7 +LIBRARY_VERSION=8:0:8 CHAMPLAIN_API_VERSION=champlain_api_version CHAMPLAIN_API_VERSION_NORM=champlain_major_version[_]champlain_minor_api_version CHAMPLAIN_MAJOR_VERSION=champlain_major_version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/demos/launcher-gtk.py new/libchamplain-0.12.13/demos/launcher-gtk.py --- old/libchamplain-0.12.12/demos/launcher-gtk.py 2015-09-18 17:01:52.000000000 +0200 +++ new/libchamplain-0.12.13/demos/launcher-gtk.py 2016-02-12 16:40:16.000000000 +0100 @@ -121,8 +121,8 @@ def mouse_click_cb(self, actor, event, view): x, y = event.x, event.y - lat, lon = view.x_to_longitude(x), view.y_to_latitude(y) - print "Mouse click at: %f %f" % (lon, lat) + lon, lat = view.x_to_longitude(x), view.y_to_latitude(y) + print "Mouse click at: %f %f" % (lat, lon) return True def zoom_changed(self, widget): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/html/ChamplainExportable.html new/libchamplain-0.12.13/docs/reference/html/ChamplainExportable.html --- old/libchamplain-0.12.12/docs/reference/html/ChamplainExportable.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/html/ChamplainExportable.html 2016-02-25 21:10:05.000000000 +0100 @@ -113,7 +113,7 @@ <a name="ChamplainExportable.implementations"></a><h2>Known Implementations</h2> <p> ChamplainExportable is implemented by - <a class="link" href="ChamplainPathLayer.html" title="ChamplainPathLayer">ChamplainPathLayer</a> and <a class="link" href="ChamplainTile.html" title="ChamplainTile">ChamplainTile</a>.</p> + <a class="link" href="ChamplainMarkerLayer.html" title="ChamplainMarkerLayer">ChamplainMarkerLayer</a>, <a class="link" href="ChamplainPathLayer.html" title="ChamplainPathLayer">ChamplainPathLayer</a>, <a class="link" href="ChamplainPoint.html" title="ChamplainPoint">ChamplainPoint</a> and <a class="link" href="ChamplainTile.html" title="ChamplainTile">ChamplainTile</a>.</p> </div> <div class="refsect1"> <a name="ChamplainExportable.description"></a><h2>Description</h2> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/html/ChamplainMarkerLayer.html new/libchamplain-0.12.13/docs/reference/html/ChamplainMarkerLayer.html --- old/libchamplain-0.12.12/docs/reference/html/ChamplainMarkerLayer.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/html/ChamplainMarkerLayer.html 2016-02-25 21:10:05.000000000 +0100 @@ -228,7 +228,7 @@ <a name="ChamplainMarkerLayer.implemented-interfaces"></a><h2>Implemented Interfaces</h2> <p> ChamplainMarkerLayer implements - <a href="/usr/share/gtk-doc/html/clutter/ClutterContainer.html">ClutterContainer</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterScriptable.html">ClutterScriptable</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterAnimatable.html">ClutterAnimatable</a> and AtkImplementorIface.</p> + <a href="/usr/share/gtk-doc/html/clutter/ClutterContainer.html">ClutterContainer</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterScriptable.html">ClutterScriptable</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterAnimatable.html">ClutterAnimatable</a>, AtkImplementorIface and <a class="link" href="ChamplainExportable.html" title="ChamplainExportable">ChamplainExportable</a>.</p> </div> <div class="refsect1"> <a name="ChamplainMarkerLayer.description"></a><h2>Description</h2> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/html/ChamplainPoint.html new/libchamplain-0.12.13/docs/reference/html/ChamplainPoint.html --- old/libchamplain-0.12.12/docs/reference/html/ChamplainPoint.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/html/ChamplainPoint.html 2016-02-25 21:10:05.000000000 +0100 @@ -142,7 +142,7 @@ <a name="ChamplainPoint.implemented-interfaces"></a><h2>Implemented Interfaces</h2> <p> ChamplainPoint implements - <a href="/usr/share/gtk-doc/html/clutter/ClutterContainer.html">ClutterContainer</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterScriptable.html">ClutterScriptable</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterAnimatable.html">ClutterAnimatable</a>, AtkImplementorIface and <a class="link" href="ChamplainLocation.html" title="ChamplainLocation">ChamplainLocation</a>.</p> + <a href="/usr/share/gtk-doc/html/clutter/ClutterContainer.html">ClutterContainer</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterScriptable.html">ClutterScriptable</a>, <a href="/usr/share/gtk-doc/html/clutter/ClutterAnimatable.html">ClutterAnimatable</a>, AtkImplementorIface, <a class="link" href="ChamplainLocation.html" title="ChamplainLocation">ChamplainLocation</a> and <a class="link" href="ChamplainExportable.html" title="ChamplainExportable">ChamplainExportable</a>.</p> </div> <div class="refsect1"> <a name="ChamplainPoint.description"></a><h2>Description</h2> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/html/index.html new/libchamplain-0.12.13/docs/reference/html/index.html --- old/libchamplain-0.12.12/docs/reference/html/index.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/html/index.html 2016-02-25 21:10:05.000000000 +0100 @@ -16,7 +16,7 @@ <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libchamplain Reference Manual</p></th></tr></table></div> <div> <p class="releaseinfo"> - for libchamplain 0.12.12 + for libchamplain 0.12.13 </p> <p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/html/libchamplain-ChamplainVersion.html new/libchamplain-0.12.13/docs/reference/html/libchamplain-ChamplainVersion.html --- old/libchamplain-0.12.12/docs/reference/html/libchamplain-ChamplainVersion.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/html/libchamplain-ChamplainVersion.html 2016-02-25 21:10:05.000000000 +0100 @@ -112,7 +112,7 @@ <hr> <div class="refsect2"> <a name="CHAMPLAIN-MICRO-VERSION:CAPS"></a><h3>CHAMPLAIN_MICRO_VERSION</h3> -<pre class="programlisting">#define CHAMPLAIN_MICRO_VERSION (12) +<pre class="programlisting">#define CHAMPLAIN_MICRO_VERSION (13) </pre> <p>The micro version of libchamplain (3, if <a class="link" href="libchamplain-ChamplainVersion.html#CHAMPLAIN-VERSION:CAPS" title="CHAMPLAIN_VERSION"><code class="literal">CHAMPLAIN_VERSION</code></a> is 1.2.3)</p> </div> @@ -164,14 +164,14 @@ <a name="libchamplain-ChamplainVersion.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="CHAMPLAIN-VERSION:CAPS"></a><h3>CHAMPLAIN_VERSION</h3> -<pre class="programlisting">#define CHAMPLAIN_VERSION 0.12.12 +<pre class="programlisting">#define CHAMPLAIN_VERSION 0.12.13 </pre> <p>The full version of libchamplain, like 1.2.3</p> </div> <hr> <div class="refsect2"> <a name="CHAMPLAIN-VERSION-S:CAPS"></a><h3>CHAMPLAIN_VERSION_S</h3> -<pre class="programlisting">#define CHAMPLAIN_VERSION_S "0.12.12" +<pre class="programlisting">#define CHAMPLAIN_VERSION_S "0.12.13" </pre> <p>The full version of libchamplain, in string form (suited for string concatenation)</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference/version.xml new/libchamplain-0.12.13/docs/reference/version.xml --- old/libchamplain-0.12.12/docs/reference/version.xml 2015-12-02 20:43:07.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference/version.xml 2016-02-25 21:09:48.000000000 +0100 @@ -1 +1 @@ -0.12.12 +0.12.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference-gtk/html/index.html new/libchamplain-0.12.13/docs/reference-gtk/html/index.html --- old/libchamplain-0.12.12/docs/reference-gtk/html/index.html 2015-12-02 20:43:24.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference-gtk/html/index.html 2016-02-25 21:10:06.000000000 +0100 @@ -16,7 +16,7 @@ <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libchamplain-gtk Reference Manual</p></th></tr></table></div> <div> <p class="releaseinfo"> - for libchamplain-gtk 0.12.12 + for libchamplain-gtk 0.12.13 </p> <p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libchamplain-0.12.12/docs/reference-gtk/version.xml new/libchamplain-0.12.13/docs/reference-gtk/version.xml --- old/libchamplain-0.12.12/docs/reference-gtk/version.xml 2015-12-02 20:43:07.000000000 +0100 +++ new/libchamplain-0.12.13/docs/reference-gtk/version.xml 2016-02-25 21:09:48.000000000 +0100 @@ -1 +1 @@ -0.12.12 +0.12.13
