Re: [PATCH] Bug 142227 & revealing selections in spatial windows



On Wed, 20 Oct 2004 09:09:49 +0200, Alexander Larsson <alexl redhat com> wrote:
> Adding calls to the view is complicated, because that means changing the
> corba IDL. You have to do changes like this by extending the view with
> new interfaces. Fortunately we already have something for scrolling to a
> file: nautilus_view_frame_scroll_to_file (). You can use that for this.

Actually, I don't think I can use nautilus_view_frame_scroll_to_file
because it'll conflict with a bug fix that I plan on making later on.
If I use nautilus_view_frame_scroll_to, then pressing 'alt-up' into an
already-open parent window will cause the selected icon to scroll to
the top of the window, whether or not it's already visible. I think
that the right thing to do would be only to scroll *if* the icon isn't
already visible. This way, there's no unneeded scrolling to disorient
the user.

Right now, icon view follows this behavior when revealing a selection,
but list view does not--it always scrolls the selected row to the top
of the view. If I *revealed* a selection rather than using
nautilus_view_frame_scroll_to_file, then I could modify
fm_list_view_reveal_selection to only scroll if the row is not
visible. I can't modify the behavior of *_scroll_to_file in either
icon or list view because *_scroll_to_file is supposed to always
scroll the selection to the top of the view.
nautilus_icon_container_scroll_to_icon (which is called by
icon_view_scroll_to_file_callback) documents this behavior.

Jimmy



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]