Remove gtk_widget_show_all

This commit is contained in:
Timm Bäder 2017-01-19 10:02:04 +01:00
parent 13b001b77c
commit ea897c6df4
225 changed files with 307 additions and 450 deletions

View File

@ -105,7 +105,6 @@ create_page1 (GtkWidget *assistant)
g_signal_connect (G_OBJECT (entry), "changed",
G_CALLBACK (on_entry_changed), assistant);
gtk_widget_show_all (box);
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 1");
gtk_assistant_set_page_type (GTK_ASSISTANT (assistant), box, GTK_ASSISTANT_PAGE_INTRO);
@ -122,7 +121,6 @@ create_page2 (GtkWidget *assistant)
"even if you do not check this");
gtk_box_pack_start (GTK_BOX (box), checkbutton, FALSE, FALSE);
gtk_widget_show_all (box);
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
gtk_assistant_set_page_title (GTK_ASSISTANT (assistant), box, "Page 2");

View File

@ -116,7 +116,7 @@ do_builder (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -131,7 +131,7 @@ do_button_box (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -123,7 +123,7 @@ query_for_toplevel (GdkScreen *screen,
g_object_set (label, "margin", 10, NULL);
gtk_container_add (GTK_CONTAINER (frame), label);
gtk_widget_show_all (popup);
gtk_widget_show (popup);
cursor = gdk_cursor_new_from_name (display, "crosshair");
device = gtk_get_current_event_device ();
@ -224,7 +224,6 @@ open_display_cb (GtkWidget *button,
gtk_container_add (GTK_CONTAINER (content_area), display_entry);
gtk_widget_grab_focus (display_entry);
gtk_widget_show_all (gtk_bin_get_child (GTK_BIN (dialog)));
while (!result)
{
@ -547,7 +546,7 @@ do_changedisplay (GtkWidget *do_widget)
initialize_displays (info);
gtk_widget_show_all (info->window);
gtk_widget_show (info->window);
return info->window;
}
else

View File

@ -323,7 +323,7 @@ do_clipboard (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -53,7 +53,7 @@ change_color_callback (GtkWidget *button,
g_signal_connect (dialog, "response",
G_CALLBACK (response_cb), NULL);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
GtkWidget *
@ -107,7 +107,7 @@ do_colorsel (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -433,7 +433,7 @@ do_combobox (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -61,7 +61,7 @@ do_css_accordion (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -110,7 +110,7 @@ do_css_basics (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -138,7 +138,7 @@ do_css_blendmodes (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -157,7 +157,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -116,7 +116,7 @@ do_css_pixbufs (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -138,7 +138,7 @@ do_css_shadows (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -152,7 +152,7 @@ do_cursors (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -80,7 +80,6 @@ interactive_dialog_clicked (GtkButton *button,
gtk_grid_attach (GTK_GRID (table), local_entry2, 1, 1, 1, 1);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), local_entry2);
gtk_widget_show_all (hbox);
response = gtk_dialog_run (GTK_DIALOG (dialog));
if (response == GTK_RESPONSE_OK)
@ -163,7 +162,7 @@ do_dialog (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -277,7 +277,7 @@ do_drawingarea (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -403,7 +403,7 @@ do_editable_cells (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -52,7 +52,7 @@ do_entry_buffer (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -83,7 +83,7 @@ do_entry_completion (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -654,7 +654,7 @@ do_event_axes (GtkWidget *toplevel)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -86,7 +86,6 @@ do_expander (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (sw), tv);
gtk_container_add (GTK_CONTAINER (expander), sw);
gtk_box_pack_end (GTK_BOX (area), expander, TRUE, TRUE);
gtk_widget_show_all (expander);
g_signal_connect (expander, "notify::expanded",
G_CALLBACK (expander_cb), window);
@ -94,7 +93,7 @@ do_expander (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -198,7 +198,7 @@ do_filtermodel (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -38,7 +38,6 @@ color_swatch_new (const gchar *color)
gtk_drawing_area_set_content_height (GTK_DRAWING_AREA (area), 24);
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (area), draw_color, (gpointer) color, NULL);
gtk_container_add (GTK_CONTAINER (button), area);
gtk_widget_show_all (button);
return button;
}
@ -741,8 +740,6 @@ do_flowbox (GtkWidget *do_widget)
for (i = 0; colors[i]; i++)
gtk_container_add (GTK_CONTAINER (flowbox), color_swatch_new (colors[i]));
gtk_widget_show_all (scrolled);
}
if (!gtk_widget_get_visible (window))

View File

@ -977,7 +977,7 @@ do_foreigndrawing (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -184,7 +184,7 @@ do_gestures (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -436,7 +436,7 @@ do_glarea (GtkWidget *do_widget)
demo_window = create_glarea_window (do_widget);
if (!gtk_widget_get_visible (demo_window))
gtk_widget_show_all (demo_window);
gtk_widget_show (demo_window);
else
gtk_widget_destroy (demo_window);

View File

@ -58,7 +58,7 @@ do_headerbar (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -289,8 +289,6 @@ do_hypertext (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (sw), view);
show_page (buffer, 1);
gtk_widget_show_all (sw);
}
if (!gtk_widget_get_visible (window))

View File

@ -326,7 +326,7 @@ do_iconview (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -150,7 +150,7 @@ do_iconview_edit (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -434,7 +434,7 @@ do_images (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -34,7 +34,7 @@ on_bar_response (GtkInfoBar *info_bar,
G_CALLBACK (gtk_widget_destroy),
dialog);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
GtkWidget *
@ -140,12 +140,11 @@ do_infobar (GtkWidget *do_widget)
label = gtk_label_new ("An example of different info bars");
gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE);
gtk_widget_show_all (actions);
gtk_box_pack_start (GTK_BOX (vbox2), actions, FALSE, FALSE);
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -301,7 +301,7 @@ do_list_store (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
gtk_widget_show (window);
if (timeout == 0) {
/* FIXME this should use the animation-duration instead */
timeout = g_timeout_add (80, spinner_timeout, NULL);

View File

@ -370,8 +370,6 @@ do_listbox (GtkWidget *do_widget)
gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (listbox), FALSE);
g_signal_connect (listbox, "row-activated", G_CALLBACK (row_activated), NULL);
gtk_widget_show_all (vbox);
data = g_resources_lookup_data ("/listbox/messages.txt", 0, NULL);
lines = g_strsplit (g_bytes_get_data (data, NULL), "\n", 0);

View File

@ -592,7 +592,6 @@ add_data_tab (const gchar *demoname)
g_bytes_unref (bytes);
}
gtk_widget_show_all (widget);
label = gtk_label_new (resources[i]);
gtk_widget_show (label);
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
@ -1022,8 +1021,6 @@ activate (GApplication *app)
g_signal_connect (item, "activate", G_CALLBACK (end_cb), scrollbar);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show_all (menu);
g_signal_connect (scrollbar, "popup-menu", G_CALLBACK (scrollbar_popup), menu);
load_file (gtk_demos[0].name, gtk_demos[0].filename);
@ -1040,7 +1037,7 @@ activate (GApplication *app)
gtk_tree_view_collapse_all (GTK_TREE_VIEW (treeview));
gtk_widget_show_all (GTK_WIDGET (window));
gtk_widget_show (GTK_WIDGET (window));
g_object_unref (builder);
}

View File

@ -70,7 +70,6 @@ do_markup (GtkWidget *do_widget)
header = gtk_header_bar_new ();
gtk_header_bar_set_show_close_button (GTK_HEADER_BAR (header), TRUE);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
gtk_widget_show_all (header);
gtk_window_set_titlebar (GTK_WINDOW (window), header);
gtk_window_set_title (GTK_WINDOW (window), "Markup");
@ -86,7 +85,6 @@ do_markup (GtkWidget *do_widget)
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show_all (sw);
gtk_stack_add_named (GTK_STACK (stack), sw, "formatted");
@ -100,7 +98,6 @@ do_markup (GtkWidget *do_widget)
GTK_POLICY_AUTOMATIC,
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (sw), view2);
gtk_widget_show_all (sw);
gtk_stack_add_named (GTK_STACK (stack), sw, "source");

View File

@ -59,7 +59,7 @@ do_modelbutton (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -76,8 +76,6 @@ do_overlay (GtkWidget *do_widget)
g_signal_connect (window, "destroy",
G_CALLBACK (gtk_widget_destroyed), &window);
gtk_widget_show_all (overlay);
}
if (!gtk_widget_get_visible (window))

View File

@ -92,8 +92,6 @@ do_overlay2 (GtkWidget *do_widget)
gtk_widget_set_tooltip_text (scale, "Margin");
gtk_adjustment_set_value (adjustment, 100);
gtk_widget_show_all (overlay);
}
if (!gtk_widget_get_visible (window))

View File

@ -186,8 +186,6 @@ do_panes (GtkWidget *do_widget)
"Top",
"Bottom"),
FALSE, FALSE);
gtk_widget_show_all (vbox);
}
if (!gtk_widget_get_visible (window))

View File

@ -73,7 +73,7 @@ do_pickers (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -219,7 +219,7 @@ do_pixbufs (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
{
gtk_widget_destroy (window);

View File

@ -167,7 +167,7 @@ do_popover (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -82,7 +82,7 @@ do_revealer (GtkWidget *do_widget)
{
count = 0;
timeout = g_timeout_add (690, reveal_one, window);
gtk_widget_show_all (window);
gtk_widget_show (window);
}
else
{

View File

@ -217,7 +217,7 @@ do_rotated_text (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -29,7 +29,7 @@ do_scale (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -145,8 +145,6 @@ create_search_menu (GtkWidget *entry)
G_CALLBACK (search_by_file), entry);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show_all (menu);
return menu;
}
@ -290,7 +288,7 @@ do_search_entry (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
{
gtk_widget_destroy (menu);

View File

@ -152,7 +152,7 @@ do_search_entry2 (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -106,7 +106,7 @@ do_shortcuts (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -80,7 +80,7 @@ do_sidebar (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -150,7 +150,7 @@ do_sizegroup (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -245,7 +245,7 @@ do_spinbutton (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -88,7 +88,7 @@ do_spinner (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -29,7 +29,7 @@ do_stack (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -48,8 +48,6 @@ do_tabs (GtkWidget *do_widget)
GTK_POLICY_AUTOMATIC);
gtk_container_add (GTK_CONTAINER (window), sw);
gtk_container_add (GTK_CONTAINER (sw), view);
gtk_widget_show_all (sw);
}
if (!gtk_widget_get_visible (window))

View File

@ -74,7 +74,7 @@ do_textmask (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -195,7 +195,7 @@ do_textscroll (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -452,8 +452,6 @@ attach_widgets (GtkTextView *text_view)
widget,
anchor);
gtk_widget_show_all (widget);
++i;
}
}
@ -515,8 +513,6 @@ do_textview (GtkWidget *do_widget)
attach_widgets (GTK_TEXT_VIEW (view1));
attach_widgets (GTK_TEXT_VIEW (view2));
gtk_widget_show_all (vpaned);
}
if (!gtk_widget_get_visible (window))
@ -601,5 +597,5 @@ easter_egg_callback (GtkWidget *button,
gtk_window_set_default_size (GTK_WINDOW (window), 300, 400);
gtk_widget_show_all (window);
gtk_widget_show (window);
}

View File

@ -31,7 +31,6 @@ 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_widget_show_all (grid);
gtk_container_add (GTK_CONTAINER (window), grid);
g_object_unref (builder);
}

View File

@ -535,8 +535,6 @@ do_toolpalette (GtkWidget *do_widget)
gtk_container_add (GTK_CONTAINER (palette_scroller), palette);
gtk_container_add (GTK_CONTAINER (hbox), palette_scroller);
gtk_widget_show_all (box);
/* Connect signals: */
g_signal_connect (combo_orientation, "changed",
G_CALLBACK (on_combo_orientation_changed), palette);
@ -620,7 +618,7 @@ do_toolpalette (GtkWidget *do_widget)
if (!gtk_widget_get_visible (window))
{
gtk_widget_show_all (window);
gtk_widget_show (window);
}
else
{

View File

@ -229,7 +229,7 @@ do_transparent (GtkWidget *do_widget)
gtk_widget_set_halign (entry, GTK_ALIGN_CENTER);
gtk_widget_set_valign (entry, GTK_ALIGN_START);
gtk_widget_show_all (overlay);
gtk_widget_show (overlay);
}
if (!gtk_widget_get_visible (window))

View File

@ -433,7 +433,7 @@ do_tree_store (GtkWidget *do_widget)
}
if (!gtk_widget_get_visible (window))
gtk_widget_show_all (window);
gtk_widget_show (window);
else
gtk_widget_destroy (window);

View File

@ -816,7 +816,6 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), swatch);
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE);
gtk_widget_show_all (row);
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
row = gtk_widget_get_parent (row);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
@ -927,7 +926,6 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_container_add (GTK_CONTAINER (box), swatch);
gtk_box_pack_start (GTK_BOX (row), box, FALSE, FALSE);
gtk_widget_show_all (row);
gtk_list_box_insert (GTK_LIST_BOX (widget), row, -1);
row = gtk_widget_get_parent (row);
gtk_list_box_row_set_activatable (GTK_LIST_BOX_ROW (row), FALSE);
@ -1893,7 +1891,7 @@ activate (GApplication *app)
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget);
g_signal_connect (adj, "value-changed", G_CALLBACK (adjustment3_value_changed), widget2);
gtk_widget_show_all (GTK_WIDGET (window));
gtk_widget_show (GTK_WIDGET (window));
g_object_unref (builder);
}

View File

@ -4496,7 +4496,6 @@ gtk_widget_unparent
gtk_widget_show
gtk_widget_show_now
gtk_widget_hide
gtk_widget_show_all
gtk_widget_map
gtk_widget_unmap
gtk_widget_realize

View File

@ -37,7 +37,7 @@ new_widget_info (const char *name,
{
info->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
info->include_decorations = FALSE;
gtk_widget_show_all (widget);
gtk_widget_show (widget);
gtk_container_add (GTK_CONTAINER (info->window), widget);
}
info->no_focus = TRUE;
@ -1262,7 +1262,6 @@ create_headerbar (void)
button = gtk_button_new ();
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("bookmark-new-symbolic", GTK_ICON_SIZE_BUTTON));
gtk_header_bar_pack_end (GTK_HEADER_BAR (bar), button);
gtk_widget_show_all (bar);
return new_widget_info ("headerbar", window, ASIS);
}

View File

@ -18,7 +18,7 @@ action_activated (GSimpleAction *action,
g_signal_connect_swapped (dialog, "response",
G_CALLBACK (gtk_widget_destroy), dialog);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static GActionEntry doc_entries[] = {
@ -114,7 +114,7 @@ activate (GApplication *app,
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_widget_show_all (win);
gtk_widget_show (win);
g_object_unref (button_menu);
g_object_unref (doc_actions);

View File

@ -293,7 +293,7 @@ new_window (GApplication *app,
G_CALLBACK (text_buffer_changed_cb), window);
text_buffer_changed_cb (gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)), window);
gtk_widget_show_all (GTK_WIDGET (window));
gtk_widget_show (GTK_WIDGET (window));
}
static void
@ -430,7 +430,7 @@ edit_accels (GSimpleAction *action,
g_object_set_data (G_OBJECT (dialog), "combo", combo);
g_object_set_data (G_OBJECT (dialog), "entry", entry);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static gboolean

View File

@ -172,7 +172,7 @@ activate (GtkApplication *app,
| GDK_BUTTON_PRESS_MASK
| GDK_POINTER_MOTION_MASK);
gtk_widget_show_all (window);
gtk_widget_show (window);
}
int

View File

@ -49,12 +49,7 @@ activate (GtkApplication *app,
*/
gtk_grid_attach (GTK_GRID (grid), button, 0, 1, 2, 1);
/* Now that we are done packing our widgets, we show them all
* in one go, by calling gtk_widget_show_all() on the window.
* This call recursively calls gtk_widget_show() on all widgets
* that are contained in the window, directly or indirectly.
*/
gtk_widget_show_all (window);
gtk_widget_show (window);
}

View File

@ -27,7 +27,7 @@ activate (GtkApplication *app,
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
gtk_container_add (GTK_CONTAINER (button_box), button);
gtk_widget_show_all (window);
gtk_widget_show (window);
}
int

View File

@ -117,7 +117,7 @@ new_window (GApplication *app,
}
}
gtk_widget_show_all (GTK_WIDGET (window));
gtk_widget_show (GTK_WIDGET (window));
}
static void

View File

@ -46,7 +46,7 @@ new_window (GApplication *app,
}
}
gtk_widget_show_all (GTK_WIDGET (window));
gtk_widget_show (GTK_WIDGET (window));
}
static void

View File

@ -9,7 +9,7 @@ activate (GtkApplication* app,
window = gtk_application_window_new (app);
gtk_window_set_title (GTK_WINDOW (window), "Window");
gtk_window_set_default_size (GTK_WINDOW (window), 200, 200);
gtk_widget_show_all (window);
gtk_widget_show (window);
}
int

View File

@ -266,7 +266,6 @@ gtk_application_window_update_menubar (GtkApplicationWindow *window)
window->priv->menubar = gtk_menu_bar_new_from_model (G_MENU_MODEL (combined));
gtk_widget_set_parent (window->priv->menubar, GTK_WIDGET (window));
gtk_widget_show_all (window->priv->menubar);
g_object_unref (combined);
gtk_widget_queue_resize (GTK_WIDGET (window));

View File

@ -489,7 +489,6 @@ gtk_cell_renderer_accel_start_editing (GtkCellRenderer *cell,
gtk_container_add (GTK_CONTAINER (eventbox), label);
gtk_widget_show_all (eventbox);
gtk_grab_add (eventbox);
return GTK_CELL_EDITABLE (eventbox);

View File

@ -414,8 +414,6 @@ add_palette (GtkColorChooserWidget *cc,
gtk_grid_attach (GTK_GRID (grid), p, line, pos, 1, 1);
}
}
gtk_widget_show_all (grid);
}
static void
@ -595,9 +593,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
if (selected)
gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (cc), &color);
gtk_widget_show_all (GTK_WIDGET (cc));
gtk_widget_hide (GTK_WIDGET (cc->priv->editor));
gtk_widget_hide (GTK_WIDGET (cc));
gtk_widget_set_no_show_all (cc->priv->palette, TRUE);
gtk_widget_set_no_show_all (cc->priv->editor, TRUE);

View File

@ -376,7 +376,6 @@ do_popup (GtkColorSwatch *swatch)
g_signal_connect_swapped (item, "clicked",
G_CALLBACK (emit_customize), swatch);
gtk_container_add (GTK_CONTAINER (box), item);
gtk_widget_show_all (box);
}
gtk_popover_popup (GTK_POPOVER (swatch->priv->popover));

View File

@ -126,7 +126,7 @@
* // Add the label, and show everything weve added
*
* gtk_container_add (GTK_CONTAINER (content_area), label);
* gtk_widget_show_all (dialog);
* gtk_widget_show (dialog);
* }
* ]|
*

View File

@ -1636,7 +1636,7 @@ gtk_entry_completion_popup (GtkEntryCompletion *completion)
completion->priv->ignore_enter = TRUE;
gtk_widget_show_all (completion->priv->vbox);
gtk_widget_show (completion->priv->vbox);
/* default on no match */
completion->priv->current_selected = -1;

View File

@ -541,7 +541,6 @@ setup_save_entry (GtkFileChooserDialog *dialog)
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_container_add (GTK_CONTAINER (box), label);
gtk_container_add (GTK_CONTAINER (box), entry);
gtk_widget_show_all (box);
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (header), box);
gtk_file_chooser_widget_set_save_entry (GTK_FILE_CHOOSER_WIDGET (dialog->priv->widget), entry);

View File

@ -8726,7 +8726,6 @@ gtk_file_chooser_widget_add_choice (GtkFileChooser *chooser,
widget = check;
}
gtk_widget_show_all (widget);
gtk_container_add (GTK_CONTAINER (priv->choice_box), widget);
}

View File

@ -379,7 +379,6 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
image = gtk_image_new ();
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);
gtk_widget_show_all (button);
accessible = gtk_widget_get_accessible (button);
if (GTK_IS_ACCESSIBLE (accessible))
atk_object_set_name (accessible, _("Application menu"));
@ -399,7 +398,6 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);
gtk_widget_show_all (button);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_window_iconify), window);
accessible = gtk_widget_get_accessible (button);
@ -422,7 +420,6 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);
gtk_widget_show_all (button);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (_gtk_window_toggle_maximized), window);
accessible = gtk_widget_get_accessible (button);
@ -440,7 +437,6 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);
gtk_widget_show_all (button);
g_signal_connect_swapped (button, "clicked",
G_CALLBACK (gtk_window_close), window);
accessible = gtk_widget_get_accessible (button);

View File

@ -103,7 +103,7 @@ struct _GtkListBoxRow
/**
* GtkListBoxRowClass:
* @parent_class: The parent class.
* @activate:
* @activate:
*/
struct _GtkListBoxRowClass
{
@ -177,11 +177,6 @@ typedef void (*GtkListBoxUpdateHeaderFunc) (GtkListBoxRow *row,
* Called for list boxes that are bound to a #GListModel with
* gtk_list_box_bind_model() for each item that gets added to the model.
*
* Versions of GTK+ prior to 3.18 called gtk_widget_show_all() on the rows
* created by the GtkListBoxCreateWidgetFunc, but this forced all widgets
* inside the row to be shown, and is no longer the case. Applications should
* be updated to show the desired row widgets.
*
* Returns: (transfer full): a #GtkWidget that represents @item
*
* Since: 3.16

View File

@ -74,7 +74,7 @@
* ...
*
* // Show the application window
* gtk_widget_show_all (mainwin);
* gtk_widget_show (mainwin);
*
* // Enter the main event loop, and wait for user interaction
* gtk_main ();
@ -1653,7 +1653,7 @@ gtk_main_do_event (GdkEvent *event)
* win);
* gtk_container_add (GTK_CONTAINER (win), but);
*
* gtk_widget_show_all (win);
* gtk_widget_show (win);
*
* gtk_main ();
*

View File

@ -834,7 +834,7 @@ gtk_menu_button_set_menu_model (GtkMenuButton *menu_button,
GtkWidget *menu;
menu = gtk_menu_new_from_model (menu_model);
gtk_widget_show_all (menu);
gtk_widget_show (menu);
gtk_menu_button_set_popup (menu_button, menu);
}
}

View File

@ -533,8 +533,6 @@ gtk_menu_section_box_new_section (GtkMenuTrackerItem *item,
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_set_valign (separator, GTK_ALIGN_CENTER);
gtk_box_pack_start (GTK_BOX (box->separator), separator, TRUE, TRUE);
gtk_widget_show_all (box->separator);
}
else
{

View File

@ -167,7 +167,6 @@ gtk_menu_tool_button_construct_contents (GtkMenuToolButton *button)
priv->box = box;
gtk_container_add (GTK_CONTAINER (button), priv->box);
gtk_widget_show_all (priv->box);
gtk_widget_queue_resize (GTK_WIDGET (button));
}
@ -292,8 +291,6 @@ gtk_menu_tool_button_init (GtkMenuToolButton *button)
/* the arrow button is insentive until we set a menu */
gtk_widget_set_sensitive (arrow_button, FALSE);
gtk_widget_show_all (box);
gtk_container_add (GTK_CONTAINER (button), box);
gtk_menu_button_set_align_widget (GTK_MENU_BUTTON (arrow_button),
GTK_WIDGET (button));

View File

@ -724,7 +724,7 @@ gtk_mount_operation_ask_password_do_gtk (GtkMountOperation *operation,
else if (priv->screen)
gtk_window_set_screen (GTK_WINDOW (dialog), priv->screen);
gtk_widget_show_all (GTK_WIDGET (dialog));
gtk_widget_show (GTK_WIDGET (dialog));
g_object_ref (operation);
}
@ -1270,7 +1270,7 @@ on_end_process_activated (GtkMenuItem *item,
"%s",
error->message);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
response = gtk_dialog_run (GTK_DIALOG (dialog));
/* GTK_RESPONSE_NONE means the dialog were programmatically destroy, e.g. that
@ -1304,7 +1304,7 @@ do_popup_menu_for_process_tree_view (GtkWidget *widget,
G_CALLBACK (on_end_process_activated),
op);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
gtk_widget_show_all (menu);
gtk_widget_show (menu);
if (event && gdk_event_triggers_context_menu (event))
{
@ -1591,7 +1591,7 @@ gtk_mount_operation_show_processes_do_gtk (GtkMountOperation *op,
if (dialog != NULL)
{
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
}

View File

@ -702,7 +702,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (path_bar->priv->up_slider_button, &child_allocation);
gtk_widget_set_child_visible (path_bar->priv->up_slider_button, TRUE);
gtk_widget_show_all (path_bar->priv->up_slider_button);
gtk_widget_show (path_bar->priv->up_slider_button);
if (direction == GTK_TEXT_DIR_LTR)
down_slider_offset += path_bar->priv->slider_width;
@ -720,7 +720,7 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (path_bar->priv->down_slider_button, &child_allocation);
gtk_widget_set_child_visible (path_bar->priv->down_slider_button, TRUE);
gtk_widget_show_all (path_bar->priv->down_slider_button);
gtk_widget_show (path_bar->priv->down_slider_button);
gtk_path_bar_update_slider_buttons (path_bar);
}
else
@ -1494,7 +1494,6 @@ make_directory_button (GtkPathBar *path_bar,
button_data->file_is_hidden = file_is_hidden;
gtk_container_add (GTK_CONTAINER (button_data->button), child);
gtk_widget_show_all (button_data->button);
gtk_path_bar_update_button_appearance (path_bar, button_data, current_dir);

View File

@ -473,7 +473,6 @@ add_place (GtkPlacesSidebar *sidebar,
G_CALLBACK (on_button_release_event), row);
gtk_container_add (GTK_CONTAINER (sidebar->list_box), GTK_WIDGET (row));
gtk_widget_show_all (row);
return row;
}
@ -1334,7 +1333,7 @@ update_places (GtkPlacesSidebar *sidebar)
g_object_unref (icon);
}
gtk_widget_show_all (GTK_WIDGET (sidebar));
gtk_widget_show (GTK_WIDGET (sidebar));
/* We want this hidden by default, but need to do it after the show_all call */
gtk_sidebar_row_hide (GTK_SIDEBAR_ROW (sidebar->new_bookmark_row), TRUE);
@ -1575,7 +1574,7 @@ drag_begin_callback (GtkWidget *widget,
gtk_widget_set_size_request (window, allocation.width, allocation.height);
gtk_container_add (GTK_CONTAINER (window), drag_widget);
gtk_widget_show_all (window);
gtk_widget_show (window);
gtk_widget_set_opacity (window, 0.8);
gtk_drag_set_icon_widget (context,
@ -2506,7 +2505,6 @@ create_rename_popover (GtkPlacesSidebar *sidebar)
gtk_grid_attach (GTK_GRID (grid), entry, 0, 1, 1, 1);
gtk_grid_attach (GTK_GRID (grid), button,1, 1, 1, 1);
gtk_grid_attach (GTK_GRID (grid), error, 0, 2, 2, 1);
gtk_widget_show_all (grid);
gtk_popover_set_default_widget (GTK_POPOVER (popover), button);
sidebar->rename_popover = popover;

View File

@ -613,8 +613,6 @@ populate_servers (GtkPlacesView *view)
G_CALLBACK (on_remove_server_button_clicked),
data);
gtk_widget_show_all (row);
g_free (name);
}
@ -886,14 +884,14 @@ update_network_state (GtkPlacesView *view)
* otherwise just show the spinner in the header */
if (!has_networks (view))
{
gtk_widget_show_all (priv->network_placeholder);
gtk_widget_show (priv->network_placeholder);
gtk_label_set_text (GTK_LABEL (priv->network_placeholder_label),
_("Searching for network locations"));
}
}
else if (!has_networks (view))
{
gtk_widget_show_all (priv->network_placeholder);
gtk_widget_show (priv->network_placeholder);
gtk_label_set_text (GTK_LABEL (priv->network_placeholder_label),
_("No network locations found"));
}
@ -2037,7 +2035,6 @@ listbox_header_func (GtkListBoxRow *row,
}
gtk_container_add (GTK_CONTAINER (header), separator);
gtk_widget_show_all (header);
gtk_list_box_row_set_header (row, header);

