[libchamplain] 593344: ChamplainMapSource should inherit GInitiallyUnowned
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain] 593344: ChamplainMapSource should inherit GInitiallyUnowned
- Date: Tue, 10 Nov 2009 18:43:48 +0000 (UTC)
commit 52e76f7fc148a60ee2518bace128c64dad5e9800
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Mon Oct 26 19:24:41 2009 -0400
593344: ChamplainMapSource should inherit GInitiallyUnowned
ChamplainView owns the map sources.
champlain/champlain-map-source.c | 2 +-
champlain/champlain-map-source.h | 4 ++--
champlain/champlain-view.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c
index 47a28cc..8107418 100644
--- a/champlain/champlain-map-source.c
+++ b/champlain/champlain-map-source.c
@@ -72,7 +72,7 @@ enum
/* static guint champlain_map_source_signals[LAST_SIGNAL] = { 0, }; */
-G_DEFINE_TYPE (ChamplainMapSource, champlain_map_source, G_TYPE_OBJECT);
+G_DEFINE_TYPE (ChamplainMapSource, champlain_map_source, G_TYPE_INITIALLY_UNOWNED);
#define GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHAMPLAIN_TYPE_MAP_SOURCE, ChamplainMapSourcePrivate))
diff --git a/champlain/champlain-map-source.h b/champlain/champlain-map-source.h
index 3845926..8a94e89 100644
--- a/champlain/champlain-map-source.h
+++ b/champlain/champlain-map-source.h
@@ -49,13 +49,13 @@ typedef enum
struct _ChamplainMapSource
{
- GObject parent;
+ GInitiallyUnowned parent;
ChamplainMapSourcePrivate *priv;
};
struct _ChamplainMapSourceClass
{
- GObjectClass parent_class;
+ GInitiallyUnownedClass parent_class;
void (*fill_tile) (ChamplainMapSource *map_source,
ChamplainTile *tile);
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index e91be86..429dbe2 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2071,7 +2071,7 @@ champlain_view_set_map_source (ChamplainView *view,
return;
g_object_unref (priv->map_source);
- priv->map_source = g_object_ref (source);
+ priv->map_source = g_object_ref_sink (source);
priv->min_zoom_level = champlain_map_source_get_min_zoom_level (priv->map_source);
priv->max_zoom_level = champlain_map_source_get_max_zoom_level (priv->map_source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]