[gnome-photos] view-model: Use G_DECLARE_FINAL_TYPE



commit 51df6530283c6bc16b87c8d81fff733c713d54a5
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Nov 18 16:20:39 2016 +0100

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

 src/photos-view-model.c |    5 -----
 src/photos-view-model.h |   14 +-------------
 2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-view-model.c b/src/photos-view-model.c
index b2160ef..e72f4d5 100644
--- a/src/photos-view-model.c
+++ b/src/photos-view-model.c
@@ -58,11 +58,6 @@ struct _PhotosViewModel
   guint reset_count_id;
 };
 
-struct _PhotosViewModelClass
-{
-  GtkListStoreClass parent_class;
-};
-
 enum
 {
   PROP_0,
diff --git a/src/photos-view-model.h b/src/photos-view-model.h
index 54368e1..9a3f57b 100644
--- a/src/photos-view-model.h
+++ b/src/photos-view-model.h
@@ -33,14 +33,7 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_VIEW_MODEL (photos_view_model_get_type ())
-
-#define PHOTOS_VIEW_MODEL(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_VIEW_MODEL, PhotosViewModel))
-
-#define PHOTOS_IS_VIEW_MODEL(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_VIEW_MODEL))
+G_DECLARE_FINAL_TYPE (PhotosViewModel, photos_view_model, PHOTOS, VIEW_MODEL, GtkListStore);
 
 typedef enum
 {
@@ -54,11 +47,6 @@ typedef enum
   PHOTOS_VIEW_MODEL_PULSE /* unused */
 } PhotosViewModelColumns;
 
-typedef struct _PhotosViewModel      PhotosViewModel;
-typedef struct _PhotosViewModelClass PhotosViewModelClass;
-
-GType             photos_view_model_get_type               (void) G_GNUC_CONST;
-
 GtkListStore     *photos_view_model_new                    (PhotosWindowMode mode);
 
 void              photos_view_model_item_added             (PhotosViewModel *self, PhotosBaseItem *item);


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