[gtk+/gestures: 120/173] GtkColorPlane: Actually add the long press gesture
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gestures: 120/173] GtkColorPlane: Actually add the long press gesture
- Date: Fri, 16 May 2014 17:10:28 +0000 (UTC)
commit cab86a27a6f819541d1af4c97f4df880a28c9bfd
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]