[nautilus/gnome-2-32] pathbar: remove buttons only if the gone file is below the current
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32] pathbar: remove buttons only if the gone file is below the current
- Date: Tue, 28 Dec 2010 16:05:02 +0000 (UTC)
commit c3b54e662b52ca15d1dcbe68386b8fa82b12adc5
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Dec 28 16:51:10 2010 +0100
pathbar: remove buttons only if the gone file is below the current
This should fix once and for all the crashers when ejecting devices.
src/nautilus-pathbar.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 24478b9..65a69eb 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1571,10 +1571,12 @@ button_data_file_changed (NautilusFile *file,
} else if (nautilus_file_is_gone (file)) {
gint idx, position;
- /* if the current location is gone, don't do anything, as the view
+ /* if the current or a parent location are gone, don't do anything, as the view
* will get the event too and call us back.
*/
- if (nautilus_file_compare_location (file, current_button_data->file) != 0) {
+ current_location = nautilus_file_get_location (current_button_data->file);
+
+ if (g_file_has_prefix (location, current_location)) {
/* remove this and the following buttons */
position = g_list_position (path_bar->button_list,
g_list_find (path_bar->button_list, button_data));
@@ -1587,6 +1589,7 @@ button_data_file_changed (NautilusFile *file,
}
}
+ g_object_unref (current_location);
g_object_unref (location);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]