Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adrien Plazas
libhandy
Commits
d147fbd6
Commit
d147fbd6
authored
Jul 27, 2020
by
Adrien Plazas
Browse files
leaflet: Rename allow-visible into allow-navigation
Fixes
GNOME/libhandy#312
parent
770187e8
Pipeline
#199368
failed with stages
in 11 minutes and 19 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/hdy-migrating-0-0-to-1.xml
View file @
d147fbd6
...
...
@@ -180,6 +180,9 @@
It can be mitigated by using #HdyWindow or #HdyApplicationWindow as they
will crop anything drawn beyond the rounded corners.
</para>
<para>
The “allow-visible” child property has been renamed “allow-navigation”.
</para>
</refsect3>
<refsect3>
...
...
examples/hdy-demo-window.ui
View file @
d147fbd6
...
...
@@ -126,7 +126,7 @@
</child>
</object>
<packing>
<property
name=
"allow-
visible
"
>
False
</property>
<property
name=
"allow-
navigation
"
>
False
</property>
</packing>
</child>
<child>
...
...
glade/glade-hdy-leaflet.c
View file @
d147fbd6
...
...
@@ -374,13 +374,13 @@ verify_page (GObject *object,
if
(
HDY_IS_LEAFLET
(
object
))
{
GtkWidget
*
child
=
glade_hdy_get_nth_child
(
GTK_CONTAINER
(
object
),
page
);
gboolean
allow_
visible
;
gboolean
allow_
navigation
;
gtk_container_child_get
(
GTK_CONTAINER
(
object
),
child
,
"allow-
visible"
,
&
allow_visible
,
"allow-
navigation"
,
&
allow_navigation
,
NULL
);
if
(
!
allow_
visible
)
if
(
!
allow_
navigation
)
return
FALSE
;
}
...
...
src/hdy-leaflet.c
View file @
d147fbd6
...
...
@@ -84,7 +84,7 @@ enum {
enum
{
CHILD_PROP_0
,
CHILD_PROP_NAME
,
CHILD_PROP_ALLOW_
VISIBLE
,
CHILD_PROP_ALLOW_
NAVIGATION
,
LAST_CHILD_PROP
,
};
...
...
@@ -441,7 +441,7 @@ hdy_leaflet_get_interpolate_size (HdyLeaflet *self)
* @can_swipe_back: the new value
*
* Sets whether or not @self allows switching to the previous child that has
* 'allow-
visible
' child property set to %TRUE via a swipe gesture
* 'allow-
navigation
' child property set to %TRUE via a swipe gesture
*
* Since: 0.0.12
*/
...
...
@@ -478,7 +478,7 @@ hdy_leaflet_get_can_swipe_back (HdyLeaflet *self)
* @can_swipe_forward: the new value
*
* Sets whether or not @self allows switching to the next child that has
* 'allow-
visible
' child property set to %TRUE via a swipe gesture.
* 'allow-
navigation
' child property set to %TRUE via a swipe gesture.
*
* Since: 0.0.12
*/
...
...
@@ -514,7 +514,7 @@ hdy_leaflet_get_can_swipe_forward (HdyLeaflet *self)
* @self: a #HdyLeaflet
* @direction: the direction
*
* Gets the previous or next child that doesn't have 'allow-
visible
' child
* Gets the previous or next child that doesn't have 'allow-
navigation
' child
* property set to %FALSE, or %NULL if it doesn't exist. This will be the same
* widget hdy_leaflet_navigate() will navigate to.
*
...
...
@@ -537,7 +537,7 @@ hdy_leaflet_get_adjacent_child (HdyLeaflet *self,
* @self: a #HdyLeaflet
* @direction: the direction
*
* Switches to the previous or next child that doesn't have 'allow-
visible
'
* Switches to the previous or next child that doesn't have 'allow-
navigation
'
* child property set to %FALSE, similar to performing a swipe gesture to go
* in @direction.
*
...
...
@@ -810,7 +810,7 @@ hdy_leaflet_get_child_property (GtkContainer *container,
g_value_set_string
(
value
,
hdy_stackable_box_get_child_name
(
HDY_GET_HELPER
(
container
),
widget
));
break
;
case
CHILD_PROP_ALLOW_
VISIBLE
:
case
CHILD_PROP_ALLOW_
NAVIGATION
:
g_value_set_boolean
(
value
,
hdy_stackable_box_get_child_allow_navigation
(
HDY_GET_HELPER
(
container
),
widget
));
break
;
...
...
@@ -833,7 +833,7 @@ hdy_leaflet_set_child_property (GtkContainer *container,
gtk_container_child_notify_by_pspec
(
container
,
widget
,
pspec
);
break
;
case
CHILD_PROP_ALLOW_
VISIBLE
:
case
CHILD_PROP_ALLOW_
NAVIGATION
:
hdy_stackable_box_set_child_allow_navigation
(
HDY_GET_HELPER
(
container
),
widget
,
g_value_get_boolean
(
value
));
gtk_container_child_notify_by_pspec
(
container
,
widget
,
pspec
);
break
;
...
...
@@ -1078,7 +1078,7 @@ hdy_leaflet_class_init (HdyLeafletClass *klass)
* HdyLeaflet:can-swipe-back:
*
* Whether or not the leaflet allows switching to the previous child that has
* 'allow-
visible
' child property set to %TRUE via a swipe gesture.
* 'allow-
navigation
' child property set to %TRUE via a swipe gesture.
*
* Since: 0.0.12
*/
...
...
@@ -1093,7 +1093,7 @@ hdy_leaflet_class_init (HdyLeafletClass *klass)
* HdyLeaflet:can-swipe-forward:
*
* Whether or not the leaflet allows switching to the next child that has
* 'allow-
visible
' child property set to %TRUE via a swipe gesture.
* 'allow-
navigation
' child property set to %TRUE via a swipe gesture.
*
* Since: 0.0.12
*/
...
...
@@ -1114,7 +1114,7 @@ hdy_leaflet_class_init (HdyLeafletClass *klass)
G_PARAM_READWRITE
);
/**
* HdyLeaflet:allow-
visible
:
* HdyLeaflet:allow-
navigation
:
*
* Whether the child can be visible when folded. This can be used used in
* conjunction with #HdyLeaflet:can-swipe-back or
...
...
@@ -1123,9 +1123,9 @@ hdy_leaflet_class_init (HdyLeafletClass *klass)
*
* Since: 0.0.12
*/
child_props
[
CHILD_PROP_ALLOW_
VISIBLE
]
=
g_param_spec_boolean
(
"allow-
visible
"
,
_
(
"Allow
visible
"
),
child_props
[
CHILD_PROP_ALLOW_
NAVIGATION
]
=
g_param_spec_boolean
(
"allow-
navigation
"
,
_
(
"Allow
navigation
"
),
_
(
"Whether the child can be visible in folded mode"
),
TRUE
,
G_PARAM_READWRITE
);
...
...
tests/test-leaflet.c
View file @
d147fbd6
...
...
@@ -27,7 +27,7 @@ test_hdy_leaflet_adjacent_child (void)
}
gtk_container_child_set
(
GTK_CONTAINER
(
leaflet
),
children
[
1
],
"allow-
visible
"
,
FALSE
,
"allow-
navigation
"
,
FALSE
,
NULL
);
hdy_leaflet_set_visible_child
(
leaflet
,
children
[
0
]);
...
...
@@ -75,7 +75,7 @@ test_hdy_leaflet_navigate (void)
}
gtk_container_child_set
(
GTK_CONTAINER
(
leaflet
),
children
[
1
],
"allow-
visible
"
,
FALSE
,
"allow-
navigation
"
,
FALSE
,
NULL
);
hdy_leaflet_set_visible_child
(
leaflet
,
children
[
0
]);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment