[gtk/wip/baedert/for-master: 84/99] colorplane: Remove (un)realize handlers




commit 10935253423d446bfa17936711fd1431eb95863a
Author: Timm Bäder <mail baedert org>
Date:   Sat Sep 26 10:00:34 2020 +0200

    colorplane: Remove (un)realize handlers
    
    Creating the texture in realize() is unnecessary these days, since we
    can just rely on size_allocate to do that.

 gtk/gtkcolorplane.c | 20 --------------------
 1 file changed, 20 deletions(-)
---
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index fa08611111..a6fa75c795 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -183,24 +183,6 @@ plane_size_allocate (GtkWidget *widget,
   create_texture (widget);
 }
 
-static void
-plane_realize (GtkWidget *widget)
-{
-  GTK_WIDGET_CLASS (gtk_color_plane_parent_class)->realize (widget);
-
-  create_texture (widget);
-}
-
-static void
-plane_unrealize (GtkWidget *widget)
-{
-  GtkColorPlane *plane = GTK_COLOR_PLANE (widget);
-
-  g_clear_object (&plane->texture);
-
-  GTK_WIDGET_CLASS (gtk_color_plane_parent_class)->unrealize (widget);
-}
-
 static void
 set_cross_cursor (GtkWidget *widget,
                   gboolean   enabled)
@@ -502,8 +484,6 @@ gtk_color_plane_class_init (GtkColorPlaneClass *class)
 
   widget_class->snapshot = plane_snapshot;
   widget_class->size_allocate = plane_size_allocate;
-  widget_class->realize = plane_realize;
-  widget_class->unrealize = plane_unrealize;
 
   g_object_class_install_property (object_class,
                                    PROP_H_ADJUSTMENT,


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