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

List:       kde-devel
Subject:    Re: Can't add certain cmdline-option
From:       Adriaan de Groot <adridg () cs ! kun ! nl>
Date:       2003-09-28 20:45:24
[Download RAW message or body]

On Sunday 28 September 2003 22:29, Christian Nitschkowski wrote:
> static KCmdLineOptions options[] =
>     {
>        { "autostart", I18N_NOOP( "Try to start an autostart-instance." ), 0
> }, { "splash", I18N_NOOP( "Show the splash" ), 0 },
>        { "nosplash", I18N_NOOP( "Don't show the splash" ), 0 },
>        { 0, 0, 0 }
>     };

> This is rather strange, because this only happens when I add an option that
> is named "nosplash" or "no-splash".

Boolean-valued options indicate their default value in the KCmdLineOptions 
table, and you ask for the version without the "no". In other words, just 
include the one line with "splash", and you get two command-line arguments 
for free:

	--splash
and	--nosplash

when asking for the value passed on the command line, ask isSet("splash"). If 
you want to default to no splash, give the argument the name "nosplash".

Maybe it's the other way around, "splash" says default to no, "nosplash" says 
default to yes. You'll have to experiment.

Or read the KCmdLineOptions header file more carefully :)

-- 
pub  1024D/FEA2A3FE 2002-06-18 Adriaan de Groot <groot@kde.org>
            If the door is ajar, can we fill it with door-jamb?

 
>> 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