summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/constraint-editor/constraint-editor-window.c4
-rw-r--r--demos/gtk-demo/clipboard.c2
-rw-r--r--demos/gtk-demo/combobox.c2
-rw-r--r--demos/gtk-demo/constraints.c2
-rw-r--r--demos/gtk-demo/constraints2.c2
-rw-r--r--demos/gtk-demo/constraints3.c2
-rw-r--r--demos/gtk-demo/css_accordion.c2
-rw-r--r--demos/gtk-demo/css_basics.c2
-rw-r--r--demos/gtk-demo/css_multiplebgs.c2
-rw-r--r--demos/gtk-demo/css_pixbufs.c2
-rw-r--r--demos/gtk-demo/css_shadows.c2
-rw-r--r--demos/gtk-demo/dialog.c2
-rw-r--r--demos/gtk-demo/dnd.c2
-rw-r--r--demos/gtk-demo/drawingarea.c2
-rw-r--r--demos/gtk-demo/editable_cells.c2
-rw-r--r--demos/gtk-demo/entry_completion.c2
-rw-r--r--demos/gtk-demo/entry_undo.c2
-rw-r--r--demos/gtk-demo/fixed.c2
-rw-r--r--demos/gtk-demo/flowbox.c2
-rw-r--r--demos/gtk-demo/gears.c2
-rw-r--r--demos/gtk-demo/gestures.c2
-rw-r--r--demos/gtk-demo/glarea.c2
-rw-r--r--demos/gtk-demo/headerbar.c2
-rw-r--r--demos/gtk-demo/hypertext.c2
-rw-r--r--demos/gtk-demo/iconview.c2
-rw-r--r--demos/gtk-demo/iconview_edit.c2
-rw-r--r--demos/gtk-demo/images.c2
-rw-r--r--demos/gtk-demo/infobar.c2
-rw-r--r--demos/gtk-demo/links.c2
-rw-r--r--demos/gtk-demo/list_store.c2
-rw-r--r--demos/gtk-demo/listbox.c2
-rw-r--r--demos/gtk-demo/markup.c2
-rw-r--r--demos/gtk-demo/overlay.c2
-rw-r--r--demos/gtk-demo/overlay2.c2
-rw-r--r--demos/gtk-demo/paint.c2
-rw-r--r--demos/gtk-demo/paintable.c2
-rw-r--r--demos/gtk-demo/paintable_animated.c2
-rw-r--r--demos/gtk-demo/paintable_mediastream.c2
-rw-r--r--demos/gtk-demo/panes.c2
-rw-r--r--demos/gtk-demo/password_entry.c2
-rw-r--r--demos/gtk-demo/peg_solitaire.c2
-rw-r--r--demos/gtk-demo/pickers.c2
-rw-r--r--demos/gtk-demo/pixbufs.c2
-rw-r--r--demos/gtk-demo/rotated_text.c2
-rw-r--r--demos/gtk-demo/search_entry.c2
-rw-r--r--demos/gtk-demo/search_entry2.c2
-rw-r--r--demos/gtk-demo/shortcut_triggers.c2
-rw-r--r--demos/gtk-demo/sidebar.c2
-rw-r--r--demos/gtk-demo/sizegroup.c2
-rw-r--r--demos/gtk-demo/sliding_puzzle.c2
-rw-r--r--demos/gtk-demo/tabs.c2
-rw-r--r--demos/gtk-demo/tagged_entry.c2
-rw-r--r--demos/gtk-demo/textmask.c2
-rw-r--r--demos/gtk-demo/textscroll.c2
-rw-r--r--demos/gtk-demo/textundo.c2
-rw-r--r--demos/gtk-demo/textview.c4
-rw-r--r--demos/gtk-demo/theming_style_classes.c2
-rw-r--r--demos/gtk-demo/transparent.c2
-rw-r--r--demos/gtk-demo/tree_store.c2
-rw-r--r--demos/gtk-demo/video_player.c2
60 files changed, 62 insertions, 62 deletions
diff --git a/demos/constraint-editor/constraint-editor-window.c b/demos/constraint-editor/constraint-editor-window.c
index cf2c11e2fd..1a78092994 100644
--- a/demos/constraint-editor/constraint-editor-window.c
+++ b/demos/constraint-editor/constraint-editor-window.c
@@ -426,7 +426,7 @@ edit_constraint (ConstraintEditorWindow *win,
editor = constraint_editor_new (model, constraint);
- gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (editor));
+ gtk_window_set_child (GTK_WINDOW (window), GTK_WIDGET (editor));
g_signal_connect (editor, "done", G_CALLBACK (constraint_editor_done), win);
@@ -460,7 +460,7 @@ edit_guide (ConstraintEditorWindow *win,
gtk_window_set_title (GTK_WINDOW (window), "Edit Guide");
editor = guide_editor_new (guide);
- gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (editor));
+ gtk_window_set_child (GTK_WINDOW (window), GTK_WIDGET (editor));
g_signal_connect (editor, "done", G_CALLBACK (guide_editor_done), win);
gtk_widget_show (window);
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index ca8ca07670..801baaa173 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -118,7 +118,7 @@ do_clipboard (GtkWidget *do_widget)
gtk_widget_set_margin_top (vbox, 8);
gtk_widget_set_margin_bottom (vbox, 8);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
diff --git a/demos/gtk-demo/combobox.c b/demos/gtk-demo/combobox.c
index e2e9d11f95..1fd1d7bcb9 100644
--- a/demos/gtk-demo/combobox.c
+++ b/demos/gtk-demo/combobox.c
@@ -324,7 +324,7 @@ do_combobox (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 10);
gtk_widget_set_margin_top (vbox, 10);
gtk_widget_set_margin_bottom (vbox, 10);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
/* A combobox demonstrating cell renderers, separators and
* insensitive rows
diff --git a/demos/gtk-demo/constraints.c b/demos/gtk-demo/constraints.c
index 57c5554cc4..f2f9076fa3 100644
--- a/demos/gtk-demo/constraints.c
+++ b/demos/gtk-demo/constraints.c
@@ -266,7 +266,7 @@ do_constraints (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
grid = g_object_new (simple_grid_get_type (), NULL);
gtk_widget_set_hexpand (grid, TRUE);
diff --git a/demos/gtk-demo/constraints2.c b/demos/gtk-demo/constraints2.c
index db8a75b88f..cdaaa85088 100644
--- a/demos/gtk-demo/constraints2.c
+++ b/demos/gtk-demo/constraints2.c
@@ -222,7 +222,7 @@ do_constraints2 (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
grid = g_object_new (interactive_grid_get_type (), NULL);
gtk_widget_set_hexpand (grid, TRUE);
diff --git a/demos/gtk-demo/constraints3.c b/demos/gtk-demo/constraints3.c
index 2c7566b422..01d81a48d2 100644
--- a/demos/gtk-demo/constraints3.c
+++ b/demos/gtk-demo/constraints3.c
@@ -142,7 +142,7 @@ do_constraints3 (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
grid = g_object_new (vfl_grid_get_type (), NULL);
gtk_widget_set_hexpand (grid, TRUE);
diff --git a/demos/gtk-demo/css_accordion.c b/demos/gtk-demo/css_accordion.c
index 648393a506..d28262def0 100644
--- a/demos/gtk-demo/css_accordion.c
+++ b/demos/gtk-demo/css_accordion.c
@@ -34,7 +34,7 @@ do_css_accordion (GtkWidget *do_widget)
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
gtk_widget_set_valign (container, GTK_ALIGN_CENTER);
- gtk_container_add (GTK_CONTAINER (window), container);
+ gtk_window_set_child (GTK_WINDOW (window), container);
child = gtk_button_new_with_label ("This");
gtk_container_add (GTK_CONTAINER (container), child);
diff --git a/demos/gtk-demo/css_basics.c b/demos/gtk-demo/css_basics.c
index 83e408dd68..2f46c4f38b 100644
--- a/demos/gtk-demo/css_basics.c
+++ b/demos/gtk-demo/css_basics.c
@@ -92,7 +92,7 @@ do_css_basics (GtkWidget *do_widget)
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
container = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (window), container);
+ gtk_window_set_child (GTK_WINDOW (window), container);
child = gtk_text_view_new_with_buffer (text);
gtk_container_add (GTK_CONTAINER (container), child);
g_signal_connect (text, "changed",
diff --git a/demos/gtk-demo/css_multiplebgs.c b/demos/gtk-demo/css_multiplebgs.c
index 056b647e69..5e29060d85 100644
--- a/demos/gtk-demo/css_multiplebgs.c
+++ b/demos/gtk-demo/css_multiplebgs.c
@@ -94,7 +94,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
container = gtk_overlay_new ();
- gtk_container_add (GTK_CONTAINER (window), container);
+ gtk_window_set_child (GTK_WINDOW (window), container);
child = gtk_drawing_area_new ();
gtk_widget_set_name (child, "canvas");
diff --git a/demos/gtk-demo/css_pixbufs.c b/demos/gtk-demo/css_pixbufs.c
index e60a7d4e87..9d88ef76fa 100644
--- a/demos/gtk-demo/css_pixbufs.c
+++ b/demos/gtk-demo/css_pixbufs.c
@@ -80,7 +80,7 @@ do_css_pixbufs (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (window), paned);
+ gtk_window_set_child (GTK_WINDOW (window), paned);
/* Need a filler so we get a handle */
child = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
diff --git a/demos/gtk-demo/css_shadows.c b/demos/gtk-demo/css_shadows.c
index 6457d43efa..de21cfae29 100644
--- a/demos/gtk-demo/css_shadows.c
+++ b/demos/gtk-demo/css_shadows.c
@@ -99,7 +99,7 @@ do_css_shadows (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (window), paned);
+ gtk_window_set_child (GTK_WINDOW (window), paned);
child = create_toolbar ();
gtk_container_add (GTK_CONTAINER (paned), child);
diff --git a/demos/gtk-demo/dialog.c b/demos/gtk-demo/dialog.c
index 92a4e3371c..6b965b9d84 100644
--- a/demos/gtk-demo/dialog.c
+++ b/demos/gtk-demo/dialog.c
@@ -118,7 +118,7 @@ do_dialog (GtkWidget *do_widget)
gtk_widget_set_margin_end (frame, 8);
gtk_widget_set_margin_top (frame, 8);
gtk_widget_set_margin_bottom (frame, 8);
- gtk_container_add (GTK_CONTAINER (window), frame);
+ gtk_window_set_child (GTK_WINDOW (window), frame);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
gtk_widget_set_margin_start (vbox, 8);
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index b2c1a307da..30bae48e17 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -443,7 +443,7 @@ do_dnd (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), box2);
diff --git a/demos/gtk-demo/drawingarea.c b/demos/gtk-demo/drawingarea.c
index 845b414834..dd7380b63c 100644
--- a/demos/gtk-demo/drawingarea.c
+++ b/demos/gtk-demo/drawingarea.c
@@ -202,7 +202,7 @@ do_drawingarea (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 16);
gtk_widget_set_margin_top (vbox, 16);
gtk_widget_set_margin_bottom (vbox, 16);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
/*
* Create the checkerboard area
diff --git a/demos/gtk-demo/editable_cells.c b/demos/gtk-demo/editable_cells.c
index 5a559a674c..cb0ff0abfa 100644
--- a/demos/gtk-demo/editable_cells.c
+++ b/demos/gtk-demo/editable_cells.c
@@ -360,7 +360,7 @@ do_editable_cells (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 5);
gtk_widget_set_margin_top (vbox, 5);
gtk_widget_set_margin_bottom (vbox, 5);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
gtk_container_add (GTK_CONTAINER (vbox),
gtk_label_new ("Shopping list (you can edit the cells!)"));
diff --git a/demos/gtk-demo/entry_completion.c b/demos/gtk-demo/entry_completion.c
index 9cd193b2f8..d371afc451 100644
--- a/demos/gtk-demo/entry_completion.c
+++ b/demos/gtk-demo/entry_completion.c
@@ -59,7 +59,7 @@ do_entry_completion (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 5);
gtk_widget_set_margin_top (vbox, 5);
gtk_widget_set_margin_bottom (vbox, 5);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
diff --git a/demos/gtk-demo/entry_undo.c b/demos/gtk-demo/entry_undo.c
index 1c8babfd3f..9d069aeafb 100644
--- a/demos/gtk-demo/entry_undo.c
+++ b/demos/gtk-demo/entry_undo.c
@@ -33,7 +33,7 @@ do_entry_undo (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 5);
gtk_widget_set_margin_top (vbox, 5);
gtk_widget_set_margin_bottom (vbox, 5);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label),
diff --git a/demos/gtk-demo/fixed.c b/demos/gtk-demo/fixed.c
index 7c739030a6..dcdf253596 100644
--- a/demos/gtk-demo/fixed.c
+++ b/demos/gtk-demo/fixed.c
@@ -131,7 +131,7 @@ create_demo_window (GtkWidget *do_widget)
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
sw = gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_window_set_child (GTK_WINDOW (window), sw);
fixed = gtk_fixed_new ();
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), fixed);
diff --git a/demos/gtk-demo/flowbox.c b/demos/gtk-demo/flowbox.c
index 901b78cb6a..fd87463b89 100644
--- a/demos/gtk-demo/flowbox.c
+++ b/demos/gtk-demo/flowbox.c
@@ -736,7 +736,7 @@ do_flowbox (GtkWidget *do_widget)
gtk_flow_box_set_selection_mode (GTK_FLOW_BOX (flowbox), GTK_SELECTION_NONE);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled), flowbox);
- gtk_container_add (GTK_CONTAINER (window), scrolled);
+ gtk_window_set_child (GTK_WINDOW (window), scrolled);
for (i = 0; colors[i]; i++)
gtk_container_add (GTK_CONTAINER (flowbox), color_swatch_new (colors[i]));
diff --git a/demos/gtk-demo/gears.c b/demos/gtk-demo/gears.c
index 66fb2b420f..f6237da494 100644
--- a/demos/gtk-demo/gears.c
+++ b/demos/gtk-demo/gears.c
@@ -93,7 +93,7 @@ do_gears (GtkWidget *do_widget)
gtk_widget_set_margin_top (overlay, 12);
gtk_widget_set_margin_bottom (overlay, 12);
- gtk_container_add (GTK_CONTAINER (window), overlay);
+ gtk_window_set_child (GTK_WINDOW (window), overlay);
frame = gtk_frame_new (NULL);
gtk_widget_set_halign (frame, GTK_ALIGN_START);
diff --git a/demos/gtk-demo/gestures.c b/demos/gtk-demo/gestures.c
index d50eb34b99..f238da1666 100644
--- a/demos/gtk-demo/gestures.c
+++ b/demos/gtk-demo/gestures.c
@@ -153,7 +153,7 @@ do_gestures (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
drawing_area = gtk_drawing_area_new ();
- gtk_container_add (GTK_CONTAINER (window), drawing_area);
+ gtk_window_set_child (GTK_WINDOW (window), drawing_area);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area),
drawing_area_draw,
diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
index a72cf7c376..0a5f965a07 100644
--- a/demos/gtk-demo/glarea.c
+++ b/demos/gtk-demo/glarea.c
@@ -401,7 +401,7 @@ create_glarea_window (GtkWidget *do_widget)
gtk_widget_set_margin_top (box, 12);
gtk_widget_set_margin_bottom (box, 12);
gtk_box_set_spacing (GTK_BOX (box), 6);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
gl_area = gtk_gl_area_new ();
gtk_widget_set_hexpand (gl_area, TRUE);
diff --git a/demos/gtk-demo/headerbar.c b/demos/gtk-demo/headerbar.c
index a1ddf97511..e8a0ead1a9 100644
--- a/demos/gtk-demo/headerbar.c
+++ b/demos/gtk-demo/headerbar.c
@@ -52,7 +52,7 @@ do_headerbar (GtkWidget *do_widget)
gtk_window_set_titlebar (GTK_WINDOW (window), header);
- gtk_container_add (GTK_CONTAINER (window), gtk_text_view_new ());
+ gtk_window_set_child (GTK_WINDOW (window), gtk_text_view_new ());
}
if (!gtk_widget_get_visible (window))
diff --git a/demos/gtk-demo/hypertext.c b/demos/gtk-demo/hypertext.c
index 81a19e3305..9191cabe49 100644
--- a/demos/gtk-demo/hypertext.c
+++ b/demos/gtk-demo/hypertext.c
@@ -266,7 +266,7 @@ do_hypertext (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_window_set_child (GTK_WINDOW (window), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view);
show_page (buffer, 1);
diff --git a/demos/gtk-demo/iconview.c b/demos/gtk-demo/iconview.c
index 8a6372d119..0b80aafae1 100644
--- a/demos/gtk-demo/iconview.c
+++ b/demos/gtk-demo/iconview.c
@@ -263,7 +263,7 @@ do_iconview (GtkWidget *do_widget)
load_pixbufs ();
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
tool_bar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (vbox), tool_bar);
diff --git a/demos/gtk-demo/iconview_edit.c b/demos/gtk-demo/iconview_edit.c
index a9b4f890b7..6e5c52d2a6 100644
--- a/demos/gtk-demo/iconview_edit.c
+++ b/demos/gtk-demo/iconview_edit.c
@@ -146,7 +146,7 @@ do_iconview_edit (GtkWidget *do_widget)
"text", COL_TEXT,
NULL);
- gtk_container_add (GTK_CONTAINER (window), icon_view);
+ gtk_window_set_child (GTK_WINDOW (window), icon_view);
}
if (!gtk_widget_get_visible (window))
diff --git a/demos/gtk-demo/images.c b/demos/gtk-demo/images.c
index 455343a933..b0efca8a1b 100644
--- a/demos/gtk-demo/images.c
+++ b/demos/gtk-demo/images.c
@@ -346,7 +346,7 @@ do_images (GtkWidget *do_widget)
gtk_widget_set_margin_end (base_vbox, 16);
gtk_widget_set_margin_top (base_vbox, 16);
gtk_widget_set_margin_bottom (base_vbox, 16);
- gtk_container_add (GTK_CONTAINER (window), base_vbox);
+ gtk_window_set_child (GTK_WINDOW (window), base_vbox);
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 16);
gtk_container_add (GTK_CONTAINER (base_vbox), hbox);
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index c6f744c2ab..92fc46b26c 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -66,7 +66,7 @@ do_infobar (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 8);
gtk_widget_set_margin_top (vbox, 8);
gtk_widget_set_margin_bottom (vbox, 8);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
bar = gtk_info_bar_new ();
gtk_container_add (GTK_CONTAINER (vbox), bar);
diff --git a/demos/gtk-demo/links.c b/demos/gtk-demo/links.c
index 4917176581..219f096346 100644
--- a/demos/gtk-demo/links.c
+++ b/demos/gtk-demo/links.c
@@ -81,7 +81,7 @@ do_links (GtkWidget *do_widget)
gtk_widget_set_margin_end (label, 20);
gtk_widget_set_margin_top (label, 20);
gtk_widget_set_margin_bottom (label, 20);
- gtk_container_add (GTK_CONTAINER (window), label);
+ gtk_window_set_child (GTK_WINDOW (window), label);
gtk_widget_show (label);
}
diff --git a/demos/gtk-demo/list_store.c b/demos/gtk-demo/list_store.c
index 27815802ca..941548318c 100644
--- a/demos/gtk-demo/list_store.c
+++ b/demos/gtk-demo/list_store.c
@@ -266,7 +266,7 @@ do_list_store (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 8);
gtk_widget_set_margin_top (vbox, 8);
gtk_widget_set_margin_bottom (vbox, 8);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
gtk_container_add (GTK_CONTAINER (vbox), label);
diff --git a/demos/gtk-demo/listbox.c b/demos/gtk-demo/listbox.c
index d988ec5e65..fe9c3e2fd3 100644
--- a/demos/gtk-demo/listbox.c
+++ b/demos/gtk-demo/listbox.c
@@ -360,7 +360,7 @@ do_listbox (GtkWidget *do_widget)
&window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new ("Messages from GTK and friends");
gtk_container_add (GTK_CONTAINER (vbox), label);
scrolled = gtk_scrolled_window_new (NULL, NULL);
diff --git a/demos/gtk-demo/markup.c b/demos/gtk-demo/markup.c
index a9a0eaf11b..7b23ec9252 100644
--- a/demos/gtk-demo/markup.c
+++ b/demos/gtk-demo/markup.c
@@ -63,7 +63,7 @@ do_markup (GtkWidget *do_widget)
stack = gtk_stack_new ();
gtk_widget_show (stack);
- gtk_container_add (GTK_CONTAINER (window), stack);
+ gtk_window_set_child (GTK_WINDOW (window), stack);
show_source = gtk_check_button_new_with_label ("Source");
gtk_widget_set_valign (show_source, GTK_ALIGN_CENTER);
diff --git a/demos/gtk-demo/overlay.c b/demos/gtk-demo/overlay.c
index afc7c534df..be3c2e1696 100644
--- a/demos/gtk-demo/overlay.c
+++ b/demos/gtk-demo/overlay.c
@@ -78,7 +78,7 @@ do_overlay (GtkWidget *do_widget)
gtk_widget_set_margin_bottom (entry, 8);
gtk_container_add (GTK_CONTAINER (vbox), entry);
- gtk_container_add (GTK_CONTAINER (window), overlay);
+ gtk_window_set_child (GTK_WINDOW (window), overlay);
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
diff --git a/demos/gtk-demo/overlay2.c b/demos/gtk-demo/overlay2.c
index b990701944..8d491faea8 100644
--- a/demos/gtk-demo/overlay2.c
+++ b/demos/gtk-demo/overlay2.c
@@ -57,7 +57,7 @@ do_overlay2 (GtkWidget *do_widget)
gtk_text_iter_forward_word_end (&end);
gtk_text_buffer_apply_tag (buffer, tag, &start, &end);
- gtk_container_add (GTK_CONTAINER (window), overlay);
+ gtk_window_set_child (GTK_WINDOW (window), overlay);
gtk_container_add (GTK_CONTAINER (overlay), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), text);
diff --git a/demos/gtk-demo/paint.c b/demos/gtk-demo/paint.c
index f392ea2769..a13750801e 100644
--- a/demos/gtk-demo/paint.c
+++ b/demos/gtk-demo/paint.c
@@ -389,7 +389,7 @@ do_paint (GtkWidget *toplevel)
window = gtk_window_new ();
draw_area = drawing_area_new ();
- gtk_container_add (GTK_CONTAINER (window), draw_area);
+ gtk_window_set_child (GTK_WINDOW (window), draw_area);
headerbar = gtk_header_bar_new ();
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (headerbar), TRUE);
diff --git a/demos/gtk-demo/paintable.c b/demos/gtk-demo/paintable.c
index c4c31b61ca..63fef5d5c8 100644
--- a/demos/gtk-demo/paintable.c
+++ b/demos/gtk-demo/paintable.c
@@ -164,7 +164,7 @@ do_paintable (GtkWidget *do_widget)
nuclear = gtk_nuclear_icon_new (0.0);
image = gtk_image_new_from_paintable (nuclear);
- gtk_container_add (GTK_CONTAINER (window), image);
+ gtk_window_set_child (GTK_WINDOW (window), image);
g_object_unref (nuclear);
}
diff --git a/demos/gtk-demo/paintable_animated.c b/demos/gtk-demo/paintable_animated.c
index e81d9d2f94..4c71512b1e 100644
--- a/demos/gtk-demo/paintable_animated.c
+++ b/demos/gtk-demo/paintable_animated.c
@@ -196,7 +196,7 @@ do_paintable_animated (GtkWidget *do_widget)
nuclear = gtk_nuclear_animation_new ();
image = gtk_image_new_from_paintable (nuclear);
- gtk_container_add (GTK_CONTAINER (window), image);
+ gtk_window_set_child (GTK_WINDOW (window), image);
g_object_unref (nuclear);
}
diff --git a/demos/gtk-demo/paintable_mediastream.c b/demos/gtk-demo/paintable_mediastream.c
index a666b3d3e0..4b1cde9e2d 100644
--- a/demos/gtk-demo/paintable_mediastream.c
+++ b/demos/gtk-demo/paintable_mediastream.c
@@ -298,7 +298,7 @@ do_paintable_mediastream (GtkWidget *do_widget)
gtk_media_stream_set_loop (GTK_MEDIA_STREAM (nuclear), TRUE);
video = gtk_video_new_for_media_stream (nuclear);
- gtk_container_add (GTK_CONTAINER (window), video);
+ gtk_window_set_child (GTK_WINDOW (window), video);
g_object_unref (nuclear);
}
diff --git a/demos/gtk-demo/panes.c b/demos/gtk-demo/panes.c
index 98ce0fd664..6a5c9bc59e 100644
--- a/demos/gtk-demo/panes.c
+++ b/demos/gtk-demo/panes.c
@@ -159,7 +159,7 @@ do_panes (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Paned Widgets");
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_widget_set_margin_start (vpaned, 5);
diff --git a/demos/gtk-demo/password_entry.c b/demos/gtk-demo/password_entry.c
index 56310d23a5..f8246dd4a4 100644
--- a/demos/gtk-demo/password_entry.c
+++ b/demos/gtk-demo/password_entry.c
@@ -53,7 +53,7 @@ do_password_entry (GtkWidget *do_widget)
gtk_widget_set_margin_end (box, 18);
gtk_widget_set_margin_top (box, 18);
gtk_widget_set_margin_bottom (box, 18);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
entry = gtk_password_entry_new ();
gtk_password_entry_set_show_peek_icon (GTK_PASSWORD_ENTRY (entry), TRUE);
diff --git a/demos/gtk-demo/peg_solitaire.c b/demos/gtk-demo/peg_solitaire.c
index f4f3fc4e26..00fdca3d56 100644
--- a/demos/gtk-demo/peg_solitaire.c
+++ b/demos/gtk-demo/peg_solitaire.c
@@ -294,7 +294,7 @@ do_peg_solitaire (GtkWidget *do_widget)
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
- gtk_container_add (GTK_CONTAINER (window), grid);
+ gtk_window_set_child (GTK_WINDOW (window), grid);
for (x = 0; x < 7; x++)
{
diff --git a/demos/gtk-demo/pickers.c b/demos/gtk-demo/pickers.c
index e17620022b..5f6b3f8497 100644
--- a/demos/gtk-demo/pickers.c
+++ b/demos/gtk-demo/pickers.c
@@ -29,7 +29,7 @@ do_pickers (GtkWidget *do_widget)
gtk_widget_set_margin_bottom (table, 20);
gtk_grid_set_row_spacing (GTK_GRID (table), 3);
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
- gtk_container_add (GTK_CONTAINER (window), table);
+ gtk_window_set_child (GTK_WINDOW (window), table);
label = gtk_label_new ("Color:");
gtk_widget_set_halign (label, GTK_ALIGN_START);
diff --git a/demos/gtk-demo/pixbufs.c b/demos/gtk-demo/pixbufs.c
index eab22a464e..aece1dfb4a 100644
--- a/demos/gtk-demo/pixbufs.c
+++ b/demos/gtk-demo/pixbufs.c
@@ -212,7 +212,7 @@ do_pixbufs (GtkWidget *do_widget)
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (da), back_height);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_func, NULL, NULL);
- gtk_container_add (GTK_CONTAINER (window), da);
+ gtk_window_set_child (GTK_WINDOW (window), da);
gtk_widget_add_tick_callback (da, on_tick, NULL, NULL);
}
diff --git a/demos/gtk-demo/rotated_text.c b/demos/gtk-demo/rotated_text.c
index eef6f7ca35..b86a5e6944 100644
--- a/demos/gtk-demo/rotated_text.c
+++ b/demos/gtk-demo/rotated_text.c
@@ -185,7 +185,7 @@ do_rotated_text (GtkWidget *do_widget)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_set_homogeneous (GTK_BOX (box), TRUE);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
/* Add a drawing area */
drawing_area = gtk_drawing_area_new ();
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c
index d9999eea5e..a072aa0962 100644
--- a/demos/gtk-demo/search_entry.c
+++ b/demos/gtk-demo/search_entry.c
@@ -269,7 +269,7 @@ do_search_entry (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 5);
gtk_widget_set_margin_top (vbox, 5);
gtk_widget_set_margin_bottom (vbox, 5);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
label = gtk_label_new (NULL);
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
diff --git a/demos/gtk-demo/search_entry2.c b/demos/gtk-demo/search_entry2.c
index 68a9de3faa..de8c577b91 100644
--- a/demos/gtk-demo/search_entry2.c
+++ b/demos/gtk-demo/search_entry2.c
@@ -78,7 +78,7 @@ do_search_entry2 (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
entry = gtk_search_entry_new ();
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
diff --git a/demos/gtk-demo/shortcut_triggers.c b/demos/gtk-demo/shortcut_triggers.c
index c57edea5fc..509a7f5514 100644
--- a/demos/gtk-demo/shortcut_triggers.c
+++ b/demos/gtk-demo/shortcut_triggers.c
@@ -65,7 +65,7 @@ do_shortcut_triggers (GtkWidget *do_widget)
gtk_widget_set_margin_bottom (list, 6);
gtk_widget_set_margin_start (list, 6);
gtk_widget_set_margin_end (list, 6);
- gtk_container_add (GTK_CONTAINER (window), list);
+ gtk_window_set_child (GTK_WINDOW (window), list);
for (i = 0; i < G_N_ELEMENTS (shortcuts); i++)
{
diff --git a/demos/gtk-demo/sidebar.c b/demos/gtk-demo/sidebar.c
index 2b64ec2264..420861f225 100644
--- a/demos/gtk-demo/sidebar.c
+++ b/demos/gtk-demo/sidebar.c
@@ -74,7 +74,7 @@ do_sidebar (GtkWidget *do_widget)
g_object_set (gtk_stack_get_page (GTK_STACK (stack), widget), "title", c, NULL);
}
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
}
if (!gtk_widget_get_visible (window))
diff --git a/demos/gtk-demo/sizegroup.c b/demos/gtk-demo/sizegroup.c
index edbf9e9cf2..9d12dd3551 100644
--- a/demos/gtk-demo/sizegroup.c
+++ b/demos/gtk-demo/sizegroup.c
@@ -112,7 +112,7 @@ do_sizegroup (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 5);
gtk_widget_set_margin_top (vbox, 5);
gtk_widget_set_margin_bottom (vbox, 5);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
g_object_set_data_full (G_OBJECT (window), "size-group", size_group, g_object_unref);
diff --git a/demos/gtk-demo/sliding_puzzle.c b/demos/gtk-demo/sliding_puzzle.c
index 00c2a765e4..03ac047e6a 100644
--- a/demos/gtk-demo/sliding_puzzle.c
+++ b/demos/gtk-demo/sliding_puzzle.c
@@ -463,7 +463,7 @@ do_sliding_puzzle (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
frame = gtk_aspect_frame_new (0.5, 0.5, (float) gdk_paintable_get_intrinsic_aspect_ratio (puzzle), FALSE);
- gtk_container_add (GTK_CONTAINER (window), frame);
+ gtk_window_set_child (GTK_WINDOW (window), frame);
start_puzzle (puzzle);
}
diff --git a/demos/gtk-demo/tabs.c b/demos/gtk-demo/tabs.c
index 034b60a566..0a046a594e 100644
--- a/demos/gtk-demo/tabs.c
+++ b/demos/gtk-demo/tabs.c
@@ -46,7 +46,7 @@ do_tabs (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_window_set_child (GTK_WINDOW (window), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view);
}
diff --git a/demos/gtk-demo/tagged_entry.c b/demos/gtk-demo/tagged_entry.c
index c7b0816c4a..26795421bc 100644
--- a/demos/gtk-demo/tagged_entry.c
+++ b/demos/gtk-demo/tagged_entry.c
@@ -80,7 +80,7 @@ do_tagged_entry (GtkWidget *do_widget)
gtk_widget_set_margin_end (box, 18);
gtk_widget_set_margin_top (box, 18);
gtk_widget_set_margin_bottom (box, 18);
- gtk_container_add (GTK_CONTAINER (window), box);
+ gtk_window_set_child (GTK_WINDOW (window), box);
entry = demo_tagged_entry_new ();
gtk_container_add (GTK_CONTAINER (box), entry);
diff --git a/demos/gtk-demo/textmask.c b/demos/gtk-demo/textmask.c
index 6457be2857..ff66ce2961 100644
--- a/demos/gtk-demo/textmask.c
+++ b/demos/gtk-demo/textmask.c
@@ -69,7 +69,7 @@ do_textmask (GtkWidget *do_widget)
da = gtk_drawing_area_new ();
- gtk_container_add (GTK_CONTAINER (window), da);
+ gtk_window_set_child (GTK_WINDOW (window), da);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), draw_text, NULL, NULL);
}
diff --git a/demos/gtk-demo/textscroll.c b/demos/gtk-demo/textscroll.c
index ccd5d521b1..02df96c7a9 100644
--- a/demos/gtk-demo/textscroll.c
+++ b/demos/gtk-demo/textscroll.c
@@ -188,7 +188,7 @@ do_textscroll (GtkWidget *do_widget)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
- gtk_container_add (GTK_CONTAINER (window), hbox);
+ gtk_window_set_child (GTK_WINDOW (window), hbox);
create_text_view (hbox, TRUE);
create_text_view (hbox, FALSE);
diff --git a/demos/gtk-demo/textundo.c b/demos/gtk-demo/textundo.c
index fb3a03e442..d7e35e0851 100644
--- a/demos/gtk-demo/textundo.c
+++ b/demos/gtk-demo/textundo.c
@@ -53,7 +53,7 @@ do_textundo (GtkWidget *do_widget)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_window_set_child (GTK_WINDOW (window), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view);
}
diff --git a/demos/gtk-demo/textview.c b/demos/gtk-demo/textview.c
index 0acc03e9e2..68e0b35c20 100644
--- a/demos/gtk-demo/textview.c
+++ b/demos/gtk-demo/textview.c
@@ -486,7 +486,7 @@ do_textview (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Multiple Views");
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (window), vpaned);
+ gtk_window_set_child (GTK_WINDOW (window), vpaned);
/* For convenience, we just use the autocreated buffer from
* the first text view; you could also create the buffer
@@ -594,7 +594,7 @@ easter_egg_callback (GtkWidget *button,
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (window), sw);
+ gtk_window_set_child (GTK_WINDOW (window), sw);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), view);
window_ptr = &window;
diff --git a/demos/gtk-demo/theming_style_classes.c b/demos/gtk-demo/theming_style_classes.c
index f67660678e..db91d92c5c 100644
--- a/demos/gtk-demo/theming_style_classes.c
+++ b/demos/gtk-demo/theming_style_classes.c
@@ -31,7 +31,7 @@ do_theming_style_classes (GtkWidget *do_widget)
builder = gtk_builder_new_from_resource ("/theming_style_classes/theming.ui");
grid = (GtkWidget *)gtk_builder_get_object (builder, "grid");
- gtk_container_add (GTK_CONTAINER (window), grid);
+ gtk_window_set_child (GTK_WINDOW (window), grid);
g_object_unref (builder);
}
diff --git a/demos/gtk-demo/transparent.c b/demos/gtk-demo/transparent.c
index 5422cb14ea..65a7152c11 100644
--- a/demos/gtk-demo/transparent.c
+++ b/demos/gtk-demo/transparent.c
@@ -29,7 +29,7 @@ do_transparent (GtkWidget *do_widget)
gtk_window_set_title (GTK_WINDOW (window), "Transparency");
overlay = blur_overlay_new ();
- gtk_container_add (GTK_CONTAINER (window), overlay);
+ gtk_window_set_child (GTK_WINDOW (window), overlay);
button = gtk_button_new_with_label ("Don't click this button!");
label = gtk_button_get_child (GTK_BUTTON (button));
diff --git a/demos/gtk-demo/tree_store.c b/demos/gtk-demo/tree_store.c
index f404fcc757..f39b409718 100644
--- a/demos/gtk-demo/tree_store.c
+++ b/demos/gtk-demo/tree_store.c
@@ -402,7 +402,7 @@ do_tree_store (GtkWidget *do_widget)
gtk_widget_set_margin_end (vbox, 8);
gtk_widget_set_margin_top (vbox, 8);
gtk_widget_set_margin_bottom (vbox, 8);
- gtk_container_add (GTK_CONTAINER (window), vbox);
+ gtk_window_set_child (GTK_WINDOW (window), vbox);
gtk_container_add (GTK_CONTAINER (vbox),
gtk_label_new ("Jonathan's Holiday Card Planning Sheet"));
diff --git a/demos/gtk-demo/video_player.c b/demos/gtk-demo/video_player.c
index 848c28ab48..6a40204c24 100644
--- a/demos/gtk-demo/video_player.c
+++ b/demos/gtk-demo/video_player.c
@@ -71,7 +71,7 @@ do_video_player (GtkWidget *do_widget)
G_CALLBACK (gtk_widget_destroyed), &window);
video = gtk_video_new ();
- gtk_container_add (GTK_CONTAINER (window), video);
+ gtk_window_set_child (GTK_WINDOW (window), video);
title = gtk_header_bar_new ();
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (title), TRUE);