[libhandy] leaflet: Make 'slide' the last transition



commit a832d765f47c88be9991d8e84e74b2375db20ced
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Jun 17 23:51:27 2020 +0500

    leaflet: 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-leaflet.c          | 18 +++++++++---------
 src/hdy-leaflet.h          |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/examples/hdy-demo-window.c b/examples/hdy-demo-window.c
index bbb9f14e..60833055 100644
--- a/examples/hdy-demo-window.c
+++ b/examples/hdy-demo-window.c
@@ -131,12 +131,12 @@ leaflet_transition_name (HdyEnumValueObject *value,
   switch (hdy_enum_value_object_get_value (value)) {
   case HDY_LEAFLET_TRANSITION_TYPE_NONE:
     return g_strdup (_("None"));
-  case HDY_LEAFLET_TRANSITION_TYPE_SLIDE:
-    return g_strdup (_("Slide"));
   case HDY_LEAFLET_TRANSITION_TYPE_OVER:
     return g_strdup (_("Over"));
   case HDY_LEAFLET_TRANSITION_TYPE_UNDER:
     return g_strdup (_("Under"));
+  case HDY_LEAFLET_TRANSITION_TYPE_SLIDE:
+    return g_strdup (_("Slide"));
   default:
     return NULL;
   }
diff --git a/glade/libhandy.xml b/glade/libhandy.xml
index d8fa45da..e71e5fff 100644
--- a/glade/libhandy.xml
+++ b/glade/libhandy.xml
@@ -267,11 +267,11 @@
             <!-- HdyLeafletTransitionType enumeration value -->
             <value id="HDY_LEAFLET_TRANSITION_TYPE_NONE" name="None"/>
             <!-- HdyLeafletTransitionType enumeration value -->
-            <value id="HDY_LEAFLET_TRANSITION_TYPE_SLIDE" name="Slide"/>
-            <!-- HdyLeafletTransitionType enumeration value -->
             <value id="HDY_LEAFLET_TRANSITION_TYPE_OVER" name="Over"/>
             <!-- HdyLeafletTransitionType enumeration value -->
             <value id="HDY_LEAFLET_TRANSITION_TYPE_UNDER" name="Under"/>
+            <!-- HdyLeafletTransitionType enumeration value -->
+            <value id="HDY_LEAFLET_TRANSITION_TYPE_SLIDE" name="Slide"/>
           </displayable-values>
         </property>
       </properties>
diff --git a/src/hdy-leaflet.c b/src/hdy-leaflet.c
index 0addd255..6a1f8db5 100644
--- a/src/hdy-leaflet.c
+++ b/src/hdy-leaflet.c
@@ -35,9 +35,9 @@
 /**
  * HdyLeafletTransitionType:
  * @HDY_LEAFLET_TRANSITION_TYPE_NONE: No transition
- * @HDY_LEAFLET_TRANSITION_TYPE_SLIDE: Slide from left, right, up or down according to the orientation, text 
direction and the children order
  * @HDY_LEAFLET_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_LEAFLET_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_LEAFLET_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 modes and
  * children in a #HdyLeaflet widget.
@@ -178,15 +178,15 @@ hdy_leaflet_get_transition_type (HdyLeaflet *self)
   case HDY_STACKABLE_BOX_TRANSITION_TYPE_NONE:
     return HDY_LEAFLET_TRANSITION_TYPE_NONE;
 
-  case HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE:
-    return HDY_LEAFLET_TRANSITION_TYPE_SLIDE;
-
   case HDY_STACKABLE_BOX_TRANSITION_TYPE_OVER:
     return HDY_LEAFLET_TRANSITION_TYPE_OVER;
 
   case HDY_STACKABLE_BOX_TRANSITION_TYPE_UNDER:
     return HDY_LEAFLET_TRANSITION_TYPE_UNDER;
 
+  case HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE:
+    return HDY_LEAFLET_TRANSITION_TYPE_SLIDE;
+
   default:
     g_assert_not_reached ();
   }
@@ -213,17 +213,13 @@ hdy_leaflet_set_transition_type (HdyLeaflet               *self,
   HdyStackableBoxTransitionType type;
 
   g_return_if_fail (HDY_IS_LEAFLET (self));
-  g_return_if_fail (transition <= HDY_LEAFLET_TRANSITION_TYPE_UNDER);
+  g_return_if_fail (transition <= HDY_LEAFLET_TRANSITION_TYPE_SLIDE);
 
   switch (transition) {
   case HDY_LEAFLET_TRANSITION_TYPE_NONE:
     type = HDY_STACKABLE_BOX_TRANSITION_TYPE_NONE;
     break;
 
-  case HDY_LEAFLET_TRANSITION_TYPE_SLIDE:
-    type = HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE;
-    break;
-
   case HDY_LEAFLET_TRANSITION_TYPE_OVER:
     type = HDY_STACKABLE_BOX_TRANSITION_TYPE_OVER;
     break;
@@ -232,6 +228,10 @@ hdy_leaflet_set_transition_type (HdyLeaflet               *self,
     type = HDY_STACKABLE_BOX_TRANSITION_TYPE_UNDER;
     break;
 
+  case HDY_LEAFLET_TRANSITION_TYPE_SLIDE:
+    type = HDY_STACKABLE_BOX_TRANSITION_TYPE_SLIDE;
+    break;
+
   default:
     g_assert_not_reached ();
   }
diff --git a/src/hdy-leaflet.h b/src/hdy-leaflet.h
index 096c1cac..faff0383 100644
--- a/src/hdy-leaflet.h
+++ b/src/hdy-leaflet.h
@@ -22,9 +22,9 @@ G_DECLARE_DERIVABLE_TYPE (HdyLeaflet, hdy_leaflet, HDY, LEAFLET, GtkContainer)
 
 typedef enum {
   HDY_LEAFLET_TRANSITION_TYPE_NONE,
-  HDY_LEAFLET_TRANSITION_TYPE_SLIDE,
   HDY_LEAFLET_TRANSITION_TYPE_OVER,
   HDY_LEAFLET_TRANSITION_TYPE_UNDER,
+  HDY_LEAFLET_TRANSITION_TYPE_SLIDE,
 } HdyLeafletTransitionType;
 
 /**


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