mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-01 05:23:56 +00:00
extensions/image-properties: Reduce container API
Preparing for GTK4.
This commit is contained in:
parent
c1760ff543
commit
54617c32b3
|
@ -68,7 +68,7 @@ append_item (NautilusImagesPropertiesPage *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_container_add (GTK_CONTAINER (page->grid), name_label);
|
||||
gtk_grid_attach_next_to (GTK_GRID (page->grid), name_label, NULL, GTK_POS_BOTTOM, 1, 1);
|
||||
gtk_widget_set_halign (name_label, GTK_ALIGN_START);
|
||||
gtk_widget_show (name_label);
|
||||
|
||||
|
@ -110,7 +110,12 @@ nautilus_image_properties_page_init (NautilusImagesPropertiesPage *self)
|
|||
gtk_grid_set_row_spacing (GTK_GRID (self->grid), 6);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (self->grid), 18);
|
||||
append_item (self, _("Loading…"), NULL);
|
||||
#if GTK_MAJOR_VERSION < 4
|
||||
gtk_container_add (GTK_CONTAINER (self->page_widget), self->grid);
|
||||
#else
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (self->page_widget),
|
||||
self->grid);
|
||||
#endif
|
||||
|
||||
gtk_widget_show_all (GTK_WIDGET (self->page_widget));
|
||||
}
|
||||
|
@ -262,7 +267,7 @@ load_finished (NautilusImagesPropertiesPage *page)
|
|||
GtkWidget *label;
|
||||
|
||||
label = gtk_grid_get_child_at (GTK_GRID (page->grid), 0, 0);
|
||||
gtk_container_remove (GTK_CONTAINER (page->grid), label);
|
||||
gtk_widget_hide (label);
|
||||
|
||||
if (page->loader != NULL)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue