#1 Qtopia MIME type support

open
nobody
None
5
2003-09-28
2003-09-28
Clive Butler
No

The following is a small set of changes to allow JR to be
associated with MIME types for the various document
types it understands, and to be launched when a
document of those types is clicked on. I hope this is of
use to you, and (in case it wasn't obvious) the changes
are hereby placed in the public domain. Cheers!

Changes are against JR 2.0

The MIME type might need some more thought, and I
couldn't think of an easy way to make resume() and
setDocument() mutually exclusive (at the moment,
resume() is always called as it used to be and
setDocument() is invoked later and wins..).

main.cpp:42 (change)
s/showMainWidget/showMainDocumentWidget/

TextReader.cpp:89 (insert)
void TextReader::setDocument(const QString&
document)
{
textview->fileOpen(document);
}

TextReader.h:98 (insert)
void setDocument(const QString& document);

apps/Applications/justreader.desktop (insert)
MimeType=etext/palmdoc

There should also be a postinst control script to add the
MIME type associations into /opt/Qtopia/etc/mime.types
but I didn't write one.

Discussion