Re: [Nautilus-list] Zooming of Bonobo components



> Currently, nautilus depends on (better: suggests)
> eog which means that eog must not depend on
> nautilus, of course.

This is not quite right. We want people to install eog along with nautilus
because the image viewer component that's part of eog is a useful viewer for
some of the most basic file types.

But nautilus itself has no dependencies on eog. So having dependencies from
eog on nautilus is no problem. Perhaps HACKING is a bit misleading about
this point.

On the other hand, some day we may run into a situation where we want
nautilus to depend on a module that also contains a view component that
needs to use the nautilus view component interfaces. If that happens, we'll
have to separate libnautilus somehow from nautilus itself. The libnautilus
library contains everything a view component might want to use, and it does
not depend on anything else in nautilus (or if it does, it doesn't need to).
Perhaps we will put it in a separate package or build it separately in the
makefile someday.

> So I looked at how zooming is done in Nautilus
> and found out that Nautilus does a query_interface()
> on Nautilus/Zoomable, so the component needs to
> implement a Nautilus/Zoomable interface.

This is the same general approach we use for any Nautilus-specific additions
to Bonobo interfaces. The same approach is used to make Bonobo Controls that
need to handle things like selection in special way when used as Nautilus
components.

> This means that we need to make eog conditionally
> depend on Nautilus to do this ....

Which is no problem. All this would affect is the order we'd build things.

> However, Bonobo also supports zooming via the
> "set_zoom_factor" method of BonoboView. The
> Nautilus/Zoomable thing just has a few more
> methods, for instance it allows you to ask the
> component for a minimum/maximum zoom factor etc.
>
> So I think it's the best way to just use Bonobo's
> "set_zoom_factor" for Embeddable's.

When you say that Bonobo supports zooming, you are overstating the case!
It's true that there's a set_zoom_factor method in BonoboView, but nothing
uses this method and it's not clear what its semantics are supposed to be.

Here are a few reasons why we are using a separate zoomable interface: (This
interface could be moved into Bonobo in the future, but it would probably
remain separate rather than being part of BonoboControl, BonoboView, or
BonoboEmbeddable.)

    1) Many Nautilus components will be controls rather than embeddables and
we need some way to zoom them. A zoom call in BonoboView does use no good
for this case.
    2) For a good UI we need more than to just be able to set a zoom factor,
we need to be able to get the current zoom factor and find out whether the
view can be zoomed in or out further.
    3) For a good UI the zoomable view needs to tell its frame when the zoom
factor has changed.

    -- Darin





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