[libshumate/tintou/map-source-object] map-source: Change to a GObject subclass
- From: Corentin Noël <corentinnoel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate/tintou/map-source-object] map-source: Change to a GObject subclass
- Date: Tue, 8 Jun 2021 14:50:15 +0000 (UTC)
commit 32fbda9f2e1c3c3237950f822504cf63b7aaef45
Author: Corentin Noël <corentin noel collabora com>
Date: Tue Jun 8 16:48:49 2021 +0200
map-source: Change to a GObject subclass
GInitiallyUnowned is not really discoverable for developers.
shumate/shumate-map-source-desc.c | 2 +-
shumate/shumate-map-source-factory.c | 2 +-
shumate/shumate-map-source.c | 3 +--
shumate/shumate-map-source.h | 4 ++--
4 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/shumate/shumate-map-source-desc.c b/shumate/shumate-map-source-desc.c
index b2657fd..d84a27b 100644
--- a/shumate/shumate-map-source-desc.c
+++ b/shumate/shumate-map-source-desc.c
@@ -559,7 +559,7 @@ shumate_map_source_desc_get_projection (ShumateMapSourceDesc *desc)
*
* Creates a #ShumateMapSource describes by @self.
*
- * Returns: (transfer floating): a newly created #ShumateMapSource.
+ * Returns: (transfer full): a newly created #ShumateMapSource.
*/
ShumateMapSource *
shumate_map_source_desc_create_source (ShumateMapSourceDesc *self)
diff --git a/shumate/shumate-map-source-factory.c b/shumate/shumate-map-source-factory.c
index fddb1f2..5e5778a 100644
--- a/shumate/shumate-map-source-factory.c
+++ b/shumate/shumate-map-source-factory.c
@@ -259,7 +259,7 @@ shumate_map_source_factory_get_registered (ShumateMapSourceFactory *factory)
* Note: The id should not contain any character that can't be in a filename as it
* will be used as the cache directory name for that map source.
*
- * Returns: (transfer floating) (nullable): a ready to use #ShumateMapSource
+ * Returns: (transfer full) (nullable): a ready to use #ShumateMapSource
* matching the given name or %NULL if no source with the given name exists.
*/
ShumateMapSource *
diff --git a/shumate/shumate-map-source.c b/shumate/shumate-map-source.c
index e04cc67..cdbc3d9 100644
--- a/shumate/shumate-map-source.c
+++ b/shumate/shumate-map-source.c
@@ -34,8 +34,7 @@
#include <math.h>
-G_DEFINE_ABSTRACT_TYPE (ShumateMapSource, shumate_map_source, G_TYPE_INITIALLY_UNOWNED);
-
+G_DEFINE_ABSTRACT_TYPE (ShumateMapSource, shumate_map_source, G_TYPE_OBJECT);
static void
shumate_map_source_class_init (ShumateMapSourceClass *klass)
diff --git a/shumate/shumate-map-source.h b/shumate/shumate-map-source.h
index 59e27ca..39424e3 100644
--- a/shumate/shumate-map-source.h
+++ b/shumate/shumate-map-source.h
@@ -29,7 +29,7 @@
G_BEGIN_DECLS
#define SHUMATE_TYPE_MAP_SOURCE shumate_map_source_get_type ()
-G_DECLARE_DERIVABLE_TYPE (ShumateMapSource, shumate_map_source, SHUMATE, MAP_SOURCE, GInitiallyUnowned)
+G_DECLARE_DERIVABLE_TYPE (ShumateMapSource, shumate_map_source, SHUMATE, MAP_SOURCE, GObject)
/**
* ShumateMapProjection:
@@ -51,7 +51,7 @@ typedef enum
struct _ShumateMapSourceClass
{
- GInitiallyUnownedClass parent_class;
+ GObjectClass parent_class;
const char * (*get_id)(ShumateMapSource *map_source);
const char * (*get_name)(ShumateMapSource *map_source);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]