[libhandy] deck: Make 'slide' the last transition
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] deck: Make 'slide' the last transition
- Date: Thu, 18 Jun 2020 15:32:24 +0000 (UTC)
commit 4a3e0c8b786a30001683eb258098a1cdca19c3e3
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Jun 17 23:46:43 2020 +0500
deck: Make 'slide' the last transition
Rearrange them so that 'over' will be the first one after 'none' is
removed.
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
examples/hdy-demo-window.c | 4 ++--
glade/libhandy.xml | 4 ++--
src/hdy-deck.c | 18 +++++++++---------
src/hdy-deck.h | 2 +-
4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/examples/hdy-demo-window.c b/examples/hdy-demo-window.c
index c0574d3a..bbb9f14e 100644
--- a/examples/hdy-demo-window.c
+++ b/examples/hdy-demo-window.c
@@ -164,12 +164,12 @@ deck_transition_name (HdyEnumValueObject *value,
switch (hdy_enum_value_object_get_value (value)) {
case HDY_DECK_TRANSITION_TYPE_NONE:
return g_strdup (_("None"));
- case HDY_DECK_TRANSITION_TYPE_SLIDE:
- return g_strdup (_("Slide"));
case HDY_DECK_TRANSITION_TYPE_OVER:
return g_strdup (_("Over"));
case HDY_DECK_TRANSITION_TYPE_UNDER:
return g_strdup (_("Under"));
+ case HDY_DECK_TRANSITION_TYPE_SLIDE:
+ return g_strdup (_("Slide"));
default:
return NULL;
}
diff --git a/glade/libhandy.xml b/glade/libhandy.xml
index aa162c05..d8fa45da 100644
--- a/glade/libhandy.xml
+++ b/glade/libhandy.xml
@@ -122,11 +122,11 @@
<!-- HdyDeckTransitionType enumeration value -->
<value id="HDY_DECK_TRANSITION_TYPE_NONE" name="None"/>
<!-- HdyDeckTransitionType enumeration value -->
- <value id="HDY_DECK_TRANSITION_TYPE_SLIDE" name="Slide"/>
- <!-- HdyDeckTransitionType enumeration value -->
<value id="HDY_DECK_TRANSITION_TYPE_OVER" name="Over"/>
<!-- HdyDeckTransitionType enumeration value -->
<value id="HDY_DECK_TRANSITION_TYPE_UNDER" name="Under"/>
+ <!-- HdyDeckTransitionType enumeration value -->
+ <value id="HDY_DECK_TRANSITION_TYPE_SLIDE" name="Slide"/>
</displayable-values>
</property>
</properties>
diff --git a/src/hdy-deck.c b/src/hdy-deck.c
index f88f3b17..e0c18755 100644
--- a/src/hdy-deck.c
+++ b/src/hdy-deck.c
@@ -31,9 +31,9 @@
/**
* HdyDeckTransitionType:
* @HDY_DECK_TRANSITION_TYPE_NONE: No transition
- * @HDY_DECK_TRANSITION_TYPE_SLIDE: Slide from left, right, up or down according to the orientation, text
direction and the children order
* @HDY_DECK_TRANSITION_TYPE_OVER: Cover the old page or uncover the new page, sliding from or towards the
end according to orientation, text direction and children order
* @HDY_DECK_TRANSITION_TYPE_UNDER: Uncover the new page or cover the old page, sliding from or towards the
start according to orientation, text direction and children order
+ * @HDY_DECK_TRANSITION_TYPE_SLIDE: Slide from left, right, up or down according to the orientation, text
direction and the children order
*
* This enumeration value describes the possible transitions between children
* in a #HdyDeck widget.
@@ -153,15 +153,15 @@ hdy_deck_get_transition_type (HdyDeck *self)
case HDY_STACKABLE_BOX_TRANSITION_TYPE_NONE:
return HDY_DECK_TRANSITION_TYPE_NONE;
- case HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE:
- return HDY_DECK_TRANSITION_TYPE_SLIDE;
-
case HDY_STACKABLE_BOX_TRANSITION_TYPE_OVER:
return HDY_DECK_TRANSITION_TYPE_OVER;
case HDY_STACKABLE_BOX_TRANSITION_TYPE_UNDER:
return HDY_DECK_TRANSITION_TYPE_UNDER;
+ case HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE:
+ return HDY_DECK_TRANSITION_TYPE_SLIDE;
+
default:
g_assert_not_reached ();
}
@@ -188,17 +188,13 @@ hdy_deck_set_transition_type (HdyDeck *self,
HdyStackableBoxTransitionType type;
g_return_if_fail (HDY_IS_DECK (self));
- g_return_if_fail (transition <= HDY_DECK_TRANSITION_TYPE_UNDER);
+ g_return_if_fail (transition <= HDY_DECK_TRANSITION_TYPE_SLIDE);
switch (transition) {
case HDY_DECK_TRANSITION_TYPE_NONE:
type = HDY_STACKABLE_BOX_TRANSITION_TYPE_NONE;
break;
- case HDY_DECK_TRANSITION_TYPE_SLIDE:
- type = HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE;
- break;
-
case HDY_DECK_TRANSITION_TYPE_OVER:
type = HDY_STACKABLE_BOX_TRANSITION_TYPE_OVER;
break;
@@ -207,6 +203,10 @@ hdy_deck_set_transition_type (HdyDeck *self,
type = HDY_STACKABLE_BOX_TRANSITION_TYPE_UNDER;
break;
+ case HDY_DECK_TRANSITION_TYPE_SLIDE:
+ type = HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE;
+ break;
+
default:
g_assert_not_reached ();
}
diff --git a/src/hdy-deck.h b/src/hdy-deck.h
index 99c9dc75..8aa28265 100644
--- a/src/hdy-deck.h
+++ b/src/hdy-deck.h
@@ -21,9 +21,9 @@ G_DECLARE_DERIVABLE_TYPE (HdyDeck, hdy_deck, HDY, DECK, GtkContainer)
typedef enum {
HDY_DECK_TRANSITION_TYPE_NONE,
- HDY_DECK_TRANSITION_TYPE_SLIDE,
HDY_DECK_TRANSITION_TYPE_OVER,
HDY_DECK_TRANSITION_TYPE_UNDER,
+ HDY_DECK_TRANSITION_TYPE_SLIDE,
} HdyDeckTransitionType;
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]