From e55a017bc9b2942bd83d7aaab2d0430ce5344af3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= Date: Sat, 19 Mar 2022 17:39:41 +0000 Subject: pathbar: Fix button list order regressions The pathbar code makes the assumption that the first GList link in the list of path buttons corresponds to the current location and that each subsequent link is corresponds to the parent location of the previous one. This assumption relied on reversing of the list of buttons, which I've broken in commit eab10931 Fix the misbehaviours by restoring the list reversion. (Forward porting 67a3fe05ad2e0994101b0a668af1c6c321f0ca47) --- src/nautilus-pathbar.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/nautilus-pathbar.c') diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c index ce7c6fee1..389274269 100644 --- a/src/nautilus-pathbar.c +++ b/src/nautilus-pathbar.c @@ -1151,13 +1151,16 @@ nautilus_path_bar_update_path (NautilusPathBar *self, } nautilus_path_bar_clear_buttons (self); - self->button_list = new_buttons; + + /* Buttons are listed in reverse order such that the current location is + * always the first link. */ + self->button_list = g_list_reverse (new_buttons); for (l = self->button_list; l; l = l->next) { GtkWidget *container; container = BUTTON_DATA (l->data)->container; - gtk_box_append (GTK_BOX (self->buttons_box), container); + gtk_box_prepend (GTK_BOX (self->buttons_box), container); } } -- cgit v1.2.1