mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-14 06:10:21 +00:00
gtk-demo: Stop using child properties
This commit is contained in:
parent
f184393f07
commit
7f6213291d
@ -27,10 +27,16 @@ toggle_resize (GtkWidget *widget,
|
|||||||
|
|
||||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||||
|
|
||||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
if (is_child1)
|
||||||
"resize", &resize,
|
g_object_get (paned,
|
||||||
"shrink", &shrink,
|
"resize-child1", &resize,
|
||||||
NULL);
|
"shrink-child1", &shrink,
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
g_object_get (paned,
|
||||||
|
"resize-child2", &resize,
|
||||||
|
"shrink-child2", &shrink,
|
||||||
|
NULL);
|
||||||
|
|
||||||
g_object_ref (child);
|
g_object_ref (child);
|
||||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||||
@ -55,10 +61,16 @@ toggle_shrink (GtkWidget *widget,
|
|||||||
|
|
||||||
is_child1 = (child == gtk_paned_get_child1 (paned));
|
is_child1 = (child == gtk_paned_get_child1 (paned));
|
||||||
|
|
||||||
gtk_container_child_get (GTK_CONTAINER (paned), child,
|
if (is_child1)
|
||||||
"resize", &resize,
|
g_object_get (paned,
|
||||||
"shrink", &shrink,
|
"resize-child1", &resize,
|
||||||
NULL);
|
"shrink-child1", &shrink,
|
||||||
|
NULL);
|
||||||
|
else
|
||||||
|
g_object_get (paned,
|
||||||
|
"resize-child2", &resize,
|
||||||
|
"shrink-child2", &shrink,
|
||||||
|
NULL);
|
||||||
|
|
||||||
g_object_ref (child);
|
g_object_ref (child);
|
||||||
gtk_container_remove (GTK_CONTAINER (parent), child);
|
gtk_container_remove (GTK_CONTAINER (parent), child);
|
||||||
|
@ -236,10 +236,7 @@ puzzle_button_pressed (GtkGestureMultiPress *gesture,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_container_child_get (GTK_CONTAINER (grid), child,
|
gtk_grid_query_child (GTK_GRID (grid), child, &l, &t, NULL, NULL);
|
||||||
"left-attach", &l,
|
|
||||||
"top-attach", &t,
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
if (l == pos_x && t == pos_y)
|
if (l == pos_x && t == pos_y)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user