[libhandy] swipe-tracker: Remove check in _new()



commit 54175d5cf821d2d30be8ad35f165eab562cc54a2
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Jun 27 01:23:56 2020 +0500

    swipe-tracker: Remove check in _new()
    
    Don't check if the swipeable already has a swipe tracker. This check will
    become redundant in the next commit with hdy_swipeable_get_swipe_tracker(),
    as a swipeable must always have a swipe tracker now, and causes problems
    for HdyStackableBox, as we create the swipe tracker during the mixin
    creation, and so can't route hdy_swipeable_get_swipe_tracker() through the
    mixin yet.
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org

 src/hdy-swipe-tracker.c | 6 ------
 1 file changed, 6 deletions(-)
---
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index 51c5d41a..15469f3e 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -898,14 +898,8 @@ hdy_swipe_tracker_init (HdySwipeTracker *self)
 HdySwipeTracker *
 hdy_swipe_tracker_new (HdySwipeable *swipeable)
 {
-  gpointer swipe_tracker;
-
   g_return_val_if_fail (HDY_IS_SWIPEABLE (swipeable), NULL);
 
-  swipe_tracker = g_object_get_data (G_OBJECT (swipeable), "swipe-tracker");
-
-  g_return_val_if_fail (swipe_tracker == NULL, NULL);
-
   return g_object_new (HDY_TYPE_SWIPE_TRACKER,
                        "swipeable", swipeable,
                        NULL);


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