From kde-devel Sun Sep 28 20:45:24 2003 From: Adriaan de Groot Date: Sun, 28 Sep 2003 20:45:24 +0000 To: kde-devel Subject: Re: Can't add certain cmdline-option X-MARC-Message: https://marc.info/?l=kde-devel&m=106478208324406 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 If the door is ajar, can we fill it with door-jamb? >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<