general: Drop uses of gtk_widget_show_all()

Widgets are visible by default since GTK+ 4, aside from the function
being removed from GTK+ altogether. Additionally, this replaces calls to
gtk_widget_set_no_show_all() with gtk_widget_hide().
This commit is contained in:
Ernestas Kulik 2018-07-05 12:01:09 +03:00
parent 28a0cfea91
commit 3fd1923db9
19 changed files with 9 additions and 42 deletions

View file

@ -128,8 +128,6 @@ nautilus_image_properties_page_init (NautilusImagesPropertiesPage *self)
gtk_grid_set_column_spacing (GTK_GRID (self->grid), 18);
append_item (self, _("Loading…"), NULL);
gtk_container_add (GTK_CONTAINER (scrolled_window), self->grid);
gtk_widget_show_all (GTK_WIDGET (self));
}
static void

View file

@ -254,8 +254,6 @@ present_autorun_for_software_dialog (GMount *mount)
_("_Run"),
GTK_RESPONSE_OK);
gtk_widget_show_all (dialog);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
{
gtk_widget_destroy (dialog);

View file

@ -595,7 +595,6 @@ create_original_name_row_for_label (NautilusBatchRenameDialog *dialog,
dialog->listbox_labels_old = g_list_prepend (dialog->listbox_labels_old, label_old);
gtk_container_add (GTK_CONTAINER (row), label_old);
gtk_widget_show_all (row);
return row;
}
@ -621,7 +620,6 @@ create_result_row_for_label (NautilusBatchRenameDialog *dialog,
dialog->listbox_labels_new = g_list_prepend (dialog->listbox_labels_new, label_new);
gtk_container_add (GTK_CONTAINER (row), label_new);
gtk_widget_show_all (row);
return row;
}
@ -653,7 +651,6 @@ create_arrow_row_for_label (NautilusBatchRenameDialog *dialog,
dialog->listbox_icons = g_list_prepend (dialog->listbox_icons, icon);
gtk_container_add (GTK_CONTAINER (row), icon);
gtk_widget_show_all (row);
return row;
}

View file

@ -437,8 +437,6 @@ add_buttons (NautilusColumnChooser *chooser)
"clicked", G_CALLBACK (use_default_clicked_callback),
chooser);
gtk_container_add (GTK_CONTAINER (box), chooser->use_default_button);
gtk_widget_show_all (inline_toolbar);
}
static void

View file

@ -310,7 +310,7 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
gtk_entry_set_text (GTK_ENTRY (name_entry), initial_name);
}
gtk_widget_show_all (compress_dialog);
gtk_widget_show (compress_dialog);
return self;
}

View file

@ -316,8 +316,6 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
g_signal_connect (widget, "clicked",
G_CALLBACK (reset_button_clicked_cb), dialog);
gtk_widget_show_all (vbox2);
/* Setup the checkbox to apply the action to all files */
widget = gtk_check_button_new_with_mnemonic (_("Apply this action to all files and folders"));
@ -347,8 +345,6 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
g_object_set (dialog, "margin", 5, NULL);
gtk_box_set_spacing (GTK_BOX (gtk_dialog_get_content_area (dialog)), 14);
gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
gtk_widget_show_all (dialog_area);
}
static void

View file

@ -1779,13 +1779,12 @@ select_pattern (NautilusFilesView *view)
GTK_POS_BOTTOM, 1, 1);
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_show_all (grid);
gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid);
g_object_set_data (G_OBJECT (dialog), "entry", entry);
g_signal_connect (dialog, "response",
G_CALLBACK (pattern_select_response_cb),
view);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static void
@ -6031,7 +6030,7 @@ copy_or_move_selection (NautilusFilesView *view,
G_CALLBACK (on_destination_dialog_response),
copy_data);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static void
@ -6475,7 +6474,7 @@ extract_files_to_chosen_location (NautilusFilesView *view,
G_CALLBACK (on_extract_destination_dialog_response),
data);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static void

View file

@ -1600,7 +1600,6 @@ on_column_header_event (GtkWidget *widget,
G_CALLBACK (column_header_menu_use_default),
list_view);
gtk_widget_show_all (menu);
gtk_menu_popup_at_pointer (GTK_MENU (menu), event);
g_hash_table_destroy (visible_columns_hash);

View file

@ -1309,7 +1309,7 @@ pk_proxy_appeared_cb (GObject *source,
g_signal_connect (dialog, "response",
G_CALLBACK (application_unhandled_file_install),
parameters_install);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
g_free (mime_type);
}

View file

@ -146,7 +146,7 @@ nautilus_new_folder_dialog_controller_new (GtkWindow *parent_window,
gtk_label_set_text (GTK_LABEL (name_label), _("Folder name"));
gtk_window_set_title (GTK_WINDOW (new_folder_dialog), _("New Folder"));
gtk_widget_show_all (new_folder_dialog);
gtk_widget_show (new_folder_dialog);
return self;
}

View file

