Bug 81834 - Command-line options -bg and -fg should be removed from the --help screens and return an "Unknown option" message seeing as they are not functional
Summary: Command-line options -bg and -fg should be removed from the --help screens an...
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: RedHat Enterprise Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-19 01:22 UTC by Jon Koehn
Modified: 2005-01-27 09:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Error message for --fore/background options. (774 bytes, patch)
2004-05-19 07:53 UTC, Kurt Hindenburg
Details
patch to dis-allow --back/foreground options. (874 bytes, patch)
2004-05-19 08:30 UTC, Kurt Hindenburg
Details
Give warning upon --fore/background (785 bytes, patch)
2004-05-28 19:31 UTC, Kurt Hindenburg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Koehn 2004-05-19 01:22:31 UTC
Version:           v1.3.2 (using KDE KDE 3.2.2)
Installed from:    RedHat RPMs
OS:                Linux

Konsole --help shows the Qt command-line options -fg (foreground color) and -bg (background color) as viable konsole options. I've seen the other bug reports requesting that these options be made available (which would be very helpful) with responses that they will not be added, seeing as the -schema option has been made available. I would like to see the references to -fg and -bg removed from the --help screens and the standard "Unknown option" message appear if these options are used. I spent 6 hours (!) trying to figure out what I was doing wrong trying to get these options to work! Turns out it wasn't me.
Comment 1 Kurt Hindenburg 2004-05-19 07:53:13 UTC
Created attachment 6052 [details]
Error message for --fore/background options.

Rather simple.	Perhaps the error message might need changing...

I'll have to look at how parsedArgs("qt") works.  Not sure if it is
possible to remove the --fore/background from the help-qt menu.
Comment 2 Kurt Hindenburg 2004-05-19 08:09:00 UTC
The patch in comment #1 should likely just be a stop-gap measure.  It is better than nothing, but unlikely the best way to do it.
Comment 3 Kurt Hindenburg 2004-05-19 08:30:52 UTC
Created attachment 6053 [details]
patch to dis-allow --back/foreground options.

Move the if checks after calling parseArgs("qt"); uses usage instead of printf.


It would still be better to remove the --back/foreground from the qt options.
Comment 4 Waldo Bastian 2004-05-25 22:42:24 UTC
-bg / -fg doesn't seem to be doing anything at all in any KDE application,
It could basically be removed from --help-qt, but for backwards compatibility the option should not give an error.
Comment 5 Kurt Hindenburg 2004-05-26 06:37:28 UTC
I tried removing all qt/kde options from the command line.  konsole only uses 3 qt options.  However, I had to patch kcmdlinesargs.cpp in order to get it to work.  I'm waiting on feedback for that patch on http://bugs.kde.org/show_bug.cgi?id=82195.

I have another patch for konsole which cleans up the help/cmdlines if 82195 get applied.
Comment 6 Kurt Hindenburg 2004-05-28 19:31:45 UTC
Created attachment 6160 [details]
Give warning upon --fore/background

This give a warning if --fore/background are given on the command-line.
Comment 7 Kurt Hindenburg 2005-01-27 06:48:37 UTC
CVS commit by hindenburg: 

BUG: 81834.  Add warnings about Qt options that are ignored.


  M +10 -0     main.cpp   1.283


--- kdebase/konsole/konsole/main.cpp  #1.282:1.283
@@ -228,4 +228,14 @@ extern "C" int KDE_EXPORT kdemain(int ar
   TEWidget::setStandalone( true );
 
+  // The following Qt options have no effect; warn users.
+  if( qtargs->isSet("background") )
+      kdWarning() << "The Qt option -bg, --background has no effect." << endl;
+  if( qtargs->isSet("foreground") )
+      kdWarning() << "The Qt option -fg, --foreground has no effect." << endl;
+  if( qtargs->isSet("button") )
+      kdWarning() << "The Qt option -btn, --button has no effect." << endl;
+  if( qtargs->isSet("font") )
+      kdWarning() << "The Qt option -fn, --font has no effect." << endl;
+
 #ifdef COMPOSITE
   char *display = 0;


Comment 8 Waldo Bastian 2005-01-27 09:56:07 UTC
I don't get the impression that these options work in *any* KDE application.

Cheers,
Waldo

On Thursday 27 January 2005 06:48, Kurt V.Hindenburg wrote:
> ------- You are receiving this mail because: -------
> You are the assignee for the bug, or are watching the assignee.
>
> http://bugs.kde.org/show_bug.cgi?id=81834
> kurt.hindenburg kdemail net changed:
>
>            What    |Removed                     |Added
> ---------------------------------------------------------------------------
>- Status|UNCONFIRMED                 |RESOLVED
>          Resolution|                            |FIXED
>
>
>
> ------- Additional Comments From kurt.hindenburg kdemail net  2005-01-27
> 06:48 ------- CVS commit by hindenburg:
>
> BUG: 81834.  Add warnings about Qt options that are ignored.
>
>
>   M +10 -0     main.cpp   1.283
>
>
> --- kdebase/konsole/konsole/main.cpp  #1.282:1.283
>  @ -228,4 +228,14  @ extern "C" int KDE_EXPORT kdemain(int ar
>    TEWidget::setStandalone( true );
>
> +  // The following Qt options have no effect; warn users.
> +  if( qtargs->isSet("background") )
> +      kdWarning() << "The Qt option -bg, --background has no effect." <<
> endl; +  if( qtargs->isSet("foreground") )
> +      kdWarning() << "The Qt option -fg, --foreground has no effect." <<
> endl; +  if( qtargs->isSet("button") )
> +      kdWarning() << "The Qt option -btn, --button has no effect." <<
> endl; +  if( qtargs->isSet("font") )
> +      kdWarning() << "The Qt option -fn, --font has no effect." << endl;
> +
>  #ifdef COMPOSITE
>    char *display = 0;
> _______________________________________________
> konsole-devel mailing list
> konsole-devel@kde.org
> https://mail.kde.org/mailman/listinfo/konsole-devel