[patch] reading from stdin in KWrite

Scott Wheeler wheeler at kde.org
Sun Jun 1 23:42:44 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This is a first shot at making KWrite read from stdin.

With this patch and the "-stdin" flag, you can pipe things into KWrite.

There are a few outstanding issues:

*) It doesn't do highlighting.  I don't know this code much at all, but I can 
figure it out if there's interest in getting this in.

*) It places the cursor at the end.

*) It only works if you're using the Kate part as your editor.  I got lost in 
the number of interfaces provided for this, but I didn't see an appropriate 
interface with a "setText()" method.

The biggest part of this patch is a s/katePart/m_katePart/ since I needed to 
add a method called katePart() and since the m_ is used on other member 
variables this seemed like the way to go.

Anyway -- let me know if others would find this useful and I'll clean it up 
and commit.

Cheers,

- -Scott
- -- 
For a successful technology, reality must take precedence over public 
relations, for nature cannot be fooled. 
- --Richard Feynman
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+2oFkQu0ByfY5QTkRAn6+AJ94TxFqrkX7kTmmaQAPKrA/wMeWdwCgiVYB
6kQYrTcdKJ8qNsLZAxQBgbg=
=gxex
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kwrite-stdin.patch
Type: text/x-diff
Size: 13030 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20030602/f5a095dc/attachment.patch>


More information about the kde-core-devel mailing list