[gnome-photos] image-view: Use G_DECLARE_FINAL_TYPE



commit 30317aba2433e5e2f0709f32ed56a404aa68462b
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Nov 27 02:15:46 2016 +0100

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

 src/photos-image-view.c |    5 -----
 src/photos-image-view.h |   14 +-------------
 2 files changed, 1 insertions(+), 18 deletions(-)
---
diff --git a/src/photos-image-view.c b/src/photos-image-view.c
index 0a21a13..13f5e1c 100644
--- a/src/photos-image-view.c
+++ b/src/photos-image-view.c
@@ -41,11 +41,6 @@ struct _PhotosImageView
   gfloat zoom_scaled;
 };
 
-struct _PhotosImageViewClass
-{
-  GtkDrawingAreaClass parent_class;
-};
-
 enum
 {
   PROP_0,
diff --git a/src/photos-image-view.h b/src/photos-image-view.h
index 043e316..57ef9d8 100644
--- a/src/photos-image-view.h
+++ b/src/photos-image-view.h
@@ -27,19 +27,7 @@
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_IMAGE_VIEW (photos_image_view_get_type ())
-
-#define PHOTOS_IMAGE_VIEW(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
-   PHOTOS_TYPE_IMAGE_VIEW, PhotosImageView))
-
-#define PHOTOS_IS_IMAGE_VIEW(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
-   PHOTOS_TYPE_IMAGE_VIEW))
-
-typedef struct _PhotosImageView      PhotosImageView;
-typedef struct _PhotosImageViewClass PhotosImageViewClass;
-
-GType               photos_image_view_get_type           (void) G_GNUC_CONST;
+G_DECLARE_FINAL_TYPE (PhotosImageView, photos_image_view, PHOTOS, IMAGE_VIEW, GtkDrawingArea);
 
 GtkWidget          *photos_image_view_new                (void);
 


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