[gtk+/gestures: 120/140] GtkColorPlane: Actually add the long press gesture



commit fe0c941c4a364ba634f7b05ac4033e5542ced4e6
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu May 1 21:00:28 2014 -0400

    GtkColorPlane: Actually add the long press gesture
    
    This was missed because gtk_widget_remove_controller silently
    does nothing on unowned controllers.

 gtk/gtkcolorplane.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcolorplane.c b/gtk/gtkcolorplane.c
index 770cb8d..9a81af1 100644
--- a/gtk/gtkcolorplane.c
+++ b/gtk/gtkcolorplane.c
@@ -427,6 +427,7 @@ gtk_color_plane_init (GtkColorPlane *plane)
   plane->priv->long_press_gesture = gtk_gesture_long_press_new (GTK_WIDGET (plane));
   g_signal_connect (plane->priv->long_press_gesture, "pressed",
                     G_CALLBACK (hold_action), plane);
+  gtk_widget_add_controller (GTK_WIDGET (plane), GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture));
 }
 
 static void
@@ -441,8 +442,7 @@ plane_finalize (GObject *object)
   g_clear_object (&plane->priv->s_adj);
   g_clear_object (&plane->priv->v_adj);
 
-  gtk_widget_remove_controller (GTK_WIDGET (object),
-                                GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture));
+  gtk_widget_remove_controller (GTK_WIDGET (object), GTK_EVENT_CONTROLLER (plane->priv->long_press_gesture));
   g_clear_object (&plane->priv->long_press_gesture);
 
   G_OBJECT_CLASS (gtk_color_plane_parent_class)->finalize (object);


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