[gnome-photos] header-bar: Use G_DECLARE_FINAL_TYPE



commit 70f27edcf555a8a85a200da7c9060ee30dfe62b0
Author: Debarshi Ray <debarshir gnome org>
Date:   Tue Nov 29 11:40:56 2016 +0100

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

 src/photos-header-bar.c |    5 -----
 src/photos-header-bar.h |   14 +-------------
 2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-header-bar.c b/src/photos-header-bar.c
index a03d8c8..055abc5 100644
--- a/src/photos-header-bar.c
+++ b/src/photos-header-bar.c
@@ -36,11 +36,6 @@ struct _PhotosHeaderBar
   PhotosHeaderBarMode mode;
 };
 
-struct _PhotosHeaderBarClass
-{
-  GtkHeaderBarClass parent_class;
-};
-
 
 G_DEFINE_TYPE (PhotosHeaderBar, photos_header_bar, GTK_TYPE_HEADER_BAR);
 
diff --git a/src/photos-header-bar.h b/src/photos-header-bar.h
index 03e911a..c6fc231 100644
--- a/src/photos-header-bar.h
+++ b/src/photos-header-bar.h
@@ -31,14 +31,7 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_HEADER_BAR (photos_header_bar_get_type ())
-
-#define PHOTOS_HEADER_BAR(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_HEADER_BAR, PhotosHeaderBar))
-
-#define PHOTOS_IS_HEADER_BAR(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_HEADER_BAR))
+G_DECLARE_FINAL_TYPE (PhotosHeaderBar, photos_header_bar, PHOTOS, HEADER_BAR, GtkHeaderBar);
 
 typedef enum
 {
@@ -48,11 +41,6 @@ typedef enum
   PHOTOS_HEADER_BAR_MODE_STANDALONE
 } PhotosHeaderBarMode;
 
-typedef struct _PhotosHeaderBar      PhotosHeaderBar;
-typedef struct _PhotosHeaderBarClass PhotosHeaderBarClass;
-
-GType                  photos_header_bar_get_type               (void) G_GNUC_CONST;
-
 GtkWidget             *photos_header_bar_new                    (void);
 
 void                   photos_header_bar_clear                  (PhotosHeaderBar *self);


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