[gnome-photos] search-match: Use G_DECLARE_FINAL_TYPE



commit 0753e8feacab17e05093faa95001c1c9945fe6dd
Author: Umang Jain <mailumangjain gmail com>
Date:   Tue Sep 5 04:42:11 2017 +0530

    search-match: Use G_DECLARE_FINAL_TYPE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763712

 src/photos-search-match.c |    5 -----
 src/photos-search-match.h |   14 +-------------
 2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-search-match.c b/src/photos-search-match.c
index 40d5f40..993e287 100644
--- a/src/photos-search-match.c
+++ b/src/photos-search-match.c
@@ -38,11 +38,6 @@ struct _PhotosSearchMatch
   gchar *term;
 };
 
-struct _PhotosSearchMatchClass
-{
-  GObjectClass parent_class;
-};
-
 enum
 {
   PROP_0,
diff --git a/src/photos-search-match.h b/src/photos-search-match.h
index c656aad..06013e7 100644
--- a/src/photos-search-match.h
+++ b/src/photos-search-match.h
@@ -30,24 +30,12 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_SEARCH_MATCH (photos_search_match_get_type ())
-
-#define PHOTOS_SEARCH_MATCH(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_SEARCH_MATCH, PhotosSearchMatch))
-
-#define PHOTOS_IS_SEARCH_MATCH(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_SEARCH_MATCH))
+G_DECLARE_FINAL_TYPE (PhotosSearchMatch, photos_search_match, PHOTOS, SEARCH_MATCH, GObject);
 
 #define PHOTOS_SEARCH_MATCH_STOCK_ALL "all"
 #define PHOTOS_SEARCH_MATCH_STOCK_AUTHOR "author"
 #define PHOTOS_SEARCH_MATCH_STOCK_TITLE "title"
 
-typedef struct _PhotosSearchMatch      PhotosSearchMatch;
-typedef struct _PhotosSearchMatchClass PhotosSearchMatchClass;
-
-GType                 photos_search_match_get_type           (void) G_GNUC_CONST;
-
 PhotosSearchMatch    *photos_search_match_new                (const gchar *id,
                                                               const gchar *name,
                                                               const gchar *filter);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]