Re: MIME Types for folders



On Tue, 2003-10-14 at 23:14, Julien Olivier wrote:
> On Tue, 2003-10-14 at 16:07, Alexander Larsson wrote:
> > On Tue, 2003-10-14 at 13:55, julo altern org wrote:
> > > Hi !
> > > 
> > > Here's an idea I have alays had in my tortured mind. And I'd like to share it with you, fellow hackers:
> > > 
> > > I think it would be very useful if Nautilus could assign a set of mime-types to a folder depending on the mime types of the files it contains.
> > > 
> > > For example, if you have a folder called "Documents" containing both pictures and videos, right-clicking on this folder should enable you to open the folder using Nautilus (default handler for folders), or using GThumb (if gthumb is the default handler for pictures), or using Totem (if it's the default handler for videos).
> > > 
> > > That would need to have a way to specify whether an app can open a folder (like it's possible to specify whether an app can open a file on a remote server).
> > > 
> > > In a prefect world, you could configure your system to open pictures using GIMP by default and folders contaning pictures using GThumb. Or to open music files using Totem and folder contaning music files using Rhythmbox.
> > > 
> > > How (if ever) would that work with the current MIME specification ?
> > 
> > There is already support for this in nautilus when picking e.g. views
> > using the nautilus:required_directory_content_mime_types oaf_attribute.
> > 
> 
> Excuse me but I'm not really familiar with Nautilus internals.
> 
> Does that mean that it's already possible, through Nautilus API, to
> determine the MIME types contained in a given folder ?
> 
> If yes, would it then be possible to have the handlers for those
> MIME-types automatically appear as options in the folder's context menu
> (or is it already possible) ?

Well, the API is there to get the mime content of the current directory.
It would be pretty expensive to get it for subdirectories, since you
would need to look at all the files in them.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an all-American albino househusband on his last day in the job. She's a 
high-kicking punk pearl diver with the soul of a mighty warrior. They fight 
crime! 




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