Increase speed on cygwin terminals
This commit is contained in:
parent
082bbfbaa2
commit
5530c99d22
|
@ -1,4 +1,5 @@
|
||||||
2016-11-20 Markus Gans <guru.mail@muenster.de>
|
2016-11-20 Markus Gans <guru.mail@muenster.de>
|
||||||
|
* Increase speed on cygwin terminals
|
||||||
* Improve tty settings
|
* Improve tty settings
|
||||||
|
|
||||||
2016-11-13 Markus Gans <guru.mail@muenster.de>
|
2016-11-13 Markus Gans <guru.mail@muenster.de>
|
||||||
|
|
|
@ -647,7 +647,7 @@ void FButton::draw()
|
||||||
setColor (button_fg, button_bg);
|
setColor (button_fg, button_bg);
|
||||||
|
|
||||||
for (x=0; x < i; x++)
|
for (x=0; x < i; x++)
|
||||||
print (space); // █
|
print (space); // █
|
||||||
|
|
||||||
if ( hotkeypos == -1 )
|
if ( hotkeypos == -1 )
|
||||||
setCursorPos (1+margin+i+mono_1st_char, 1+j ); // first character
|
setCursorPos (1+margin+i+mono_1st_char, 1+j ); // first character
|
||||||
|
|
|
@ -1310,6 +1310,8 @@ void FMenu::drawItems()
|
||||||
{
|
{
|
||||||
if ( isNewFont() )
|
if ( isNewFont() )
|
||||||
print (fc::NF_Bullet); // NF_Bullet ●
|
print (fc::NF_Bullet); // NF_Bullet ●
|
||||||
|
else if ( isCygwinTerminal() )
|
||||||
|
print (0x04);
|
||||||
else
|
else
|
||||||
print (fc::Bullet); // Bullet ●
|
print (fc::Bullet); // Bullet ●
|
||||||
}
|
}
|
||||||
|
|
|
@ -513,6 +513,14 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
||||||
if ( ! ( switchOn() || switchOff() || colorChange(term, next) ) )
|
if ( ! ( switchOn() || switchOff() || colorChange(term, next) ) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if ( cygwin_terminal && (term->fg_color > 7 || term->bg_color > 7) )
|
||||||
|
{
|
||||||
|
// reset blink and bold mode from colors > 7
|
||||||
|
char* rst = const_cast<char*>(CSI "m");
|
||||||
|
append_sequence (rst);
|
||||||
|
reset(term);
|
||||||
|
}
|
||||||
|
|
||||||
if ( hasNoAttribute(next) )
|
if ( hasNoAttribute(next) )
|
||||||
{
|
{
|
||||||
if ( off.pc_charset )
|
if ( off.pc_charset )
|
||||||
|
@ -607,7 +615,7 @@ char* FOptiAttr::changeAttribute (char_data*& term, char_data*& next)
|
||||||
setTermReverse(term);
|
setTermReverse(term);
|
||||||
|
|
||||||
if ( next->standout )
|
if ( next->standout )
|
||||||
setTermStandout(term);
|
setTermStandout(term);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1346,36 +1354,11 @@ void FOptiAttr::change_color (char_data*& term, char_data*& next)
|
||||||
short ansi_fg = vga2ansi(fg);
|
short ansi_fg = vga2ansi(fg);
|
||||||
short ansi_bg = vga2ansi(bg);
|
short ansi_bg = vga2ansi(bg);
|
||||||
|
|
||||||
if ( cygwin_terminal )
|
if ( term->fg_color != fg && (color_str = tparm(AF, ansi_fg)) )
|
||||||
{
|
append_sequence (color_str);
|
||||||
// reset blink and bold mode from colors > 7
|
|
||||||
char* rst = const_cast<char*>(CSI "m");
|
|
||||||
append_sequence (rst);
|
|
||||||
reset(term);
|
|
||||||
|
|
||||||
if ( ansi_fg != Default )
|
if ( term->bg_color != bg && (color_str = tparm(AB, ansi_bg)) )
|
||||||
{
|
append_sequence (color_str);
|
||||||
color_str = tparm(AF, ansi_fg);
|
|
||||||
|
|
||||||
if ( color_str )
|
|
||||||
append_sequence (color_str);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ansi_bg != Default )
|
|
||||||
{
|
|
||||||
color_str = tparm(AB, ansi_bg);
|
|
||||||
if ( color_str )
|
|
||||||
append_sequence (color_str);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( term->fg_color != fg && (color_str = tparm(AF, ansi_fg)) )
|
|
||||||
append_sequence (color_str);
|
|
||||||
|
|
||||||
if ( term->bg_color != bg && (color_str = tparm(AB, ansi_bg)) )
|
|
||||||
append_sequence (color_str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( Sf && Sb )
|
else if ( Sf && Sb )
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,10 @@ void FRadioButton::drawRadioButton()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ('(');
|
print ('(');
|
||||||
print (fc::Bullet); // Bullet ●
|
if ( isCygwinTerminal() )
|
||||||
|
print (0x04);
|
||||||
|
else
|
||||||
|
print (fc::Bullet); // Bullet ●
|
||||||
print (')');
|
print (')');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2667,6 +2667,13 @@ void FTerm::init_termcaps()
|
||||||
|
|
||||||
tcap[fc::t_orig_pair].string = \
|
tcap[fc::t_orig_pair].string = \
|
||||||
const_cast<char*>(CSI "39;49;25m");
|
const_cast<char*>(CSI "39;49;25m");
|
||||||
|
|
||||||
|
// avoid dim + underline
|
||||||
|
tcap[fc::t_enter_dim_mode].string = 0;
|
||||||
|
tcap[fc::t_exit_dim_mode].string = 0;
|
||||||
|
tcap[fc::t_enter_underline_mode].string = 0;
|
||||||
|
tcap[fc::t_exit_underline_mode].string = 0;
|
||||||
|
FTermcap::attr_without_color = 18;
|
||||||
}
|
}
|
||||||
else if ( rxvt_terminal && ! urxvt_terminal )
|
else if ( rxvt_terminal && ! urxvt_terminal )
|
||||||
{
|
{
|
||||||
|
|
|
@ -213,6 +213,7 @@ Window::Window (FWidget* parent)
|
||||||
: FDialog(parent)
|
: FDialog(parent)
|
||||||
, windows()
|
, windows()
|
||||||
{
|
{
|
||||||
|
FString drop_down_symbol;
|
||||||
// menu bar
|
// menu bar
|
||||||
FMenuBar* Menubar = new FMenuBar (this);
|
FMenuBar* Menubar = new FMenuBar (this);
|
||||||
|
|
||||||
|
@ -221,7 +222,11 @@ Window::Window (FWidget* parent)
|
||||||
File->setStatusbarMessage ("File management commands");
|
File->setStatusbarMessage ("File management commands");
|
||||||
|
|
||||||
// dialog list menu item
|
// dialog list menu item
|
||||||
FString drop_down_symbol = wchar_t(fc::BlackDownPointingTriangle);
|
if ( isCygwinTerminal() )
|
||||||
|
drop_down_symbol = 'v';
|
||||||
|
else
|
||||||
|
drop_down_symbol = wchar_t(fc::BlackDownPointingTriangle);
|
||||||
|
|
||||||
FDialogListMenu* DglList = new FDialogListMenu (drop_down_symbol, Menubar);
|
FDialogListMenu* DglList = new FDialogListMenu (drop_down_symbol, Menubar);
|
||||||
DglList->setStatusbarMessage ("List of all the active dialogs");
|
DglList->setStatusbarMessage ("List of all the active dialogs");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue