[gnome-photos] search-provider: Use G_DECLARE_FINAL_TYPE



commit 9942c4c6c66b98a07407faf0108e9520bca8662c
Author: Umang Jain <mailumangjain gmail com>
Date:   Tue Sep 5 04:48:04 2017 +0530

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

 src/photos-search-provider.c |    5 -----
 src/photos-search-provider.h |   14 +-------------
 2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-search-provider.c b/src/photos-search-provider.c
index d14543b..b3bd30e 100644
--- a/src/photos-search-provider.c
+++ b/src/photos-search-provider.c
@@ -43,11 +43,6 @@ struct _PhotosSearchProvider
   ShellSearchProvider2 *skeleton;
 };
 
-struct _PhotosSearchProviderClass
-{
-  GObjectClass parent_class;
-};
-
 enum
 {
   ACTIVATE_RESULT,
diff --git a/src/photos-search-provider.h b/src/photos-search-provider.h
index 5666c68..bbea0fc 100644
--- a/src/photos-search-provider.h
+++ b/src/photos-search-provider.h
@@ -30,22 +30,10 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_SEARCH_PROVIDER (photos_search_provider_get_type ())
-
-#define PHOTOS_SEARCH_PROVIDER(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_SEARCH_PROVIDER, PhotosSearchProvider))
-
-#define PHOTOS_IS_SEARCH_PROVIDER(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_SEARCH_PROVIDER))
+G_DECLARE_FINAL_TYPE (PhotosSearchProvider, photos_search_provider, PHOTOS, SEARCH_PROVIDER, GObject);
 
 #define PHOTOS_SEARCH_PROVIDER_PATH_SUFFIX "/SearchProvider"
 
-typedef struct _PhotosSearchProvider      PhotosSearchProvider;
-typedef struct _PhotosSearchProviderClass PhotosSearchProviderClass;
-
-GType                        photos_search_provider_get_type          (void) G_GNUC_CONST;
-
 PhotosSearchProvider        *photos_search_provider_new               (void);
 
 gboolean                     photos_search_provider_dbus_export       (PhotosSearchProvider *self,


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