diff options
author | Alexander Larsson <alexl@redhat.com> | 2004-10-29 07:37:49 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2004-10-29 07:37:49 +0000 |
commit | 2b37f4e149b2ce9000b395f6891e3f95ef8d3014 (patch) | |
tree | c8926a7ce16761feb8df061e9f9a6cc2779e759e | |
parent | 0de2254b545c19265d67b1f5cdbca0dbb0dd32b1 (diff) | |
download | nautilus-2b37f4e149b2ce9000b395f6891e3f95ef8d3014.tar.gz |
Don't scroll to top if file already visible when renaming and revealing
2004-10-29 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-list-view.c: (fm_list_view_reveal_selection),
(fm_list_view_start_renaming_file):
Don't scroll to top if file already visible when renaming and
revealing selection on alt-up.
Patch from Jimmy Do.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | src/file-manager/fm-list-view.c | 19 |
2 files changed, 26 insertions, 2 deletions
@@ -1,3 +1,12 @@ +2004-10-29 Alexander Larsson <alexl@redhat.com> + + * src/file-manager/fm-list-view.c: (fm_list_view_reveal_selection), + (fm_list_view_start_renaming_file): + Don't scroll to top if file already visible when renaming and + revealing selection on alt-up. + + Patch from Jimmy Do. + 2004-10-28 Alexander Larsson <alexl@redhat.com> * configure.in: diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c index cc527a4e1..f5a877609 100644 --- a/src/file-manager/fm-list-view.c +++ b/src/file-manager/fm-list-view.c @@ -1447,7 +1447,22 @@ fm_list_view_reveal_selection (FMDirectoryView *view) /* Make sure at least one of the selected items is scrolled into view */ if (selection != NULL) { - fm_list_view_scroll_to_file (FM_LIST_VIEW (view), selection->data); + FMListView *list_view; + NautilusFile *file; + GtkTreeIter iter; + GtkTreePath *path; + + list_view = FM_LIST_VIEW (view); + file = selection->data; + if (!fm_list_model_get_tree_iter_from_file (list_view->details->model, file, &iter)) { + return; + } + path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_view->details->model), &iter); + + gtk_tree_view_scroll_to_cell (list_view->details->tree_view, path, NULL, FALSE, 0.0, 0.0); + + gtk_tree_path_free (path); + path = NULL; } nautilus_file_list_free (selection); @@ -1841,7 +1856,7 @@ fm_list_view_start_renaming_file (FMDirectoryView *view, NautilusFile *file) gtk_tree_view_scroll_to_cell (list_view->details->tree_view, path, list_view->details->file_name_column, - TRUE, 0.0, 1.0); + FALSE, 0.0, 1.0); gtk_tree_view_set_cursor (list_view->details->tree_view, path, list_view->details->file_name_column, |