summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wehner <martin.wehner@gmail.com>2005-07-09 20:17:47 +0000
committerMartin Wehner <mwehner@src.gnome.org>2005-07-09 20:17:47 +0000
commitbe85be4c980c972058401869c3bab760d13a407a (patch)
tree1c3ccea371316dae38ba43df5bb45247e58e6593
parent3df6f29092999a76efc2fc25971f9adbfaf0dedd (diff)
downloadnautilus-be85be4c980c972058401869c3bab760d13a407a.tar.gz
Preserve the selection when refreshing the view. Fixes #48383.
2005-07-09 Martin Wehner <martin.wehner@gmail.com> * src/nautilus-window-manage-views.c: (nautilus_window_reload): Preserve the selection when refreshing the view. Fixes #48383. Patch from Fabio Bonelli <fabiobonelli@libero.it>
-rw-r--r--ChangeLog7
-rw-r--r--src/nautilus-window-manage-views.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6564fa1b2..e9390f773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-07-09 Martin Wehner <martin.wehner@gmail.com>
+
+ * src/nautilus-window-manage-views.c: (nautilus_window_reload):
+ Preserve the selection when refreshing the view. Fixes #48383.
+
+ Patch from Fabio Bonelli <fabiobonelli@libero.it>
+
2005-06-20 Kjartan Maraas <kmaraas@gnome.org>
* src/file-manager/fm-directory-view.c: (reset_open_with_menu),
diff --git a/src/nautilus-window-manage-views.c b/src/nautilus-window-manage-views.c
index 71b361f73..73d7c5167 100644
--- a/src/nautilus-window-manage-views.c
+++ b/src/nautilus-window-manage-views.c
@@ -1660,6 +1660,7 @@ nautilus_window_reload (NautilusWindow *window)
{
char *location;
char *current_pos;
+ GList *selection;
g_return_if_fail (NAUTILUS_IS_WINDOW (window));
@@ -1672,11 +1673,15 @@ nautilus_window_reload (NautilusWindow *window)
*/
location = g_strdup (window->details->location);
current_pos = NULL;
- if (window->content_view != NULL)
+ selection = NULL;
+ if (window->content_view != NULL) {
current_pos = nautilus_view_get_first_visible_file (window->content_view);
+ selection = nautilus_view_get_selection (window->content_view);
+ }
begin_location_change
- (window, location, NULL,
+ (window, location, selection,
NAUTILUS_LOCATION_CHANGE_RELOAD, 0, current_pos);
g_free (current_pos);
g_free (location);
+ eel_g_list_free_deep (selection);
}