[nautilus/wip/antoniof/gtk4-preparation-step-container-api] extensions/image-properties: Reduce container API
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/gtk4-preparation-step-container-api] extensions/image-properties: Reduce container API
- Date: Thu, 25 Nov 2021 19:54:02 +0000 (UTC)
commit b7b2c0533cc4a89ae9705386c3d9aaea1f61d0c8
Author: António Fernandes <antoniof gnome org>
Date: Thu Nov 25 19:46:20 2021 +0000
extensions/image-properties: Reduce container API
Preparing for GTK4.
extensions/image-properties/nautilus-image-properties-page.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/extensions/image-properties/nautilus-image-properties-page.c
b/extensions/image-properties/nautilus-image-properties-page.c
index 85d4aadc3..3da537226 100644
--- a/extensions/image-properties/nautilus-image-properties-page.c
+++ b/extensions/image-properties/nautilus-image-properties-page.c
@@ -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,6 +110,7 @@ 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);
+ /* GTK4: Use gtk_scrolled_window_set_child() here. */
gtk_container_add (GTK_CONTAINER (self->page_widget), self->grid);
gtk_widget_show_all (GTK_WIDGET (self->page_widget));
@@ -262,7 +263,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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]