talking to konqueror with an external program
Christian Mueller
cmueller at gmx.de
Sat Oct 11 16:52:26 BST 2003
Am Samstag, 11. Oktober 2003 16:51 schrieb Pupeno:
> Just an idea that may help... wouldn't it be posible to iterate thru all
> the konquerors and find which one has focus if one has, or else, give focus
> to the konqueror someone uses for showing a page with dcop ?
Yes, that's a good idea. The only problem I see with this: Most
of the time there won't be an active konqi window, e.g. when you
"are somewhere else" to launch the script by clicking an icon
or running it in konsole. In those cases you'd have to fall back
on something else... for example using the first one and activating it.
Some days ago (I didn't find the link any more)
someone suggested this demo code to find out the active konqi instance:
-------------------------------------
#!/bin/bash
for i in `dcop | grep konqueror` ; do
for j in `dcop $i | grep mainwindow` ; do
if [ `dcop $i $j isActiveWindow` == "true" ] ; then
echo $i is the currently active Konqueror.
exit
fi
done
done
echo There is no currently active Konqueror.
-------------------------------------
Note: This doesn't work for me in KDE 3.1. In the current CVS version it does.
The DCOP method isActiveWindow() didn't exist in KDE 3.1 yet...
Christian.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde/attachments/20031011/baff32d0/attachment.sig>
-------------- next part --------------
___________________________________________________
This message is from the kde mailing list.
Account management: http://mail.kde.org/mailman/listinfo/kde.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
More information about the kde
mailing list