[nautilus/gnome-2-32] pathbar: walk the buttons in the right order
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-2-32] pathbar: walk the buttons in the right order
- Date: Sat, 14 Aug 2010 00:06:44 +0000 (UTC)
commit b74a5202c4bc8206d43f48aa9ee52457fd653d38
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Aug 14 02:07:43 2010 +0200
pathbar: walk the buttons in the right order
When a file is gone, walk the button items in the right order, i.e. the
reversed one, otherwise we end up removing the entire pathbar.
src/nautilus-pathbar.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 93b217a..3d64688 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -1570,11 +1570,19 @@ button_data_file_changed (NautilusFile *file,
}
} else if (nautilus_file_is_gone (file)) {
/* remove this and the following buttons */
- g_assert (g_list_find (path_bar->button_list, button_data));
- while ((temp_button_data = g_list_last (path_bar->button_list)->data) != button_data) {
+ GList *children;
+
+ children = g_list_find (path_bar->button_list, button_data);
+
+ while (children != NULL) {
+ temp_button_data = children->data;
+
+ /* children are in reverse order */
+ children = children->prev;
+
gtk_container_remove (GTK_CONTAINER (path_bar), temp_button_data->button);
}
- gtk_container_remove (GTK_CONTAINER (path_bar), button_data->button);
+
g_object_unref (location);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]