summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2023-01-27 11:02:22 +0100
committerOndrej Holy <oholy@redhat.com>2023-04-06 10:40:31 +0200
commitd4ea8fcc28a88b4e1ab85c2bcdd10a1d5e671fbd (patch)
tree352c72a3065d2e008cef5f817379ecf66d0485c9
parenta66f9e7a2d3f1be18e3e4e1867f09d88c81950a6 (diff)
downloadnautilus-d4ea8fcc28a88b4e1ab85c2bcdd10a1d5e671fbd.tar.gz
pathbar: Do nothing when current location disappears
The pathbar automatically clear all the buttons when the current location is marked as gone. This was needed earlier, when child folders where shown in some cases, but this is no more needed nowadays. Let's drop that code.
-rw-r--r--src/nautilus-pathbar.c35
1 files changed, 1 insertions, 34 deletions
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 7e19e2448..44ccaef30 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1094,40 +1094,7 @@ button_data_file_changed (NautilusFile *file,
}
else if (nautilus_file_is_gone (file))
{
- gint idx, position;
-
- /* if the current or a parent location are gone, clear all the buttons,
- * the view will set the new path.
- */
- current_location = nautilus_file_get_location (current_button_data->file);
-
- if (g_file_has_prefix (current_location, location) ||
- g_file_equal (current_location, location))
- {
- nautilus_path_bar_clear_buttons (self);
- }
- else if (g_file_has_prefix (location, current_location))
- {
- /* remove this and the following buttons */
- position = g_list_position (self->button_list,
- g_list_find (self->button_list, button_data));
-
- if (position != -1)
- {
- for (idx = 0; idx <= position; idx++)
- {
- ButtonData *data;
-
- data = BUTTON_DATA (self->button_list->data);
-
- gtk_box_remove (GTK_BOX (self->buttons_box), data->container);
- self->button_list = g_list_remove (self->button_list, data);
- button_data_free (data);
- }
- }
- }
-
- g_object_unref (current_location);
+ /* Do nothing here, the view will set new path if needed. */
g_object_unref (location);
return;
}