[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    RE: WinWord and *.doc
From:       Nicolas GOUTTE <nicog () snafu ! de>
Date:       2001-02-23 0:41:09
[Download RAW message or body]

Sorry, but I do not agree!

1. KMimeMagic

KMimeMagic is not capable of identify patterns that are not at a fix 
position.
XML for example needs to verify the <!DOCTYPE. However, at the same time 
XML does not say the exact position of where the <!DOCTYPE will be. White 
space can be inserted nearly everywhere. So KMimeMagic is useless.
You think I am wrong. So take an old KDE 1.2 (sic) kfm and present it a 
XHTML file. Kfm will not like because in XHTML it is : <!DOCTYPE html 
(upper case DOCTYPE, lower case html) (By the way, this bug is still in 
KMimeMagic!) But as "text/html" is found through patterns in KDE 2.x, this 
problem does not arise, as long as the extension is correct.
And I hope for you, that the author of the HTML/XHTML file has not put an 
empty line in front of it, if you use KMimeMagic! Nor a XML declaration ( 
<?xml )

2. Konqueror Has The Same Goal

That is not true. Konqueror does not have the same goal than a file dialog. 
A file dialog serves the application that has called it. This application 
may have very different goals than Konqueror. Konqueror has the goal to 
present the file and to be able to display it on demand. If the display is 
a little wrong, it does not matter.
You have an unknown XML file. For Konqueror, no problem, just display it 
like any XML file. But in any serious application, you want to import this 
file. And there it does matter, if this file is from KWord, is in the XML 
version of DocBook, is a XHTML file or is a generic XML file. (But all 
those are "application/xml".)

3. Notes

I have here chosen XML as an example of a very flexible format. But other 
formats are very difficult to "convert" into a mime type without external 
help (for example extensions.)


-----Original Message-----
From:	David Faure [SMTP:david@mandrakesoft.com]
Sent:	Thursday, February 22, 2001 10:47 PM
To:	koffice-devel@max.tat.physik.uni-tuebingen.de
Subject:	Re: WinWord and *.doc

On Thursday 22 February 2001 20:03, Stephan Kulow wrote:
> Actually the night I commited this David, Carsten and I talked about this 
and
> it seems there is no easy way. But I think, the right place to fix it is
> kofficecore and maybe we need to provide a hook in the file dialog.

I don't quite agree here. This problem isn't KOffice-specific at all.

> But konqueror doesn't need the Pattern, so it's the File dialog that 
needs a
> chance.

It needs to recognize files from their mimetypes, EITHER from the extension
OR from the contents (KMimeMagic), just like konqueror does.

> But we didn't want mimetype checking first because it makes the
> use of the file dialog either strange or slow.

If a filter is set (show me all the MSWord files), then the file dialog 
should
be able to show everything that qualifies as one, whether from its 
extension
or from its contents.

Many people asked me "why does KDE reproduce Window's mistake
of basing everything on extensions?". When I answer that Konqueror doesn't,
they are right when they answer that KFileDialog does. If you want KWord
to load your document, you NEED to call it .kwd. Not quite user friendly.

Why does that make the use of the file dialog strange ? The filter combo
could show mimetype (comment, not internal name)+pattern (extensions).
The app would supply that of course (new API call, or simply new filter
syntax). Slow ? That's the price to pay for mimetype filtering (but note 
that
you can start showing the items that match the mimetype as soon as you
know it).

--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic