Intergrating mht file to konqueror

Waldo Bastian bastian at kde.org
Wed Sep 22 12:08:54 BST 2004


On Wednesday 22 September 2004 10:26, Spiros Georgaras wrote:
> Hi all
>
> Hope this is the right list to ask bout it.....
>
> I have written an app which reads mht files (Windows Web Archive) and
> displays them in Konqueror.
>
> The app is kmhtConvert 
> http://www.kde-apps.org/content/show.php?content=14315
>
> The thing I do is I convert the mht file to war and display it with
> KRun::openUrl("tar:/tmp/kde-spiros/<file name>.war"), so the war file opens
> in a new konqueror window.
>
> I would like to intergrate it in konqueror (that is double-clicking the mht
> file would cause the war file to appear in the same window/tab).
>
> I have had a look at the code of kio_tar and the 'Embedded Components
> Tutorial' on konqueror.kde.org, but it didn't help. You see i am a newbee
> :)
>
> I think that the problem is that I don't use my own widget to display the
> result (war file)

Yes, that makes it a bit complicated I guess. Normally you would create a 
KPart for handling a certain file format (mimetype) What you could do is 
create a KPart and then instead of displaying the file in its own widget, it 
would convert the file to *.war and then redirect to this *.war file.

The KPart would need to have a BrowserExtension so that it can call 
BrowserExtension::openURLRequest() to ask for a redirection.

The drawback of this approach is that it will flicker a bit.

Cheers,
Waldo
-- 
bastian at kde.org  |  Wanted: Talented KDE developer  |  bastian at suse.com
  http://www.suse.de/de/company/suse/jobs/suse_pbu/developer_kde.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20040922/96501e9a/attachment.sig>


More information about the kfm-devel mailing list