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

Re: Loading mrproject/planner documents with nautilus 2.6?



On Sun, 2004-04-11 at 04:30 -0400, Michael R Head wrote:

> Is there something I'm missing? 
> Is there a way to override the discovered file type to get specialized
> XML documents to be opened in specialized apps?

This is very annoying for me as well.  For instance a wml file.

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM/DTD wml 1.2//EN"
"http://www.wapforum.org/DTD/wml_1.2.xml";>
<wml xmlns="http://www.wapforum.org/2001/wml";>
<card id="main"></card>
</wml>

Now according to the shared-mime specifications I can add

<?xml version="1.0" encoding="utf-8" ?>
<mime-info
xmlns="http://www.freedesktop.org/standards/shared-mime-info";>
<mime-type type="text/vnd.wap.wml">
		<_comment>WML files</_comment>
		<glob pattern="*.wml" />
		<root-XML namespaceURI="http://www.wapforum.org/2001/wml";
localName="wml" />
</mime-type>
</mime-info>

to somethinghere.xml and place it in /usr/share/mime/packages.  then run
update-mime-database.

This works fine, wml files are identified by the extension .wml, but as
with the mrproject files for you, nautilus then decideds the file is
text/xml instead.  This is despite the <root-XML /> tag I have which is
supposed to provide extra info for identifying xml files.

The other answer is to start messing with magic strings that can be
matched in the text file.  gnumeric for example says to search the first
64 characters for "gmr:Workbook"

The whole sniffing content concept, while it seems reasonable in theory
is just one huge broken mess, and reporting bugs with misidentified
files is not an answer before anyone says that.  The idea just doesn't
work.

I could have a plain text file called "test.txt" which contains for
example,

"The problem with strings like gmr:Workbook being searched for to
 identify files is...."

Save it, looks like a text file, view properties, whooops, nautilus says
it's a gnumeric file.


This rant is probably to the wrong place, so I appoligise for that, just
pointing out the problem is a huge one.



David

-- 
Make your website SCREEM - Site Creating & Editing EnvironMent

URL:  http://www.screem.org/
Mail: david@screem.org



Reply to: