Bug 153079 - yast2-ncurses shows wrong colors on rxvt-unicode
Summary: yast2-ncurses shows wrong colors on rxvt-unicode
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Beta 4
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Gabriele Mohr
QA Contact: Klaus Kämpf
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 13:44 UTC by Takashi Iwai
Modified: 2006-06-13 07:08 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
A patch to fix the palette calculation in yast2-ncurses (1.26 KB, patch)
2006-02-23 13:45 UTC, Takashi Iwai
Details | Diff
The correct patch (1.32 KB, patch)
2006-02-24 12:35 UTC, Takashi Iwai
Details | Diff
yet another fix (1.36 KB, patch)
2006-02-24 12:48 UTC, Takashi Iwai
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.