[gnome-photos] image-view: Remove the pointers for the object method signal handlers



commit bf55f91b4f9d0eb3ec392f793c3f525493c169b4
Author: Debarshi Ray <debarshir gnome org>
Date:   Sun Nov 20 12:49:25 2016 +0100

    image-view: Remove the pointers for the object method signal handlers
    
    This is a final class, so there wasn't going to be any sub-class that
    would want to override the default signal handler. We might still want
    a default handler for PhotosApplication itself, but we can achieve the
    same effect with a simple private function. It is a small price to pay
    for being able to use G_DECLARE_FINAL_TYPE.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=763712

 src/photos-image-view.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-image-view.c b/src/photos-image-view.c
index 59bdbd6..0a21a13 100644
--- a/src/photos-image-view.c
+++ b/src/photos-image-view.c
@@ -44,10 +44,6 @@ struct _PhotosImageView
 struct _PhotosImageViewClass
 {
   GtkDrawingAreaClass parent_class;
-
-  /* signals */
-  void        (*draw_background)    (PhotosImageView *self, cairo_t *cr, GdkRectangle *rect);
-  void        (*draw_overlay)       (PhotosImageView *self, cairo_t *cr, GdkRectangle *rect);
 };
 
 enum
@@ -350,7 +346,7 @@ photos_image_view_class_init (PhotosImageViewClass *class)
   signals[DRAW_BACKGROUND] = g_signal_new ("draw-background",
                                            G_TYPE_FROM_CLASS (class),
                                            G_SIGNAL_RUN_LAST,
-                                           G_STRUCT_OFFSET (PhotosImageViewClass, draw_background),
+                                           0,
                                            NULL, /* accumulator */
                                            NULL, /* accu_data */
                                            _photos_marshal_VOID__BOXED_BOXED,
@@ -362,7 +358,7 @@ photos_image_view_class_init (PhotosImageViewClass *class)
   signals[DRAW_OVERLAY] = g_signal_new ("draw-overlay",
                                         G_TYPE_FROM_CLASS (class),
                                         G_SIGNAL_RUN_LAST,
-                                        G_STRUCT_OFFSET (PhotosImageViewClass, draw_overlay),
+                                        0,
                                         NULL, /* accumulator */
                                         NULL, /* accu_data */
                                         _photos_marshal_VOID__BOXED_BOXED,


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