Author: kmachalkova Date: Thu Jun 14 16:52:25 2007 New Revision: 38466 URL: http://svn.opensuse.org/viewcvs/yast?rev=38466&view=rev Log: - Use environment variable Y2NCURSES_COLOR_THEME to set color theme of UI (FaTE #301893) Modified: trunk/ncurses/src/NCstyle.cc Modified: trunk/ncurses/src/NCstyle.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCstyle.cc?rev=38466&r1=38465&r2=38466&view=diff ============================================================================== --- trunk/ncurses/src/NCstyle.cc (original) +++ trunk/ncurses/src/NCstyle.cc Thu Jun 14 16:52:25 2007 @@ -304,17 +304,25 @@ , styleSet( MaxStyleSet ) , fakestyle_e( MaxStyleSet ) { - if ( NCattribute::colors() ) { - if ( getenv( "Y2_BRAILLE" ) != NULL ) { - styleName = "braille"; - } else { - if ( term_t == "xterm" ) - styleName = "xterm"; - else if ( ! fnmatch("rxvt*", term_t.c_str(), 0)) - styleName = "rxvt"; - } - } else { - styleName = "mono"; + char *user_defined_style = getenv( "Y2NCURSES_COLOR_THEME" ); + + if ( user_defined_style && *user_defined_style ) { + styleName = user_defined_style; + UIMIL << "User-defined style found: " << styleName.c_str() << endl; + } + else { + if ( NCattribute::colors() ) { + if ( getenv( "Y2_BRAILLE" ) != NULL ) { + styleName = "braille"; + } else { + if ( term_t == "xterm" ) + styleName = "xterm"; + else if ( ! fnmatch("rxvt*", term_t.c_str(), 0)) + styleName = "rxvt"; + } + } else { + styleName = "mono"; + } } UIMIL << "Init " << term_t << " using " << (NCattribute::colors() ? "color" : "bw" ) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org