@ -134,7 +134,6 @@ const GActionEntry path_bar_actions[] =
{ "properties", action_pathbar_properties}
};
static void
action_pathbar_open_item_new_tab (GSimpleAction *action,
GVariant *state,
@ -1660,10 +1659,9 @@ make_button_data (NautilusPathBar *self,
break;
}
gtk_widget_set_no_show_all (button_data->disclosure_arrow, TRUE);
gtk_widget_set_visible (button_data->disclosure_arrow, current_dir);
if (current_dir)
{
gtk_widget_show (button_data->disclosure_arrow);
gtk_popover_set_relative_to (priv->current_view_menu_popover, button_data->button);
}
@ -1673,7 +1671,7 @@ make_button_data (NautilusPathBar *self,
gtk_label_set_single_line_mode (GTK_LABEL (button_data->label), TRUE);
button_data->bold_label = gtk_label_new (NULL);
gtk_widget_set_no_show_all (button_data->bold_label, TRUE);
gtk_widget_hide (button_data->bold_label);
gtk_label_set_single_line_mode (GTK_LABEL (button_data->bold_label), TRUE);
gtk_box_pack_start (GTK_BOX (child), button_data->bold_label);
}
@ -1698,7 +1696,6 @@ make_button_data (NautilusPathBar *self,
}
gtk_container_add (GTK_CONTAINER (button_data->button), child);
gtk_widget_show_all (button_data->container);
nautilus_path_bar_update_button_state (button_data, current_dir);

View file

@ -3109,7 +3109,6 @@ create_volume_usage_widget (NautilusPropertiesWindow *window)
if (window->volume_capacity > 0)
{
piewidget = create_pie_widget (window);
gtk_widget_show_all (piewidget);
}
return piewidget;
@ -3297,7 +3296,6 @@ create_basic_page (NautilusPropertiesWindow *window)
button,
"width", 3,
NULL);
gtk_widget_show_all (GTK_WIDGET (grid));
}
}
@ -4685,7 +4683,7 @@ on_change_permissions_clicked (GtkWidget *button,
gtk_grid_attach (grid, combo, 2, 3, 1, 1);
g_signal_connect (dialog, "response", G_CALLBACK (on_change_permissions_response), window);
gtk_widget_show_all (dialog);
gtk_widget_show (dialog);
}
static void

View file

@ -622,9 +622,6 @@ setup_widgets (NautilusQueryEditor *editor)
G_CALLBACK (search_popover_time_type_changed_cb), editor);
g_signal_connect (editor->popover, "notify::fts-enabled",
G_CALLBACK (search_popover_fts_changed_cb), editor);
/* show everything */
gtk_widget_show_all (vbox);
}
static void

View file

@ -400,7 +400,6 @@ create_row_for_label (const gchar *text,
NULL);
gtk_container_add (GTK_CONTAINER (row), label);
gtk_widget_show_all (row);
return row;
}

View file

@ -984,7 +984,6 @@ nautilus_toolbar_constructed (GObject *object)
g_signal_connect (self->location_entry, "notify::has-focus",
G_CALLBACK (on_location_entry_focus_changed), self);
gtk_widget_show_all (GTK_WIDGET (self));
toolbar_update_appearance (self);
}

View file

@ -1001,8 +1001,6 @@ constructed (GObject *object)
G_N_ELEMENTS (view_icon_actions),
self);
gtk_widget_show_all (GTK_WIDGET (self));
view_action_group = nautilus_files_view_get_action_group (NAUTILUS_FILES_VIEW (self));
g_action_map_add_action_entries (G_ACTION_MAP (view_action_group),
view_icon_actions,

View file

@ -82,7 +82,6 @@ update_icon (NautilusViewIconItemUi *self)
gtk_container_remove (GTK_CONTAINER (box), GTK_WIDGET (self->icon));
}
self->icon = create_icon (self);
gtk_widget_show_all (GTK_WIDGET (self->icon));
gtk_box_pack_start (box, GTK_WIDGET (self->icon));
}
@ -173,7 +172,6 @@ constructed (GObject *object)
GTK_WIDGET (self->item_container));
gtk_container_add (GTK_CONTAINER (self),
GTK_WIDGET (item_selection_background));
gtk_widget_show_all (GTK_WIDGET (self));
g_signal_connect (self->model, "notify::icon-size",
(GCallback) on_view_item_size_changed, self);

View file

@ -1873,8 +1873,6 @@ notebook_popup_menu_show (NautilusWindow *window,
gtk_menu_shell_append (GTK_MENU_SHELL (popup),
item);
gtk_widget_show_all (popup);
gtk_menu_popup_at_pointer (GTK_MENU (popup), event);
}

View file

@ -78,7 +78,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="margin_end">6</property>
<style>
<class name="text-button"/>
@ -145,7 +144,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="margin_end">6</property>
<signal name="clicked" handler="on_notification_operation_open_clicked" object="NautilusWindow" swapped="no"/>
<style>