Re: [ROOT] Any Mime artists out there?

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Mar 19 2002 - 12:41:04 MET


Hi Simon,


On Mon, 2002-03-18 at 20:57, Simon Dean wrote:
> Hi there.
> 
> When a file is viewed in a listview, what particular characteristic of the
> file is compared to the 'pattern' part of the relevant Mime in order to
> determine which icon to display? In root.mimes, there seems to be an
> ambiguity because there is an entry for both 'TFile' and files with the
> suffix '.root'. Which Mime has priority? (I can't tell because they have
> the same icon assigned)
>
The list of mimetypes is searched from top to bottom. So the first item
found matching the pattern is used.

> 
> Also, using the 'gClient->GetMimeType()->AddType()' construct, is there
> any way of overriding the existing MIME-types. In other words, if I wanted
> to supply my own icon for a filename with a format like 'simon*.root' how
> could I get around the obvious ambiguity with the current '*.root' Mime.
> 
You cannot override in the current version since the mime type will be
added to the end of the list. I'll change that. What you can do is copy
$ROOTSYS/etc/root.mimes to ~/.root.mimes and add your custom mime types
at the top of the file.

Cheers, Fons.

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:46 MET