Re: Writing a Nautilus view

On 04May2002 01:52AM (+0200), Mads Villadsen wrote:
> I am currently writing a Nautilus view, but I am having a few
> problems. I am using the sample view and the music view for
> inspiration. The view will eventually become a picture gallery view
> (as per tigert's suggestion in an earlier mail to this list).
> The problems I am having are as follows:
> 1) Making the .server file work correctly. A picture gallery view
>    should of course only be active when there are actually pictures in
>    the directory (just liekt he music view is only active when there
>    are mp3 files in a directory). So I thought I could the .server
>    file from the music view and replace the lines requiring
>    audio/x-mp3 with image/* or image/jpeg - but neither of those
>    work. Does anyone have an idea as to why that may be?

What goes wrong? Does the view always show up or never show up?
> 2) I have to layout image previews, and instead of doing it myself is
>    it possible to inherit from the icon view, so that a lot of this
>    gets easier?

Currently there is no good way to inherit from the icon view (someone
smack me if this has changed very recently).
> 3) Is it possible to use the nautilus icon container when writing a
>    stand-alone view? The same goes for NautilusFile? As far as I can
>    tell they are defined in libnautilus-private, and therefore
>    impossible to access from the outside.

Yes, they are sadly inaccessible from the outside because they are
really appropriate to be moved out. I hope that someday they can be
moved to eel, but I don't know when Darin and Alex will decide this is

Your basic options are:

1) Cheat and make your component require private nautilus headers to
build. This is a really bad idea, unless you think you can convince
the nautilus maintainers to put your component in the main Nautilus

2) Cut and paste the parts of the code that you want. You won't
automatically get new bug fixes and feature improvements, but you will
be safe against random API breakage.

3) Get the maintainers to tell you what work is required to move these
classes to somewhere more useful to outside components and help with
that work. This will doubtless take a long time, especially since work
is focused on finishing nautilus 2, but you could use strategies 1 or
2 in the meantime.


Nautilus Hacker Emeritus

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