View File

@ -852,7 +852,7 @@ request_password (GtkPrintBackend *backend,
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (password_dialog_response), backend);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
void

View File

@ -117,7 +117,7 @@
* gtk_box_pack_start (GTK_BOX (box), radio1, TRUE, TRUE, 2);
* gtk_box_pack_start (GTK_BOX (box), radio2, TRUE, TRUE, 2);
* gtk_container_add (GTK_CONTAINER (window), box);
* gtk_widget_show_all (window);
* gtk_widget_show (window);
* return;
* }
* ]|

View File

@ -828,7 +828,6 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
item = gtk_menu_item_new ();
gtk_container_add (GTK_CONTAINER (box), label);
gtk_widget_show_all (box);
gtk_container_add (GTK_CONTAINER (item), box);
g_signal_connect (item, "activate",

View File

@ -261,7 +261,7 @@ on_child_revealed (GObject *self,
void
gtk_sidebar_row_reveal (GtkSidebarRow *self)
{
gtk_widget_show_all (GTK_WIDGET (self));
gtk_widget_show (GTK_WIDGET (self));
gtk_revealer_set_reveal_child (GTK_REVEALER (self->revealer), TRUE);
}

View File

@ -139,7 +139,7 @@
* button = gtk_spin_button_new (adjustment, 1.0, 0);
* gtk_container_add (GTK_CONTAINER (window), button);
*
* gtk_widget_show_all (window);
* gtk_widget_show (window);
* }
* ]|
*
@ -170,7 +170,7 @@
* button = gtk_spin_button_new (adjustment, 0.001, 3);
* gtk_container_add (GTK_CONTAINER (window), button);
*
* gtk_widget_show_all (window);
* gtk_widget_show (window);
* }
* ]|
*/

View File

@ -154,7 +154,6 @@ rebuild_child (GtkWidget *self,
if (button_child)
{
gtk_widget_set_halign (GTK_WIDGET (button_child), GTK_ALIGN_CENTER);
gtk_widget_show_all (button_child);
gtk_container_add (GTK_CONTAINER (self), button_child);
}
}

View File

@ -96,7 +96,7 @@
* gtk_box_pack_start (GTK_BOX (content_area),
* toggle2, FALSE, FALSE, 2);
*
* gtk_widget_show_all (dialog);
* gtk_widget_show (dialog);
* }
* ]|
*/

View File

@ -2473,7 +2473,7 @@ show_menu (GtkToolbar *toolbar,
rebuild_menu (toolbar);
gtk_widget_show_all (GTK_WIDGET (priv->menu));
gtk_widget_show (GTK_WIDGET (priv->menu));
switch (priv->orientation)
{

View File

@ -406,7 +406,6 @@ gtk_tool_item_group_init (GtkToolItemGroup *group)
frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_container_add (GTK_CONTAINER (frame), priv->label_widget);
gtk_widget_show_all (frame);
priv->header = gtk_button_new ();
g_object_ref_sink (priv->header);

Some files were not shown because too many files have changed in this diff Show More