summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-07 15:09:28 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-11 22:21:39 -0400
commit0d57abfe6510abaad9a45dbb16cc28af7d98e6cf (patch)
treef9883131d358a3768a201a36017d699a152e705c /demos
parent96d707444dad70619b23504cbe36a6af5caca9ba (diff)
downloadgtk+-0d57abfe6510abaad9a45dbb16cc28af7d98e6cf.tar.gz
Stop using container api on GtkFixed
GtkContainer is going away.
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/dnd.c4
-rw-r--r--demos/gtk-demo/fixed.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index 06addd854d..98faf8a9f9 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -138,7 +138,7 @@ edit_label_done (GtkWidget *entry, gpointer data)
gtk_label_set_text (GTK_LABEL (label), gtk_editable_get_text (GTK_EDITABLE (entry)));
gtk_widget_show (label);
- gtk_container_remove (GTK_CONTAINER (canvas), entry);
+ gtk_fixed_remove (GTK_FIXED (canvas), entry);
}
static void
@@ -172,7 +172,7 @@ delete_cb (GtkWidget *button, GtkWidget *child)
{
GtkWidget *canvas = gtk_widget_get_parent (child);
- gtk_container_remove (GTK_CONTAINER (canvas), child);
+ gtk_fixed_remove (GTK_FIXED (canvas), child);
gtk_popover_popdown (GTK_POPOVER (gtk_widget_get_ancestor (button, GTK_TYPE_POPOVER)));
}
diff --git a/demos/gtk-demo/fixed.c b/demos/gtk-demo/fixed.c
index 81c503261c..12d9920f6e 100644
--- a/demos/gtk-demo/fixed.c
+++ b/demos/gtk-demo/fixed.c
@@ -53,7 +53,7 @@ create_faces (void)
faces[i].face = gtk_frame_new (NULL);
gtk_widget_set_size_request (faces[i].face, face_size, face_size);
gtk_widget_add_css_class (faces[i].face, faces[i].css_class);
- gtk_container_add (GTK_CONTAINER (fixed), faces[i].face);
+ gtk_fixed_put (GTK_FIXED (fixed), faces[i].face, 0, 0);
/* Set up the transformation for each face */
transform = gsk_transform_translate (transform, &GRAPHENE_POINT_INIT (w, h));
@@ -139,7 +139,7 @@ create_demo_window (GtkWidget *do_widget)
gtk_widget_set_valign (GTK_WIDGET (fixed), GTK_ALIGN_CENTER);
cube = create_faces ();
- gtk_container_add (GTK_CONTAINER (fixed), cube);
+ gtk_fixed_put (GTK_FIXED (fixed), cube, 0, 0);
gtk_widget_set_overflow (fixed, GTK_OVERFLOW_VISIBLE);
provider = gtk_css_provider_new ();