forked from AuroraMiddleware/gtk
Use gtk_window_set_child throughout
Replace all uses of gtk_container_add on windows by gtk_window_set_child.
This commit is contained in:
parent
b9b1bf85e1
commit
f59f355190
@ -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);
|
||||
|
@ -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");
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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",
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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!)"));
|
||||
|
@ -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.");
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
|
@ -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]));
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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++)
|
||||
{
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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 ();
|
||||
|
@ -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");
|
||||
|
@ -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);
|
||||
|
@ -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++)
|
||||
{
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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"));
|
||||
|
@ -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);
|
||||
|
@ -1126,7 +1126,7 @@ create_headerbar (void)
|
||||
view = gtk_text_view_new ();
|
||||
gtk_widget_show (view);
|
||||
gtk_widget_set_size_request (window, 220, 150);
|
||||
gtk_container_add (GTK_CONTAINER (window), view);
|
||||
gtk_window_set_child (GTK_WINDOW (window), view);
|
||||
bar = gtk_header_bar_new ();
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), bar);
|
||||
button = gtk_button_new ();
|
||||
|
@ -113,7 +113,7 @@ activate (GApplication *app,
|
||||
gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), G_MENU_MODEL (button_menu));
|
||||
gtk_widget_set_halign (GTK_WIDGET (button), GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (GTK_WIDGET (button), GTK_ALIGN_START);
|
||||
gtk_container_add (GTK_CONTAINER (win), button);
|
||||
gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
gtk_widget_show (win);
|
||||
|
||||
g_object_unref (button_menu);
|
||||
|
@ -222,7 +222,7 @@ new_window (GApplication *app,
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Bloatpad");
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
|
||||
toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
button = gtk_toggle_button_new ();
|
||||
|
@ -143,7 +143,7 @@ activate (GtkApplication *app,
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
gtk_window_set_child (GTK_WINDOW (window), frame);
|
||||
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
/* set a minimum size */
|
||||
|
@ -23,7 +23,7 @@ activate (GtkApplication *app,
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
/* Pack the container in the window */
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
|
||||
button = gtk_button_new_with_label ("Button 1");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
|
||||
|
@ -20,7 +20,7 @@ activate (GtkApplication *app,
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
button = gtk_button_new_with_label ("Hello World");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (print_hello), NULL);
|
||||
|
@ -83,7 +83,7 @@ new_window (GApplication *app,
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Plugman");
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
|
@ -15,7 +15,7 @@ activate_cb (GtkApplication *app,
|
||||
|
||||
search_bar = gtk_search_bar_new ();
|
||||
gtk_widget_set_valign (search_bar, GTK_ALIGN_START);
|
||||
gtk_container_add (GTK_CONTAINER (window), search_bar);
|
||||
gtk_window_set_child (GTK_WINDOW (window), search_bar);
|
||||
gtk_widget_show (search_bar);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
|
||||
|
@ -19,7 +19,7 @@ new_window (GApplication *app,
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), overlay);
|
||||
gtk_window_set_child (GTK_WINDOW (window), overlay);
|
||||
|
||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_widget_set_hexpand (scrolled, TRUE);
|
||||
|
@ -122,14 +122,6 @@ gtk_window_accessible_get_name (AtkObject *accessible)
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
|
||||
name = gtk_window_get_title (window);
|
||||
if (name == NULL && accessible->role == ATK_ROLE_TOOL_TIP)
|
||||
{
|
||||
GtkWidget *child;
|
||||
|
||||
child = find_label_child (GTK_CONTAINER (window));
|
||||
if (GTK_IS_LABEL (child))
|
||||
name = gtk_label_get_text (GTK_LABEL (child));
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@
|
||||
* // Pack them into a box, then show all the widgets
|
||||
* gtk_container_add (GTK_CONTAINER (box), radio1);
|
||||
* gtk_container_add (GTK_CONTAINER (box), radio2);
|
||||
* gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window),box);
|
||||
* gtk_widget_show (window);
|
||||
* return;
|
||||
* }
|
||||
|
@ -144,7 +144,7 @@
|
||||
*
|
||||
* // creates the spinbutton, with no decimal places
|
||||
* button = gtk_spin_button_new (adjustment, 1.0, 0);
|
||||
* gtk_container_add (GTK_CONTAINER (window), button);
|
||||
* gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
*
|
||||
* gtk_widget_show (window);
|
||||
* }
|
||||
@ -175,7 +175,7 @@
|
||||
*
|
||||
* // creates the spinbutton, with three decimal places
|
||||
* button = gtk_spin_button_new (adjustment, 0.001, 3);
|
||||
* gtk_container_add (GTK_CONTAINER (window), button);
|
||||
* gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
*
|
||||
* gtk_widget_show (window);
|
||||
* }
|
||||
|
@ -93,7 +93,7 @@
|
||||
* NULL);
|
||||
* gtk_container_add (GTK_CONTAINER (box), toggle2);
|
||||
*
|
||||
* gtk_container_add (GTK_CONTAINER (window), box);
|
||||
* gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
* gtk_widget_show (window);
|
||||
* }
|
||||
* ]|
|
||||
|
@ -203,7 +203,7 @@ gtk_fps_overlay_snapshot (GtkInspectorOverlay *overlay,
|
||||
|
||||
if (GTK_IS_WINDOW (widget))
|
||||
{
|
||||
GtkWidget *child = gtk_bin_get_child (GTK_BIN (widget));
|
||||
GtkWidget *child = gtk_window_get_child (GTK_WINDOW (widget));
|
||||
if (!child ||
|
||||
!gtk_widget_compute_bounds (child, widget, &bounds))
|
||||
has_bounds = gtk_widget_compute_bounds (widget, widget, &bounds);
|
||||
|
@ -137,7 +137,7 @@ preview_file (const char *filename,
|
||||
g_object_ref (widget);
|
||||
if (gtk_widget_get_parent (widget) != NULL)
|
||||
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (widget)), widget);
|
||||
gtk_container_add (GTK_CONTAINER (window), widget);
|
||||
gtk_window_set_child (GTK_WINDOW (window), widget);
|
||||
g_object_unref (widget);
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ main(int argc, char **argv)
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), da);
|
||||
gtk_window_set_child (GTK_WINDOW (window), da);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (quit_cb), NULL);
|
||||
|
@ -60,7 +60,7 @@ main(int argc, char **argv)
|
||||
gtk_revealer_set_reveal_child (GTK_REVEALER (revealer), TRUE);
|
||||
g_signal_connect_after (revealer, "map", G_CALLBACK (toggle_reveal), NULL);
|
||||
g_signal_connect_after (revealer, "notify::child-revealed", G_CALLBACK (toggle_reveal), NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), revealer);
|
||||
gtk_window_set_child (GTK_WINDOW (window), revealer);
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (revealer), grid);
|
||||
|
@ -141,7 +141,7 @@ main (int argc, char *argv[])
|
||||
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);
|
||||
gtk_widget_show (overlay);
|
||||
|
||||
revealer = gtk_revealer_new ();
|
||||
|
@ -192,7 +192,7 @@ main (int argc, char *argv[])
|
||||
|
||||
window = gtk_window_new ();
|
||||
grid = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (window), grid);
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
|
@ -62,7 +62,7 @@ main (int argc, char **argv)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
da = gtk_drawing_area_new ();
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (da), on_draw, NULL, NULL);
|
||||
|
@ -70,7 +70,7 @@ main (int argc, char *argv[])
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
|
@ -132,7 +132,7 @@ main (int argc, char **argv)
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 800, 600);
|
||||
|
||||
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), scrolled_window);
|
||||
gtk_window_set_child (GTK_WINDOW (window), scrolled_window);
|
||||
|
||||
viewport = gtk_viewport_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), viewport);
|
||||
|
@ -218,7 +218,7 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (box), nodeview);
|
||||
gtk_container_add (GTK_CONTAINER (box), image);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
gsk_renderer_unrealize (renderer);
|
||||
g_object_unref (texture);
|
||||
@ -227,7 +227,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
else
|
||||
{
|
||||
gtk_container_add (GTK_CONTAINER (window), nodeview);
|
||||
gtk_window_set_child (GTK_WINDOW (window), nodeview);
|
||||
}
|
||||
|
||||
gsk_render_node_get_bounds (GTK_NODE_VIEW (nodeview)->node, &node_bounds);
|
||||
|
@ -53,7 +53,7 @@ main (int argc, char *argv[])
|
||||
gtk_button_set_label (GTK_BUTTON (button), "hello world");
|
||||
g_signal_connect (button, "clicked", G_CALLBACK (hello), NULL);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), button);
|
||||
gtk_window_set_child (GTK_WINDOW (window), button);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
|
@ -26,7 +26,7 @@ main (int argc, char *argv[])
|
||||
gtk_window_set_default_size (GTK_WINDOW (win), 640, 480);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 5);
|
||||
gtk_container_add (GTK_CONTAINER (win), box);
|
||||
gtk_window_set_child (GTK_WINDOW (win), box);
|
||||
|
||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||
|
@ -74,7 +74,7 @@ key_test (void)
|
||||
gtk_widget_set_hexpand (sw, TRUE);
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_widget_show (box);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
gtk_container_add (GTK_CONTAINER (box), sw);
|
||||
|
||||
store = gtk_list_store_new (3, G_TYPE_INT, G_TYPE_UINT, G_TYPE_UINT);
|
||||
|
@ -89,7 +89,7 @@ open_test_window (void)
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (test_window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (test_window), grid);
|
||||
|
||||
for (i = 0; i < TEST_WIDGET_LAST; ++i)
|
||||
{
|
||||
@ -146,7 +146,7 @@ open_control_window (void)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
toggle =
|
||||
gtk_toggle_button_new_with_label ("Set small size requests");
|
||||
@ -253,7 +253,7 @@ open_alignment_window (void)
|
||||
gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
|
||||
gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (test_window), grid);
|
||||
gtk_window_set_child (GTK_WINDOW (test_window), grid);
|
||||
|
||||
for (i = 0; i < align_class->n_values; ++i)
|
||||
{
|
||||
@ -308,7 +308,7 @@ open_margin_window (void)
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (test_window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (test_window), box);
|
||||
|
||||
for (i = 0; i < (int) G_N_ELEMENTS (margins); ++i)
|
||||
{
|
||||
@ -332,7 +332,7 @@ open_valigned_label_window (void)
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_widget_show (box);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
label = gtk_label_new ("Both labels expand");
|
||||
gtk_widget_show (label);
|
||||
|
@ -719,7 +719,7 @@ main (int argc, gchar *argv[])
|
||||
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (buttons); i++)
|
||||
{
|
||||
|
@ -103,7 +103,7 @@ main (int argc,
|
||||
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
notebook = gtk_notebook_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), notebook);
|
||||
gtk_window_set_child (GTK_WINDOW (window), notebook);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook),
|
||||
|
@ -124,7 +124,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (scale, "value-changed", G_CALLBACK (value_changed_cb2), value_label);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (blur_box), scale);
|
||||
gtk_container_add (GTK_CONTAINER (window), blur_box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), blur_box);
|
||||
|
||||
gtk_widget_show (window);
|
||||
|
||||
|
@ -164,7 +164,7 @@ main (int argc, char **argv)
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (box), top);
|
||||
gtk_container_add (GTK_CONTAINER (box), bottom);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_widget_show (window);
|
||||
|
||||
|
@ -89,7 +89,7 @@ main (int argc, char *argv[])
|
||||
window = gtk_window_new ();
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), test_widget ("1"));
|
||||
|
@ -33,7 +33,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
|
@ -209,7 +209,7 @@ main (int argc, char **argv)
|
||||
gtk_window_set_title (GTK_WINDOW (window), "cairo: Knockout Groups");
|
||||
|
||||
darea = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), darea);
|
||||
gtk_window_set_child (GTK_WINDOW (window), darea);
|
||||
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (darea), on_draw, NULL, NULL);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
@ -303,7 +303,7 @@ create_calendar(void)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
||||
gtk_container_add (GTK_CONTAINER (vbox), bbox);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
gtk_window_set_default_widget (GTK_WINDOW (window), button);
|
||||
|
||||
|
@ -252,7 +252,7 @@ simple_cell_area (void)
|
||||
g_signal_connect (G_OBJECT (widget), "toggled",
|
||||
G_CALLBACK (expand_cell_3_toggled), iconview);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
@ -462,7 +462,7 @@ focus_cell_area (void)
|
||||
g_signal_connect (G_OBJECT (widget), "toggled",
|
||||
G_CALLBACK (focus_sibling_toggled), iconview);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), hbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
|
||||
gtk_widget_show (window);
|
||||
}
|
||||
@ -517,7 +517,7 @@ background_area (void)
|
||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 4);
|
||||
gtk_widget_show (hbox);
|
||||
gtk_widget_show (main_vbox);
|
||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), main_vbox);
|
||||
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Background Area");
|
||||
|
||||
|
@ -273,7 +273,7 @@ main (int argc, char **argv)
|
||||
G_CALLBACK (quit_cb), &done);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), vbox);
|
||||
|
||||
/* LTR */
|
||||
|
||||
|
@ -26,7 +26,7 @@ main (int argc, char *argv[])
|
||||
|
||||
window = gtk_window_new ();
|
||||
box = gtk_center_box_new ();
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
|
||||
child = gtk_label_new ("Start Start Start Start Start");
|
||||
gtk_label_set_ellipsize (GTK_LABEL (child), PANGO_ELLIPSIZE_END);
|
||||
|
@ -448,7 +448,7 @@ main (int argc, char **argv)
|
||||
|
||||
window = gtk_window_new ();
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
gtk_container_add (GTK_CONTAINER (window),
|
||||
gtk_window_set_child (GTK_WINDOW (window),
|
||||
get_window_contents (gtk_widget_get_display (window),
|
||||
alt_display));
|
||||
|
||||
|
@ -954,7 +954,7 @@ main (int argc, char **argv)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (quit_cb), &done);
|
||||
|
||||
mainbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
gtk_container_add (GTK_CONTAINER (window), mainbox);
|
||||
gtk_window_set_child (GTK_WINDOW (window), mainbox);
|
||||
|
||||
/* GtkCellView */
|
||||
tmp = gtk_frame_new ("GtkCellView");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user