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



On Wed, 2004-10-20 at 09:16 -0700, Jimmy Do wrote:
> 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.

So. It seems you have to extend the View interface with a
reveal_selection() call then. Take a look at how the ScrollPositionable
interface was added to NautilusView, and do something similar. Call it
ExtendedView and add the reveal_selection call. Then add, say 15 or so
methods like:
                void unimplemented1 ();
                void unimplemented2 ();
                void unimplemented3 ();
                void unimplemented4 ();

To the interface, so we can extend it compatibily (no change in epv
size) in the future.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a world-famous gay vagrant with a mysterious suitcase handcuffed to his 
arm. She's an orphaned goth widow who believes she is the reincarnation of an 
ancient Egyptian queen. They fight crime! 




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