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

List:       kde-devel
Subject:    Re: external function in a KCModule
From:       Frans Englich <frans.englich () telia ! com>
Date:       2005-01-09 21:56:57
Message-ID: 200501092156.58856.frans.englich () telia ! com
[Download RAW message or body]

On Tuesday 21 December 2004 09:39, Stefan Kombrink wrote:
> Hi,
>
>   I'm writing a kcm and I heared something about an external function one
> could provide to check whether the module should be hidden or displayed in
> the kcontrol center.

Yes, modules which has a test function that returns false, are not shown in 
kcmshell or KCMultiDialogs(application configuration dialogs) -- but they are 
still shown in KControl. The reason to that KControl doesn't test modules is 
it would require heavy surgery(would introduce tons of bugs), and that it's 
decided to not alter KControl usability wise during 3.x. KDE 4 will have it 
though. kdenonbeta/kcontrol4 implements it if you want to test, but kcmshell 
works fine too, excluding any possible bugs..

The api docs for KCModuleLoader::testModule() has the details, see 
kdelibs/kutils/kcmoduleloader.h. I'll write more extensive documentation at 
some point, feel free to contact me privately in case you have any questions 
or find bugs(the code could certainly be more tested).

>
> I assume the .desktop file needs an appropriate entry - does anybody know
> about it?

(yes, X-KDE-Test-Module=true)


Cheers,

		Frans


PS. Sorry for the late reply.
 
>> 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