You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.1 KiB
60 lines
2.1 KiB
1 year ago
|
From 151af5733a11dc4aceb8ecf4c9eeafcaab188451 Mon Sep 17 00:00:00 2001
|
||
|
From: Ondrej Holy <oholy@redhat.com>
|
||
|
Date: Fri, 27 Jan 2023 11:02:22 +0100
|
||
|
Subject: [PATCH] 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.
|
||
|
---
|
||
|
src/nautilus-pathbar.c | 33 +--------------------------------
|
||
|
1 file changed, 1 insertion(+), 32 deletions(-)
|
||
|
|
||
|
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
|
||
|
index edc0fff56..4bd9ff5b2 100644
|
||
|
--- a/src/nautilus-pathbar.c
|
||
|
+++ b/src/nautilus-pathbar.c
|
||
|
@@ -1445,38 +1445,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_container_remove (GTK_CONTAINER (self), data->button);
|
||
|
- }
|
||
|
- }
|
||
|
- }
|
||
|
-
|
||
|
- g_object_unref (current_location);
|
||
|
+ /* Do nothing here, the view will set new path if needed. */
|
||
|
g_object_unref (location);
|
||
|
return;
|
||
|
}
|
||
|
--
|
||
|
2.40.0
|
||
|
|