problem plugin depending on the current url
David Faure
david at mandrakesoft.com
Thu Jun 20 07:50:30 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 20 June 2002 00:34, aleXXX wrote:
> Hi,
>
> I'm currently trying to write a konqy plugin which is able to mount/umount
> samba shares via the new ::special() function of the smbro ioslave.
> It provides two actions (smbmount and smbumount). Depending on the current
> url in konqy they should be enabled/disabled.
> Therefor I do:
>
> KonqDirPart * part = dynamic_cast<KonqDirPart *>(parent());
Use QObject::inherits and static_cast.
dynamic_cast across dlopened objects doesn't work well.
> KParts::BrowserExtension* extension = part->extension();
> connect(extension,SIGNAL(openURLNotify()),this,SLOT(enableActions()));
>
> but enableActions() of my plugin seems only to be called when going one dir
> deeper (e.g. from file:/ to file:/usr), not when going one dir up, both for
> file:/ and smb:/
>
> Is this the intended behaviour or what could be going wrong ?
openURLNotify is certainly not the one you want (did you read its docu? :).
Better listen to the KParts::OpenURLEvent events sent by konq to the part.
(Aren't there other plugins which do this already, e.g. dirfilter maybe?)
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2-beta2 is coming very shortly...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9EXs272KcVAmwbhARAoZcAJ4h0Ke2Qy9bk8z00uqZ/bieYXb4JACgq++J
yZ+VLJEZgyYGApHB/xf7Cx0=
=UGxU
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list