Intergrating mht file to konqueror

Spiros Georgaras sngeorgaras at otenet.gr
Sun Nov 7 20:44:46 GMT 2004


Στις Κυριακή 7 Νοέμβριος 2004 22:14, ο/η Thiago Macieira έγραψε:
> Spiros Georgaras wrote:
> >> 1) treat kio_mhtml as a container-like protocol, just like kio_tar and
> >> kio_zip. In that case, it is a T_FILESYSTEM protocol and will always
> >> return a file listing for listDir("/"). Konqueror will see that one
> >> file is called "index.html" or "index.xhtml" and decide to open it on
> >> its own, just as it does with normal files.
> >
> >I don't think this will do, cause this way we will not be able to get
> > the directory listing (like in 'war:/my_warfile.war/') if one of the
> > index files exist in the mhtml file
>
> You can change that in the View menu.
>
> >But then konqueror should update its location bar, and I do not know if
> > this can be done in a generic way....
>
> By sending a redirection.
>
> >[Property::X-KDE-LocalProtocol]
> >Type=QString
> >Value=mhtml
>
> That's ok.
>
> >[Property::X-KDE-LocalFile]
> >Type=QStringList
> >Value=index.html,index.xhtml,/
>
> What if I want a different file?

I think that these properties are only to declare the default behavior for 
kio_mht (when the file is double-clicked in konqueror). Then we want to 
display the index file or if none exists the directory listing.

If we want a different file we get the directory listing and double-click the 
file we want to see. 
>
> How do we get a directory listing?
>
> >[Property::X-KDE-LocalServiceType]
> >Type=QStringList
> >Value=text/html,application/xhtml+xml,inode/directory
>
> I don't think this is needed. The ioslave can return the correct MIME type
> depending on the filename requested.
>
> Or, it could simply use the Content-Type header in the MIME part being
> requested. For instance, "script.php" can have a MIME type of
> text/javascript.
This is much simpler then :)




More information about the kfm-devel mailing list