[gtk/kill-containers: 11/49] Stop using container api on GtkFixed
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/kill-containers: 11/49] Stop using container api on GtkFixed
- Date: Tue, 12 May 2020 01:57:52 +0000 (UTC)
commit 7949837baf7d357a89ee36e23bf2503d6ef49f2b
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 7 15:09:28 2020 -0400
Stop using container api on GtkFixed
GtkContainer is going away.
demos/gtk-demo/dnd.c | 4 ++--
demos/gtk-demo/fixed.c | 4 ++--
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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]