Bug 153079

Summary: yast2-ncurses shows wrong colors on rxvt-unicode
Product: [openSUSE] SUSE Linux 10.1 Reporter: Takashi Iwai <tiwai>
Component: YaST2Assignee: Gabriele Mohr <gs>
Status: RESOLVED WONTFIX QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: mvidner
Version: Beta 4   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: A patch to fix the palette calculation in yast2-ncurses
The correct patch
yet another fix

Description Takashi Iwai 2006-02-23 13:44:05 UTC
yast2-ncurses displays in wrong colors when started on rxvt-unicode.  It shows all black and gray colors.

This is because rxvt-unicode has 88 colors in terminfo, and yast calculates the palette table wrongly.

The patch to fix this problem is below.
Comment 1 Takashi Iwai 2006-02-23 13:45:03 UTC
Created attachment 69968 [details]
A patch to fix the palette calculation in yast2-ncurses
Comment 2 Martin Vidner 2006-02-24 12:17:54 UTC
Unfortunately the patch breaks the colors in konsole, xterm, and rxvt. Please try differently.
Comment 3 Takashi Iwai 2006-02-24 12:26:45 UTC
Works fine on my machine on all these terminals.

Comment 4 Takashi Iwai 2006-02-24 12:35:08 UTC
Sorry, looks like I pasted a wrong patch.  The correct one is below.

Comment 5 Takashi Iwai 2006-02-24 12:35:59 UTC
Created attachment 70163 [details]
The correct patch
Comment 6 Martin Vidner 2006-02-24 12:43:30 UTC
yes, the problem with the first patch is that ::COLORS is used to initialize _colors before it is itself initialized (probably by ::init_color).
so the second patch fixes that for init_colors(), but not for colors(). IMO it can still break.
Comment 7 Takashi Iwai 2006-02-24 12:47:58 UTC
OK, another fixed patch is below.

(BTW, don't change to NEEDINFO. It's obviously a bug of yast-ncurses, and it's your job to fix this bug, not mine :)
Comment 8 Takashi Iwai 2006-02-24 12:48:57 UTC
Created attachment 70166 [details]
yet another fix
Comment 9 Martin Vidner 2006-06-06 13:32:06 UTC
Gabi is back.
If I were the maintainer, I would like to see the patch more commented. It may solve something but it certainly makes things much more confusing.
Comment 10 Gabriele Mohr 2006-06-13 07:08:08 UTC
Yes, this is my opinion too. Before the patch is applied it should be very well commented and tested. And because it is not absolutely necessary to use an rxvt-unicode terminal (an xterm is always available) I think we shouldn't change the code.