[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KFileView and doubleclicks?
From: Christian Nitschkowski <segfault_ii () web ! de>
Date: 2002-05-31 13:01:01
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Freitag, 31. Mai 2002 12:16 schrieb Carsten Pfeiffer:
> .....
> Having a quick look at the code, I could only imagine the latter. If
> onlyDoubleClickSelectsFile(true) is called too late (i.e. after the inner
> views have been initialized), then the selectedFile() signal could be
> emitted wrongly.
>
Thanks. That was the problem. I called setOnlyDoubleClickSelectsFiles(true)
after doing the other initial work like setting the ViewMode.
templateView = new KDirOperator("", templates, 0);
templateView->setView(KFile::Default);
// some other
templateView->updateDir();
templateView->setOnlyDoubleClickSelectsFiles(true);
Now, it reads
templateView = new KDirOperator("", templates, 0);
templateView->setOnlyDoubleClickSelectsFiles(true);
templateView->setView(KFile::Default);
// some other
templateView->updateDir();
and it works just as expected.
> PS: why don't you use KDirOperator's signals fileSelected() etc.? (Yes, I
> just noticed they're lacking docu). Using those, you don't need to
> re-connect() when the user switches views.
>
Er, templateView is a KDirOperator.
So
connect (templateView, SIGNAL (selectedFile(const KFileItem*)),
this, SLOT (selectedFile(const KFileItem*)));
should use the KDirOperator's selectedFile-signal or have I missed something?
> Cheers
> Carsten Pfeiffer
>
CU
Christian Nitschkowski
- --
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
GnuPG / PGP Key ID: 52FF1D09
search on wwwkeys.de.pgp.net or search.keyserver.net
Visit my page on http://segfaultskde.berlios.de
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE893QWb/QSzFL/HQkRAiavAJ9P2D0m/t36+9npqFbifhIbgVm6jACeIU6G
mKr31qZJpKqtW1xmt5di+LE=
=1apv
-----END PGP SIGNATURE-----
>> Visit http://mail.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