[libadwaita/wip/exalm/swipe-group: 49/54] swipeable: Remove get_swipe_tracker()




commit 5e7161f761613166d67f4eff4ba26718adb3ad97
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Feb 26 14:40:38 2021 +0500

    swipeable: Remove get_swipe_tracker()
    
    It was only used by AdwSwipeGroup and the GtkButton hack in
    AdwSwipeTracker. Both are gone now, so we can remove this.

 src/adw-carousel.c  |  9 ---------
 src/adw-flap.c      |  9 ---------
 src/adw-leaflet.c   |  9 ---------
 src/adw-swipeable.c | 23 -----------------------
 src/adw-swipeable.h |  4 ----
 5 files changed, 54 deletions(-)
---
diff --git a/src/adw-carousel.c b/src/adw-carousel.c
index 9e3fb76..66ef7e9 100644
--- a/src/adw-carousel.c
+++ b/src/adw-carousel.c
@@ -1082,14 +1082,6 @@ adw_carousel_buildable_init (GtkBuildableIface *iface)
   iface->add_child = adw_carousel_buildable_add_child;
 }
 
-static AdwSwipeTracker *
-adw_carousel_get_swipe_tracker (AdwSwipeable *swipeable)
-{
-  AdwCarousel *self = ADW_CAROUSEL (swipeable);
-
-  return self->tracker;
-}
-
 static double
 adw_carousel_get_distance (AdwSwipeable *swipeable)
 {
@@ -1142,7 +1134,6 @@ adw_carousel_get_cancel_progress (AdwSwipeable *swipeable)
 static void
 adw_carousel_swipeable_init (AdwSwipeableInterface *iface)
 {
-  iface->get_swipe_tracker = adw_carousel_get_swipe_tracker;
   iface->get_distance = adw_carousel_get_distance;
   iface->get_snap_points = adw_carousel_get_snap_points;
   iface->get_progress = adw_carousel_get_progress;
diff --git a/src/adw-flap.c b/src/adw-flap.c
index 4f0ba38..9fc73c8 100644
--- a/src/adw-flap.c
+++ b/src/adw-flap.c
@@ -1598,14 +1598,6 @@ adw_flap_buildable_init (GtkBuildableIface *iface)
   iface->add_child = adw_flap_add_child;
 }
 
-static AdwSwipeTracker *
-adw_flap_get_swipe_tracker (AdwSwipeable *swipeable)
-{
-  AdwFlap *self = ADW_FLAP (swipeable);
-
-  return self->tracker;
-}
-
 static double
 adw_flap_get_distance (AdwSwipeable *swipeable)
 {
@@ -1754,7 +1746,6 @@ adw_flap_get_swipe_area (AdwSwipeable           *swipeable,
 static void
 adw_flap_swipeable_init (AdwSwipeableInterface *iface)
 {
-  iface->get_swipe_tracker = adw_flap_get_swipe_tracker;
   iface->get_distance = adw_flap_get_distance;
   iface->get_snap_points = adw_flap_get_snap_points;
   iface->get_progress = adw_flap_get_progress;
diff --git a/src/adw-leaflet.c b/src/adw-leaflet.c
index 5c2c721..81ba3cb 100644
--- a/src/adw-leaflet.c
+++ b/src/adw-leaflet.c
@@ -2502,14 +2502,6 @@ adw_leaflet_buildable_init (GtkBuildableIface *iface)
   iface->add_child = adw_leaflet_buildable_add_child;
 }
 
-static AdwSwipeTracker *
-adw_leaflet_get_swipe_tracker (AdwSwipeable *swipeable)
-{
-  AdwLeaflet *self = ADW_LEAFLET (swipeable);
-
-  return self->tracker;
-}
-
 static double
 adw_leaflet_get_distance (AdwSwipeable *swipeable)
 {
@@ -2660,7 +2652,6 @@ adw_leaflet_get_swipe_area (AdwSwipeable           *swipeable,
 static void
 adw_leaflet_swipeable_init (AdwSwipeableInterface *iface)
 {
-  iface->get_swipe_tracker = adw_leaflet_get_swipe_tracker;
   iface->get_distance = adw_leaflet_get_distance;
   iface->get_snap_points = adw_leaflet_get_snap_points;
   iface->get_progress = adw_leaflet_get_progress;
diff --git a/src/adw-swipeable.c b/src/adw-swipeable.c
index 4ae0297..dfcc25f 100644
--- a/src/adw-swipeable.c
+++ b/src/adw-swipeable.c
@@ -28,29 +28,6 @@ adw_swipeable_default_init (AdwSwipeableInterface *iface)
 {
 }
 
-/**
- * adw_swipeable_get_swipe_tracker:
- * @self: a #AdwSwipeable
- *
- * Gets the #AdwSwipeTracker used by this swipeable widget.
- *
- * Returns: (transfer none): the swipe tracker
- *
- * Since: 1.0
- */
-AdwSwipeTracker *
-adw_swipeable_get_swipe_tracker (AdwSwipeable *self)
-{
-  AdwSwipeableInterface *iface;
-
-  g_return_val_if_fail (ADW_IS_SWIPEABLE (self), NULL);
-
-  iface = ADW_SWIPEABLE_GET_IFACE (self);
-  g_return_val_if_fail (iface->get_swipe_tracker != NULL, NULL);
-
-  return iface->get_swipe_tracker (self);
-}
-
 /**
  * adw_swipeable_get_distance:
  * @self: a #AdwSwipeable
diff --git a/src/adw-swipeable.h b/src/adw-swipeable.h
index a081eaf..f59b239 100644
--- a/src/adw-swipeable.h
+++ b/src/adw-swipeable.h
@@ -26,7 +26,6 @@ G_DECLARE_INTERFACE (AdwSwipeable, adw_swipeable, ADW, SWIPEABLE, GtkWidget)
 /**
  * AdwSwipeableInterface:
  * @parent: The parent interface.
- * @get_swipe_tracker: Gets the swipe tracker.
  * @get_distance: Gets the swipe distance.
  * @get_snap_points: Gets the snap points
  * @get_progress: Gets the current progress.
@@ -41,7 +40,6 @@ struct _AdwSwipeableInterface
 {
   GTypeInterface parent;
 
-  AdwSwipeTracker * (*get_swipe_tracker)   (AdwSwipeable *self);
   double            (*get_distance)        (AdwSwipeable *self);
   double *          (*get_snap_points)     (AdwSwipeable *self,
                                             int          *n_snap_points);
@@ -56,8 +54,6 @@ struct _AdwSwipeableInterface
   gpointer padding[4];
 };
 
-ADW_AVAILABLE_IN_ALL
-AdwSwipeTracker *adw_swipeable_get_swipe_tracker   (AdwSwipeable *self);
 ADW_AVAILABLE_IN_ALL
 double           adw_swipeable_get_distance        (AdwSwipeable *self);
 ADW_AVAILABLE_IN_ALL


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