[gnome-photos] search-type: Use G_DECLARE_FINAL_TYPE
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] search-type: Use G_DECLARE_FINAL_TYPE
- Date: Tue, 9 May 2017 18:05:58 +0000 (UTC)
commit 85dcfeec3412c0c49741e240d8c043950e4022fa
Author: Debarshi Ray <debarshir gnome org>
Date: Tue May 9 20:01:01 2017 +0200
search-type: Use G_DECLARE_FINAL_TYPE
Based on code written by Rashi Sah.
https://bugzilla.gnome.org/show_bug.cgi?id=763712
src/photos-search-type.c | 5 -----
src/photos-search-type.h | 14 +-------------
2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-search-type.c b/src/photos-search-type.c
index 5a50ab4..3a7b10e 100644
--- a/src/photos-search-type.c
+++ b/src/photos-search-type.c
@@ -38,11 +38,6 @@ struct _PhotosSearchType
gchar *where;
};
-struct _PhotosSearchTypeClass
-{
- GObjectClass parent_class;
-};
-
enum
{
PROP_0,
diff --git a/src/photos-search-type.h b/src/photos-search-type.h
index af3b5fe..9d82029 100644
--- a/src/photos-search-type.h
+++ b/src/photos-search-type.h
@@ -30,25 +30,13 @@
G_BEGIN_DECLS
#define PHOTOS_TYPE_SEARCH_TYPE (photos_search_type_get_type ())
-
-#define PHOTOS_SEARCH_TYPE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- PHOTOS_TYPE_SEARCH_TYPE, PhotosSearchType))
-
-#define PHOTOS_IS_SEARCH_TYPE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- PHOTOS_TYPE_SEARCH_TYPE))
+G_DECLARE_FINAL_TYPE (PhotosSearchType, photos_search_type, PHOTOS, SEARCH_TYPE, GObject);
#define PHOTOS_SEARCH_TYPE_STOCK_ALL "all"
#define PHOTOS_SEARCH_TYPE_STOCK_COLLECTIONS "collections"
#define PHOTOS_SEARCH_TYPE_STOCK_FAVORITES "favorites"
#define PHOTOS_SEARCH_TYPE_STOCK_PHOTOS "photos"
-typedef struct _PhotosSearchType PhotosSearchType;
-typedef struct _PhotosSearchTypeClass PhotosSearchTypeClass;
-
-GType photos_search_type_get_type (void) G_GNUC_CONST;
-
PhotosSearchType *photos_search_type_new (const gchar *id, const gchar *name);
PhotosSearchType *photos_search_type_new_full (const gchar *id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]