Bugzilla – Attachment 69968 Details for
Bug 153079
yast2-ncurses shows wrong colors on rxvt-unicode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
A patch to fix the palette calculation in yast2-ncurses
color-term-fix.diff (text/plain), 1.26 KB, created by
Takashi Iwai
on 2006-02-23 13:45:03 UTC
(
hide
)
Description:
A patch to fix the palette calculation in yast2-ncurses
Filename:
MIME Type:
Creator:
Takashi Iwai
Created:
2006-02-23 13:45:03 UTC
Size:
1.26 KB
patch
obsolete
>--- src/NCstyle.h-dist 2006-02-23 12:56:16.000000000 +0100 >+++ src/NCstyle.h 2006-02-23 14:30:58.000000000 +0100 >@@ -36,11 +36,13 @@ extern "C" { > // DESCRIPTION : > // > struct NCattribute { >+ static int _colors; >+ static int _pairs; > // > // available colors and color pairs > // >- inline static int colors() { return ::COLORS; } >- inline static int color_pairs() { return ::COLOR_PAIRS; } >+ inline static int colors() { return _colors; } >+ inline static int color_pairs() { return _pairs; } > // > // color pair to chtype > // >@@ -88,6 +90,10 @@ struct NCattribute { > friend class NCurses; > > static void init_colors() { >+ if ( _colors > COLOR_WHITE + 1 ) >+ _colors = COLOR_WHITE + 1; >+ if ( _pairs > _colors * _colors ) >+ _pairs = _colors * _colors; > for ( short i = 1; i < color_pairs(); ++i ) > ::init_pair( i, fg_color_pair( i ), bg_color_pair( i ) ); > } >--- src/NCstyle.cc-dist 2006-02-23 13:10:49.000000000 +0100 >+++ src/NCstyle.cc 2006-02-23 14:12:23.000000000 +0100 >@@ -28,6 +28,9 @@ > #include "NCstyle.linux.h" > #include "NCstyle.xterm.h" > >+int NCattribute::_colors = ::COLORS; >+int NCattribute::_pairs = ::COLOR_PAIRS; >+ > /////////////////////////////////////////////////////////////////// > // > // CLASS NAME : NCstyle::Style
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 153079
: 69968 |
70163
|
70166