[nautilus] places-view: Fix regression



commit c687f8632c774dc239cd2dccb260f96732c5540a
Author: António Fernandes <antoniof gnome org>
Date:   Tue Dec 14 02:11:06 2021 +0000

    places-view: Fix regression
    
    Unlike NautilusFilesView, NautilusPlacesView is not a subclass of
    GtkGrid, but instead it's a subclass of GtkBox.
    
    Casting it to GTK_GRID fails at runtime, showing the Other Locations
    view as empty.
    This is a regression caused by e9ae1add9cccee61d10e724b3d7f3526df8ad32a
    
    Fix it by treating it as a GtkBox.

 src/nautilus-places-view.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/nautilus-places-view.c b/src/nautilus-places-view.c
index 732f4fd51..9a37670aa 100644
--- a/src/nautilus-places-view.c
+++ b/src/nautilus-places-view.c
@@ -26,6 +26,7 @@
 #include "nautilus-toolbar-menu-sections.h"
 #include "nautilus-view.h"
 #include "nautilus-window-slot.h"
+#include "nautilus-gtk4-helpers.h"
 
 typedef struct
 {
@@ -397,7 +398,7 @@ nautilus_places_view_init (NautilusPlacesView *self)
     gtk_widget_set_hexpand (priv->places_view, TRUE);
     gtk_widget_set_vexpand (priv->places_view, TRUE);
     gtk_widget_show (priv->places_view);
-    gtk_grid_attach_next_to (GTK_GRID (self), priv->places_view, NULL, GTK_POS_BOTTOM, 1, 1);
+    gtk_box_append (GTK_BOX (self), priv->places_view);
 
     g_signal_connect_swapped (priv->places_view,
                               "notify::loading",


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]