[nautilus/wip/antoniof/new-list-view: 2/9] view-icon-controller: Don't connect to GtkClickGesture::stopped




commit 93c74048a270fb8c8ce8fa08c4290a91c585e1d4
Author: António Fernandes <antoniof gnome org>
Date:   Sat May 21 20:19:48 2022 +0100

    view-icon-controller: Don't connect to GtkClickGesture::stopped
    
    There is no need to reset .activate_on_release to FALSE, because
    it's always updated on press.

 src/nautilus-view-icon-controller.c | 13 -------------
 1 file changed, 13 deletions(-)
---
diff --git a/src/nautilus-view-icon-controller.c b/src/nautilus-view-icon-controller.c
index 5e3800a1f..d6ff24f33 100644
--- a/src/nautilus-view-icon-controller.c
+++ b/src/nautilus-view-icon-controller.c
@@ -877,16 +877,6 @@ on_click_released (GtkGestureClick *gesture,
         activate_selection_on_click (self, FALSE);
         gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_CLAIMED);
     }
-    self->activate_on_release = FALSE;
-}
-
-static void
-on_click_stopped (GtkGestureClick *gesture,
-                  gpointer         user_data)
-{
-    NautilusViewIconController *self = NAUTILUS_VIEW_ICON_CONTROLLER (user_data);
-
-    self->activate_on_release = FALSE;
 }
 
 static void
@@ -1426,7 +1416,6 @@ setup_item_ui (GtkSignalListItemFactory *factory,
     gtk_event_controller_set_propagation_phase (controller, GTK_PHASE_BUBBLE);
     gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
     g_signal_connect (controller, "pressed", G_CALLBACK (on_click_pressed), self);
-    g_signal_connect (controller, "stopped", G_CALLBACK (on_click_stopped), self);
     g_signal_connect (controller, "released", G_CALLBACK (on_click_released), self);
 
     controller = GTK_EVENT_CONTROLLER (gtk_gesture_long_press_new ());
@@ -1502,8 +1491,6 @@ constructed (GObject *object)
     gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (controller), 0);
     g_signal_connect (controller, "pressed",
                       G_CALLBACK (on_click_pressed), self);
-    g_signal_connect (controller, "stopped",
-                      G_CALLBACK (on_click_stopped), self);
     g_signal_connect (controller, "released",
                       G_CALLBACK (on_click_released), self);
 


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