[libhandy/swipe-tracker-public: 6/16] swipeable: Rename switch-child signal to child-switched
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/swipe-tracker-public: 6/16] swipeable: Rename switch-child signal to child-switched
- Date: Sun, 14 Jun 2020 20:45:04 +0000 (UTC)
commit f75477e32de3eaa4d826ba148fb00e0ad8227463
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sun Jun 14 23:07:26 2020 +0500
swipeable: Rename switch-child signal to child-switched
Also rename emit_switch_child() to emit_child_switched()
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
debian/libhandy-1-0.symbols | 2 +-
src/hdy-carousel.c | 2 +-
src/hdy-stackable-box.c | 8 ++++----
src/hdy-swipe-group.c | 10 +++++-----
src/hdy-swipeable-private.h | 6 +++---
src/hdy-swipeable.c | 22 +++++++++++-----------
6 files changed, 25 insertions(+), 25 deletions(-)
---
diff --git a/debian/libhandy-1-0.symbols b/debian/libhandy-1-0.symbols
index a3bdd782..c02d6dd8 100644
--- a/debian/libhandy-1-0.symbols
+++ b/debian/libhandy-1-0.symbols
@@ -336,7 +336,7 @@ libhandy-1.so.0 libhandy-1-0 #MINVER#
hdy_swipe_tracker_set_reversed@LIBHANDY_1_0 0.0.11
hdy_swipe_tracker_shift_position@LIBHANDY_1_0 0.81.0
hdy_swipeable_start_swipe@LIBHANDY_1_0 0.0.12
- hdy_swipeable_emit_switch_child@LIBHANDY_1_0 0.0.12
+ hdy_swipeable_emit_child_switched@LIBHANDY_1_0 0.0.12
hdy_swipeable_end_swipe@LIBHANDY_1_0 0.0.12
hdy_swipeable_get_cancel_progress@LIBHANDY_1_0 0.81.0
hdy_swipeable_get_distance@LIBHANDY_1_0 0.81.0
diff --git a/src/hdy-carousel.c b/src/hdy-carousel.c
index a8c607b9..4fe57a7a 100644
--- a/src/hdy-carousel.c
+++ b/src/hdy-carousel.c
@@ -1289,7 +1289,7 @@ hdy_carousel_scroll_to_full (HdyCarousel *self,
hdy_carousel_box_scroll_to (self->scrolling_box, widget,
duration);
- hdy_swipeable_emit_switch_child (HDY_SWIPEABLE (self), n, duration);
+ hdy_swipeable_emit_child_switched (HDY_SWIPEABLE (self), n, duration);
}
/**
diff --git a/src/hdy-stackable-box.c b/src/hdy-stackable-box.c
index f93ebdf3..a1c7b679 100644
--- a/src/hdy-stackable-box.c
+++ b/src/hdy-stackable-box.c
@@ -536,7 +536,7 @@ set_visible_child_info (HdyStackableBox *self,
HdyStackableBoxChildInfo *new_visible_child,
HdyStackableBoxTransitionType transition_type,
guint transition_duration,
- gboolean emit_switch_child)
+ gboolean emit_child_switched)
{
GtkWidget *widget = GTK_WIDGET (self->container);
GList *children;
@@ -654,7 +654,7 @@ set_visible_child_info (HdyStackableBox *self,
hdy_stackable_box_start_child_transition (self, transition_type, transition_duration,
transition_direction);
}
- if (emit_switch_child) {
+ if (emit_child_switched) {
gint index = 0;
for (children = self->children; children; children = children->next) {
@@ -669,8 +669,8 @@ set_visible_child_info (HdyStackableBox *self,
index++;
}
- hdy_swipeable_emit_switch_child (HDY_SWIPEABLE (self->container), index,
- transition_duration);
+ hdy_swipeable_emit_child_switched (HDY_SWIPEABLE (self->container), index,
+ transition_duration);
}
g_object_freeze_notify (G_OBJECT (self));
diff --git a/src/hdy-swipe-group.c b/src/hdy-swipe-group.c
index d7c8ee44..5ae3b100 100644
--- a/src/hdy-swipe-group.c
+++ b/src/hdy-swipe-group.c
@@ -102,10 +102,10 @@ hdy_swipe_group_new (void)
}
static void
-switch_child_cb (HdySwipeGroup *self,
- uint index,
- gint64 duration,
- HdySwipeable *swipeable)
+child_switched_cb (HdySwipeGroup *self,
+ uint index,
+ gint64 duration,
+ HdySwipeable *swipeable)
{
GSList *swipeables;
@@ -184,7 +184,7 @@ hdy_swipe_group_add_swipeable (HdySwipeGroup *self,
g_return_if_fail (HDY_IS_SWIPE_GROUP (self));
g_return_if_fail (HDY_IS_SWIPEABLE (swipeable));
- g_signal_connect_swapped (swipeable, "switch-child", G_CALLBACK (switch_child_cb), self);
+ g_signal_connect_swapped (swipeable, "child-switched", G_CALLBACK (child_switched_cb), self);
g_signal_connect_swapped (swipeable, "start-swipe", G_CALLBACK (start_swipe_cb), self);
g_signal_connect_swapped (swipeable, "update-swipe", G_CALLBACK (update_swipe_cb), self);
g_signal_connect_swapped (swipeable, "end-swipe", G_CALLBACK (end_swipe_cb), self);
diff --git a/src/hdy-swipeable-private.h b/src/hdy-swipeable-private.h
index 5e825ea4..bdfb223d 100644
--- a/src/hdy-swipeable-private.h
+++ b/src/hdy-swipeable-private.h
@@ -23,9 +23,9 @@ void hdy_swipeable_end_swipe (HdySwipeable *self,
gint64 duration,
gdouble to);
-void hdy_swipeable_emit_switch_child (HdySwipeable *self,
- guint index,
- gint64 duration);
+void hdy_swipeable_emit_child_switched (HdySwipeable *self,
+ guint index,
+ gint64 duration);
gdouble hdy_swipeable_get_distance (HdySwipeable *self);
void hdy_swipeable_get_range (HdySwipeable *self,
diff --git a/src/hdy-swipeable.c b/src/hdy-swipeable.c
index b0e7c973..0a8105c0 100644
--- a/src/hdy-swipeable.c
+++ b/src/hdy-swipeable.c
@@ -25,7 +25,7 @@
G_DEFINE_INTERFACE (HdySwipeable, hdy_swipeable, GTK_TYPE_WIDGET)
enum {
- SIGNAL_SWITCH_CHILD,
+ SIGNAL_CHILD_SWITCHED,
SIGNAL_START_SWIPE,
SIGNAL_UPDATE_SWIPE,
SIGNAL_END_SWIPE,
@@ -38,7 +38,7 @@ static void
hdy_swipeable_default_init (HdySwipeableInterface *iface)
{
/**
- * HdySwipeable::switch-child:
+ * HdySwipeable::child-switched:
* @self: The #HdySwipeable instance
* @index: the index of the child to switch to
* @duration: Animation duration in milliseconds
@@ -49,8 +49,8 @@ hdy_swipeable_default_init (HdySwipeableInterface *iface)
*
* Since: 0.0.12
*/
- signals[SIGNAL_SWITCH_CHILD] =
- g_signal_new ("switch-child",
+ signals[SIGNAL_CHILD_SWITCHED] =
+ g_signal_new ("child-switched",
G_TYPE_FROM_INTERFACE (iface),
G_SIGNAL_RUN_FIRST,
0,
@@ -129,7 +129,7 @@ hdy_swipeable_default_init (HdySwipeableInterface *iface)
* @index: the index of the child to switch to
* @duration: Animation duration in milliseconds
*
- * See HdySwipeable::switch-child.
+ * See HdySwipeable::child-switched.
*
* Since: 0.0.12
*/
@@ -248,12 +248,12 @@ hdy_swipeable_end_swipe (HdySwipeable *self,
}
/**
- * hdy_swipeable_emit_switch_child:
+ * hdy_swipeable_emit_child_switched:
* @self: a #HdySwipeable
* @index: the index of the child to switch to
* @duration: Animation duration in milliseconds
*
- * Emits HdySwipeable::switch-child signal. This should be called when the
+ * Emits HdySwipeable::child-switched signal. This should be called when the
* widget switches visible child widget.
*
* @duration can be 0 if the child is switched without animation.
@@ -261,13 +261,13 @@ hdy_swipeable_end_swipe (HdySwipeable *self,
* Since: 0.0.12
*/
void
-hdy_swipeable_emit_switch_child (HdySwipeable *self,
- guint index,
- gint64 duration)
+hdy_swipeable_emit_child_switched (HdySwipeable *self,
+ guint index,
+ gint64 duration)
{
g_return_if_fail (HDY_IS_SWIPEABLE (self));
- g_signal_emit (self, signals[SIGNAL_SWITCH_CHILD], 0, index, duration);
+ g_signal_emit (self, signals[SIGNAL_CHILD_SWITCHED], 0, index, duration);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]