mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-27 11:29:24 +00:00
project: replace deprecated GtkMisc calls
GtkMisc is deprecated since 3.14 release, being replaced by GtkWidget's halign & valign, and GtkLabel's xalign & yalign. Nautilus, however, did not updated its codebase to match the new deprecations. Remove any reminescent gtk_misc* calls from the codebase.
This commit is contained in:
parent
e6a2a3f4b7
commit
6adf3cf74c
|
@ -329,7 +329,7 @@ eel_gtk_message_dialog_set_details_label (GtkMessageDialog *dialog,
|
|||
label = gtk_label_new (details_text);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_selectable (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (expander), label);
|
||||
gtk_box_pack_start (GTK_BOX (content_area), expander, FALSE, FALSE, 0);
|
||||
|
|
|
@ -194,7 +194,7 @@ file_list_ready_cb (GList *files,
|
|||
label = gtk_label_new (primary_text);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_label_set_line_wrap_mode (GTK_LABEL (label), PANGO_WRAP_WORD_CHAR);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (details->titles_vbox),
|
||||
label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
@ -210,7 +210,7 @@ file_list_ready_cb (GList *files,
|
|||
|
||||
label = gtk_label_new (secondary_text);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_box_pack_start (GTK_BOX (details->titles_vbox),
|
||||
label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
@ -477,7 +477,7 @@ nautilus_file_conflict_dialog_init (NautilusFileConflictDialog *fcd)
|
|||
widget = gtk_image_new_from_icon_name ("dialog-warning",
|
||||
GTK_ICON_SIZE_DIALOG);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), widget, FALSE, FALSE, 0);
|
||||
gtk_misc_set_alignment (GTK_MISC (widget), 0.5, 0.0);
|
||||
gtk_widget_set_valign (widget, GTK_ALIGN_START);
|
||||
|
||||
/* Setup the vbox containing the dialog body */
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||
|
|
|
@ -287,7 +287,7 @@ nautilus_mime_application_chooser_build_ui (NautilusMimeApplicationChooser *choo
|
|||
gtk_box_set_homogeneous (GTK_BOX (chooser), FALSE);
|
||||
|
||||
chooser->details->label = gtk_label_new ("");
|
||||
gtk_misc_set_alignment (GTK_MISC (chooser->details->label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (chooser->details->label), 0);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (chooser->details->label), TRUE);
|
||||
gtk_label_set_line_wrap_mode (GTK_LABEL (chooser->details->label),
|
||||
PANGO_WRAP_WORD_CHAR);
|
||||
|
|
|
@ -221,7 +221,7 @@ present_autorun_for_software_dialog (GMount *mount)
|
|||
gtk_widget_get_scale_factor (GTK_WIDGET (dialog)));
|
||||
pixbuf = nautilus_icon_info_get_pixbuf_at_size (icon_info, icon_size);
|
||||
image = gtk_image_new_from_pixbuf (pixbuf);
|
||||
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
|
||||
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
||||
|
||||
gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);
|
||||
|
||||
|
|
|
@ -562,7 +562,7 @@ nautilus_connect_server_dialog_init (NautilusConnectServerDialog *dialog)
|
|||
|
||||
label = gtk_label_new_with_mnemonic (_("_Server Address"));
|
||||
boldify_label (GTK_LABEL (label));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row++, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
@ -576,7 +576,7 @@ nautilus_connect_server_dialog_init (NautilusConnectServerDialog *dialog)
|
|||
gtk_widget_show (dialog->details->uri_entry);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row++, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
dialog->details->error_label = label;
|
||||
|
@ -586,7 +586,7 @@ nautilus_connect_server_dialog_init (NautilusConnectServerDialog *dialog)
|
|||
|
||||
label = gtk_label_new_with_mnemonic (_("_Recent Servers"));
|
||||
boldify_label (GTK_LABEL (label));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (GTK_GRID (grid), label, 0, row++, 1, 1);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ build_grid (GtkWidget *container,
|
|||
label = gtk_label_new (label_text);
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
g_free (label_text);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_size_group_add_widget (label_size_group, label);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
|
|
|
@ -139,14 +139,16 @@ append_item (NautilusImagePropertiesPage *page,
|
|||
pango_attr_list_insert (attrs, pango_attr_weight_new (PANGO_WEIGHT_BOLD));
|
||||
gtk_label_set_attributes (GTK_LABEL (name_label), attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
gtk_misc_set_alignment (GTK_MISC (name_label), 0, 0);
|
||||
gtk_label_set_xalign (GTK_LABEL (name_label), 0);
|
||||
gtk_label_set_yalign (GTK_LABEL (name_label), 0);
|
||||
gtk_container_add (GTK_CONTAINER (page->details->grid), name_label);
|
||||
gtk_widget_show (name_label);
|
||||
|
||||
if (value != NULL) {
|
||||
label = gtk_label_new (value);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_label_set_yalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach_next_to (GTK_GRID (page->details->grid), label,
|
||||
name_label, GTK_POS_RIGHT,
|
||||
1, 1);
|
||||
|
|
|
@ -2833,7 +2833,8 @@ create_column_editor (NautilusListView *view)
|
|||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_markup (GTK_LABEL (label), str);
|
||||
gtk_label_set_line_wrap (GTK_LABEL (label), FALSE);
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_label_set_yalign (GTK_LABEL (label), 0);
|
||||
gtk_widget_show (label);
|
||||
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
|
||||
|
|
|
@ -304,7 +304,8 @@ build_tab_label (NautilusNotebook *nb, NautilusWindowSlot *slot)
|
|||
label = gtk_label_new (NULL);
|
||||
gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
|
||||
gtk_label_set_single_line_mode (GTK_LABEL (label), TRUE);
|
||||
gtk_misc_set_padding (GTK_MISC (label), 0, 0);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_label_set_yalign (GTK_LABEL (label), 0);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
|
|
|
@ -1263,7 +1263,7 @@ attach_label (GtkGrid *grid,
|
|||
gtk_label_set_selectable (GTK_LABEL (label_field), TRUE);
|
||||
}
|
||||
|
||||
gtk_misc_set_alignment (GTK_MISC (label_field), 0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label_field), 0);
|
||||
gtk_widget_show (label_field);
|
||||
|
||||
if (ellipsize_text) {
|
||||
|
@ -4188,14 +4188,12 @@ on_change_permissions_clicked (GtkWidget *button,
|
|||
TRUE, TRUE, 0);
|
||||
|
||||
label = gtk_label_new (_("Files"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_grid_attach (grid, label, 1, 0, 1, 1);
|
||||
label = gtk_label_new (_("Folders"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5);
|
||||
gtk_grid_attach (grid, label, 2, 0, 1, 1);
|
||||
|
||||
label = gtk_label_new (_("Owner:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (grid, label, 0, 1, 1, 1);
|
||||
combo = create_permissions_combo_box (PERMISSION_USER, FALSE);
|
||||
window->details->change_permission_combos = g_list_prepend (window->details->change_permission_combos,
|
||||
|
@ -4209,7 +4207,7 @@ on_change_permissions_clicked (GtkWidget *button,
|
|||
gtk_grid_attach (grid, combo, 2, 1, 1, 1);
|
||||
|
||||
label = gtk_label_new (_("Group:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (grid, label, 0, 2, 1, 1);
|
||||
combo = create_permissions_combo_box (PERMISSION_GROUP, FALSE);
|
||||
window->details->change_permission_combos = g_list_prepend (window->details->change_permission_combos,
|
||||
|
@ -4223,7 +4221,7 @@ on_change_permissions_clicked (GtkWidget *button,
|
|||
gtk_grid_attach (grid, combo, 2, 2, 1, 1);
|
||||
|
||||
label = gtk_label_new (_("Others:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_grid_attach (grid, label, 0, 3, 1, 1);
|
||||
combo = create_permissions_combo_box (PERMISSION_OTHER, FALSE);
|
||||
window->details->change_permission_combos = g_list_prepend (window->details->change_permission_combos,
|
||||
|
|
Loading…
Reference in a new issue