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

List:       kde-devel
Subject:    Re: Fwd: [Kwrite-devel] Bug#23982: can't print or search a text file (*.txt)
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-04-10 23:28:47
[Download RAW message or body]

On Tuesday 10 April 2001 21:39, Cullmann Christoph wrote:
> Hi,
> just no idea how to do that using the BrowserExtension stuff. Anyone here who 
> wants to help ?

Will try, although browserextension.h explains most of this already :)

> First let me say that I have switched over to using Konqueror as my default
>  browser.  It mostly rocks!
Nothing to do here :)

> However, when viewing a text file, as opposed to an html file, I can not
>  print the document 

To make printing work, you need to add a slot named print() to your browser-extension-inherited
class, so that Konqueror knows that the component supports this action.

(yes, people are ecstatic about "querying an object's interface" in COM etc., but
we can do that with Qt ;-)

Then you need to enable printing - in your case, probably always enabled, so
simply enableAction( "print", true ) in the constructor 

[in general emitting signals from a constructor doesn't work because the connect
isn't done yet, but to solve that in BE we connect to a slot in BE's constructor,
which happens before, so everything's fine].

And then of course you need to implement the print() slot.

> or search the text <ctrl>+<f>.  

That's different, it's not a "standard action" provided by konqueror.
So it's simply up to kate's part to provide this action, the usual way,
with an entry in the part's XML rc file.
In doubt check out khtml :)

Hope this helps.

-- 
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
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

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

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