Skip to content

Commit

Permalink
Fixed bottom buttons feature for AT&T 513 and Sun Xterm modes.
Browse files Browse the repository at this point in the history
Fixed relevant help section.
Fixed application manifest for better compatibility with newer
Windows versions.
  • Loading branch information
Alexander Tokarev committed Nov 27, 2010
1 parent 1f2cd11 commit de57b55
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 144 deletions.
245 changes: 116 additions & 129 deletions tutty/trunk/config.c
Expand Up @@ -1472,135 +1472,122 @@ static void funky_handler(union control *ctrl, void *dlg,

dlg_stdradiobutton_handler(ctrl, dlg, data, event);

if (event == EVENT_VALCHANGE && cfg->funky_type == FUNKY_ATT513) {
if (dlg_yesnobox
(dlg,
"It seems you want to configure 513 terminal emulation "
"which is primarily used to manage Lucent/Avaya phone switches. "
"Do you want the terminal settings to be adjusted so they will "
"be more like Avaya Terminal Emulator's? This will change some "
"options which you can review on this and other panels.")) {
cfg->cursor_type = 0; /* block cursor */
cfg->blink_cur = TRUE; /* ...and it will blink */
cfg->bold_colour = TRUE; /* bold is different colour */
cfg->under_colour = TRUE; /* the same for underlined */
cfg->sel_colour = TRUE; /* and the same for selected */
cfg->resize_action = RESIZE_DISABLED;
cfg->height = 24;
cfg->width = 80;
cfg->savelines = 0; /* scrollback is meaningless in this case */
cfg->scrollbar = FALSE; /* so we hide scrollbar */
cfg->scroll_on_disp = FALSE;
cfg->scroll_on_key = FALSE;
cfg->erase_to_scrollback = FALSE;
cfg->scrollbar_in_fullscreen = FALSE;
cfg->bksp_is_delete = 0;
cfg->bottom_buttons = 0; /* doesn't show bottom buttons (yet) */
cfg->passive_telnet = 1; /* compatibility with c-lan telnetd */
cfg->colours[0][0] = 255;
cfg->colours[0][1] = 255;
cfg->colours[0][2] = 128;
cfg->colours[1][0] = 255;
cfg->colours[1][1] = 255;
cfg->colours[1][2] = 128;
cfg->colours[2][0] = 0;
cfg->colours[2][1] = 0;
cfg->colours[2][2] = 128;
cfg->colours[3][0] = 0;
cfg->colours[3][1] = 0;
cfg->colours[3][2] = 128;
cfg->colours[4][0] = 0;
cfg->colours[4][1] = 0;
cfg->colours[4][2] = 0;
cfg->colours[5][0] = 255;
cfg->colours[5][1] = 255;
cfg->colours[5][2] = 128;
cfg->colours[6][0] = 0;
cfg->colours[6][1] = 0;
cfg->colours[6][2] = 0;
cfg->colours[7][0] = 85;
cfg->colours[7][1] = 85;
cfg->colours[7][2] = 85;
cfg->colours[8][0] = 187;
cfg->colours[8][1] = 0;
cfg->colours[8][2] = 0;
cfg->colours[9][0] = 255;
cfg->colours[9][1] = 85;
cfg->colours[9][2] = 85;
cfg->colours[10][0] = 0;
cfg->colours[10][1] = 187;
cfg->colours[10][2] = 0;
cfg->colours[11][0] = 85;
cfg->colours[11][1] = 255;
cfg->colours[11][2] = 85;
cfg->colours[12][0] = 187;
cfg->colours[12][1] = 187;
cfg->colours[12][2] = 0;
cfg->colours[13][0] = 255;
cfg->colours[13][1] = 255;
cfg->colours[13][2] = 85;
cfg->colours[14][0] = 0;
cfg->colours[14][1] = 0;
cfg->colours[14][2] = 187;
cfg->colours[15][0] = 85;
cfg->colours[15][1] = 85;
cfg->colours[15][2] = 255;
cfg->colours[16][0] = 187;
cfg->colours[16][1] = 0;
cfg->colours[16][2] = 187;
cfg->colours[17][0] = 255;
cfg->colours[17][1] = 85;
cfg->colours[17][2] = 255;
cfg->colours[18][0] = 0;
cfg->colours[18][1] = 187;
cfg->colours[18][2] = 187;
cfg->colours[19][0] = 85;
cfg->colours[19][1] = 255;
cfg->colours[19][2] = 255;
cfg->colours[20][0] = 187;
cfg->colours[20][1] = 187;
cfg->colours[20][2] = 187;
cfg->colours[21][0] = 255;
cfg->colours[21][1] = 255;
cfg->colours[21][2] = 255;
cfg->colours[22][0] = 255;
cfg->colours[22][1] = 128;
cfg->colours[22][2] = 64;
cfg->colours[23][0] = 0;
cfg->colours[23][1] = 0;
cfg->colours[23][2] = 128;
cfg->colours[24][0] = 0;
cfg->colours[24][1] = 0;
cfg->colours[24][2] = 0;
cfg->colours[25][0] = 187;
cfg->colours[25][1] = 0;
cfg->colours[25][2] = 0;
cfg->colours[26][0] = 0;
cfg->colours[26][1] = 187;
cfg->colours[26][2] = 0;
cfg->colours[27][0] = 187;
cfg->colours[27][1] = 187;
cfg->colours[27][2] = 0;
cfg->colours[28][0] = 0;
cfg->colours[28][1] = 0;
cfg->colours[28][2] = 187;
cfg->colours[29][0] = 187;
cfg->colours[29][1] = 0;
cfg->colours[29][2] = 187;
cfg->colours[30][0] = 0;
cfg->colours[30][1] = 187;
cfg->colours[30][2] = 187;
cfg->colours[31][0] = 187;
cfg->colours[31][1] = 187;
cfg->colours[31][2] = 187;
cfg->colours[32][0] = 255;
cfg->colours[32][1] = 255;
cfg->colours[32][2] = 0;
cfg->colours[33][0] = 128;
cfg->colours[33][1] = 0;
cfg->colours[33][2] = 0;
dlg_refresh(NULL, dlg);
};
if (event == EVENT_VALCHANGE && cfg->funky_type == FUNKY_ATT513 &&
dlg_yesnobox(dlg, "It seems you want to configure 513 terminal emulation "
"which is primarily used to manage Lucent/Avaya phone switches. "
"Do you want the terminal settings to be adjusted so they will "
"be more like Avaya Terminal Emulator? This will change some "
"options that you can review on this and other panels.")) {
cfg->cursor_type = 0; /* block cursor */
cfg->blink_cur = TRUE; /* ...and it will blink */
cfg->bold_colour = TRUE; /* bold is different colour */
cfg->under_colour = TRUE; /* the same for underlined */
cfg->sel_colour = TRUE; /* and the same for selected */
cfg->resize_action = RESIZE_DISABLED;
cfg->height = 24;
cfg->width = 80;
cfg->savelines = 0; /* scrollback is meaningless in this case */
cfg->scrollbar = FALSE; /* so we hide scrollbar */
cfg->scroll_on_disp = FALSE;
cfg->scroll_on_key = FALSE;
cfg->erase_to_scrollback = FALSE;
cfg->scrollbar_in_fullscreen = FALSE;
cfg->bksp_is_delete = 0;
cfg->bottom_buttons = 0; /* this feature is probably harmless enough by now */
cfg->passive_telnet = 1; /* compatibility with c-lan telnetd */
cfg->colours[0][0] = 255; cfg->colours[0][1] = 255; cfg->colours[0][2] = 128;
cfg->colours[1][0] = 255; cfg->colours[1][1] = 255; cfg->colours[1][2] = 128;
cfg->colours[2][0] = 0; cfg->colours[2][1] = 0; cfg->colours[2][2] = 128;
cfg->colours[3][0] = 0; cfg->colours[3][1] = 0; cfg->colours[3][2] = 128;
cfg->colours[4][0] = 0; cfg->colours[4][1] = 0; cfg->colours[4][2] = 0;
cfg->colours[5][0] = 255; cfg->colours[5][1] = 255; cfg->colours[5][2] = 128;
cfg->colours[6][0] = 0; cfg->colours[6][1] = 0; cfg->colours[6][2] = 0;
cfg->colours[7][0] = 85; cfg->colours[7][1] = 85; cfg->colours[7][2] = 85;
cfg->colours[8][0] = 187; cfg->colours[8][1] = 0; cfg->colours[8][2] = 0;
cfg->colours[9][0] = 255; cfg->colours[9][1] = 85; cfg->colours[9][2] = 85;
cfg->colours[10][0] = 0; cfg->colours[10][1] = 187; cfg->colours[10][2] = 0;
cfg->colours[11][0] = 85; cfg->colours[11][1] = 255; cfg->colours[11][2] = 85;
cfg->colours[12][0] = 187; cfg->colours[12][1] = 187; cfg->colours[12][2] = 0;
cfg->colours[13][0] = 255; cfg->colours[13][1] = 255; cfg->colours[13][2] = 85;
cfg->colours[14][0] = 0; cfg->colours[14][1] = 0; cfg->colours[14][2] = 187;
cfg->colours[15][0] = 85; cfg->colours[15][1] = 85; cfg->colours[15][2] = 255;
cfg->colours[16][0] = 187; cfg->colours[16][1] = 0; cfg->colours[16][2] = 187;
cfg->colours[17][0] = 255; cfg->colours[17][1] = 85; cfg->colours[17][2] = 255;
cfg->colours[18][0] = 0; cfg->colours[18][1] = 187; cfg->colours[18][2] = 187;
cfg->colours[19][0] = 85; cfg->colours[19][1] = 255; cfg->colours[19][2] = 255;
cfg->colours[20][0] = 187; cfg->colours[20][1] = 187; cfg->colours[20][2] = 187;
cfg->colours[21][0] = 255; cfg->colours[21][1] = 255; cfg->colours[21][2] = 255;
cfg->colours[22][0] = 255; cfg->colours[22][1] = 128; cfg->colours[22][2] = 64;
cfg->colours[23][0] = 0; cfg->colours[23][1] = 0; cfg->colours[23][2] = 128;
cfg->colours[24][0] = 0; cfg->colours[24][1] = 0; cfg->colours[24][2] = 0;
cfg->colours[25][0] = 187; cfg->colours[25][1] = 0; cfg->colours[25][2] = 0;
cfg->colours[26][0] = 0; cfg->colours[26][1] = 187; cfg->colours[26][2] = 0;
cfg->colours[27][0] = 187; cfg->colours[27][1] = 187; cfg->colours[27][2] = 0;
cfg->colours[28][0] = 0; cfg->colours[28][1] = 0; cfg->colours[28][2] = 187;
cfg->colours[29][0] = 187; cfg->colours[29][1] = 0; cfg->colours[29][2] = 187;
cfg->colours[30][0] = 0; cfg->colours[30][1] = 187; cfg->colours[30][2] = 187;
cfg->colours[31][0] = 187; cfg->colours[31][1] = 187; cfg->colours[31][2] = 187;
cfg->colours[32][0] = 255; cfg->colours[32][1] = 255; cfg->colours[32][2] = 0;
cfg->colours[33][0] = 128; cfg->colours[33][1] = 0; cfg->colours[33][2] = 0;
dlg_refresh(NULL, dlg);
} else if (event == EVENT_VALCHANGE && cfg->funky_type == FUNKY_SUNXTERM &&
dlg_yesnobox(dlg, "Sun Xterm mode is primarily intended for use "
"with Avaya CMS system in terminal emulation mode. "
"Do you wish to have terminal settings adjusted for more "
"compatibility with Avaya CMS? You will be able to review "
"and revert these changes at later time, if you wish so.")) {
cfg->cursor_type = 0; /* block cursor */
cfg->blink_cur = TRUE; /* ...and it will blink */
cfg->bold_colour = FALSE; /* bold is not a different colour */
cfg->under_colour = FALSE; /* the same for underlined */
cfg->sel_colour = FALSE; /* and the same for selected */
cfg->resize_action = RESIZE_DISABLED;
cfg->height = 24;
cfg->width = 80;
cfg->savelines = 0; /* scrollback is meaningless in this case */
cfg->scrollbar = FALSE; /* so we hide scrollbar */
cfg->scroll_on_disp = FALSE;
cfg->scroll_on_key = FALSE;
cfg->erase_to_scrollback = FALSE;
cfg->scrollbar_in_fullscreen = FALSE;
cfg->bksp_is_delete = 0;
cfg->bottom_buttons = 0; /* this feature is probably harmless enough by now */
cfg->passive_telnet = 0; /* sun solaris seems to be happy with default active telnet */
cfg->colours[0][0] = 187; cfg->colours[0][1] = 187; cfg->colours[0][2] = 187;
cfg->colours[1][0] = 255; cfg->colours[1][1] = 255; cfg->colours[1][2] = 255;
cfg->colours[2][0] = 0; cfg->colours[2][1] = 0; cfg->colours[2][2] = 0;
cfg->colours[3][0] = 85; cfg->colours[3][1] = 85; cfg->colours[3][2] = 85;
cfg->colours[4][0] = 0; cfg->colours[4][1] = 0; cfg->colours[4][2] = 0;
cfg->colours[5][0] = 0; cfg->colours[5][1] = 255; cfg->colours[5][2] = 0;
cfg->colours[6][0] = 0; cfg->colours[6][1] = 0; cfg->colours[6][2] = 0;
cfg->colours[7][0] = 85; cfg->colours[7][1] = 85; cfg->colours[7][2] = 85;
cfg->colours[8][0] = 187; cfg->colours[8][1] = 0; cfg->colours[8][2] = 0;
cfg->colours[9][0] = 255; cfg->colours[9][1] = 85; cfg->colours[9][2] = 85;
cfg->colours[10][0] = 0; cfg->colours[10][1] = 187; cfg->colours[10][2] = 0;
cfg->colours[11][0] = 85; cfg->colours[11][1] = 255; cfg->colours[11][2] = 85;
cfg->colours[12][0] = 187; cfg->colours[12][1] = 187; cfg->colours[12][2] = 0;
cfg->colours[13][0] = 255; cfg->colours[13][1] = 255; cfg->colours[13][2] = 85;
cfg->colours[14][0] = 0; cfg->colours[14][1] = 0; cfg->colours[14][2] = 187;
cfg->colours[15][0] = 85; cfg->colours[15][1] = 85; cfg->colours[15][2] = 255;
cfg->colours[16][0] = 187; cfg->colours[16][1] = 0; cfg->colours[16][2] = 187;
cfg->colours[17][0] = 255; cfg->colours[17][1] = 85; cfg->colours[17][2] = 255;
cfg->colours[18][0] = 0; cfg->colours[18][1] = 187; cfg->colours[18][2] = 187;
cfg->colours[19][0] = 85; cfg->colours[19][1] = 255; cfg->colours[19][2] = 255;
cfg->colours[20][0] = 187; cfg->colours[20][1] = 187; cfg->colours[20][2] = 187;
cfg->colours[21][0] = 255; cfg->colours[21][1] = 255; cfg->colours[21][2] = 255;
cfg->colours[22][0] = 187; cfg->colours[22][1] = 187; cfg->colours[22][2] = 187;
cfg->colours[23][0] = 0; cfg->colours[23][1] = 0; cfg->colours[23][2] = 0;
cfg->colours[24][0] = 0; cfg->colours[24][1] = 0; cfg->colours[24][2] = 0;
cfg->colours[25][0] = 187; cfg->colours[25][1] = 0; cfg->colours[25][2] = 0;
cfg->colours[26][0] = 0; cfg->colours[26][1] = 187; cfg->colours[26][2] = 0;
cfg->colours[27][0] = 187; cfg->colours[27][1] = 187; cfg->colours[27][2] = 0;
cfg->colours[28][0] = 0; cfg->colours[28][1] = 0; cfg->colours[28][2] = 187;
cfg->colours[29][0] = 187; cfg->colours[29][1] = 0; cfg->colours[29][2] = 187;
cfg->colours[30][0] = 0; cfg->colours[30][1] = 187; cfg->colours[30][2] = 187;
cfg->colours[31][0] = 187; cfg->colours[31][1] = 187; cfg->colours[31][2] = 187;
cfg->colours[32][0] = 0; cfg->colours[32][1] = 0; cfg->colours[32][2] = 0;
cfg->colours[33][0] = 187; cfg->colours[33][1] = 187; cfg->colours[33][2] = 187;
dlg_refresh(NULL, dlg);
};
};

Expand Down
18 changes: 13 additions & 5 deletions tutty/trunk/doc/config.but
Expand Up @@ -634,7 +634,7 @@ through to \c{ESC [j}. With control they generate \c{ESC [k} through
to \c{ESC [v}, and with shift and control together they generate
\c{ESC [w} through to \c{ESC [\{}.

\b In AT&T 513 mode, the function keys generate default escape codes
\b In \i{AT&T 513} mode, the function keys generate default escape codes
except these:

\lcont{
Expand All @@ -649,20 +649,28 @@ except these:
\c F9 - ESC Ok
\c F10 - ESC Ol

\e{Note} that this mode was primarily intended for use with Avaya (Lucent)
\e{Note} that this mode was primarily intended to be used with Avaya (Lucent)
products: phone switches, voice mail hosts and so on, so this is not
true 513 terminal. It was hacked for specific compatibility with mentioned
hardware. Using it with any other devices may not give you expected results
and is not recommended. Therefore, TuTTY expects that you know what you're
doing and is trying to help you: when the AT&T 513 button is ticked, TuTTY
and is not recommended. TuTTY expects that you know what you're doing and is
trying to be nice with you: when the AT&T 513 button is ticked, TuTTY
will ask you whether you want to fix other settings for more compatibility
with mentioned Avaya (Lucent) products. If you ask No, nothing would happen,
with mentioned Avaya (Lucent) products. If you ask No, no changes will be made,
if you ask Yes, TuTTY will set terminal colours, telnet options and some
other settings to match this mode. You may visit other configuration pages
and review or change these settings if you wish before opening a connection
to the host.
}

\b In \i{Sun Xterm} mode, the function keys F1 to F8 generate escape sequences
compatible with specific application, namely Avaya Call Management System, that
is working in Sun Solaris environment using xterm emulation. There probably will
be no point in trying this mode with any other application or environment. In
both Sun Xterm and AT&T 513 modes, you can use helper buttons showing functional
key names and actions just below the terminal window. See \k{config-features-bottombuttons}
for more information on this feature.

If you don't know what any of this means, you probably don't need to
fiddle with it.

Expand Down
8 changes: 7 additions & 1 deletion tutty/trunk/windows/putty.mft
Expand Up @@ -8,7 +8,7 @@
<assemblyIdentity
version="0.0.0.0"
processorArchitecture="x86"
name="PuTTY"
name="TuTTY"
type="win32" />
<description>A network client and terminal emulator</description>
<dependency>
Expand All @@ -23,4 +23,10 @@
processorArchitecture="x86"/>
</dependentAssembly>
</dependency>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
</application>
</compatibility>
</assembly>
9 changes: 1 addition & 8 deletions tutty/trunk/windows/window.c
Expand Up @@ -1852,7 +1852,7 @@ static void redraw_buttons(HWND hwnd, int show)
w = cfg.funky_type == FUNKY_SUNXTERM ? font_width * 8 :
(win_width - offset_width * 2) / 8;

j = offset_width + gap;
j = cfg.funky_type == FUNKY_SUNXTERM ? offset_width : offset_width + gap;

for (i = 0; i < 4; i++) {
ShowWindow(bp.buttons[i], SW_HIDE);
Expand Down Expand Up @@ -4562,13 +4562,6 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam,
"\x1BOm", "\033f6", "\x1B[U", "\x1B[V"
};
tcode = (code >= 11 && code <= 15) ? code - 11 : code - 12;
/*
if (!cfg.bottom_buttons) {
SendMessage(bp.buttons[tcode], BM_SETSTATE, (WPARAM) TRUE, 0);
Sleep(50);
SendMessage(bp.buttons[tcode], BM_SETSTATE, (WPARAM) FALSE, 0);
};
*/
p += sprintf((char *) p, codes[tcode]);
return p - output;
};
Expand Down
2 changes: 1 addition & 1 deletion tutty/trunk/windows/winhelp.h
Expand Up @@ -39,7 +39,7 @@
#define WINHELP_CTX_features_charset "features.charset:config-features-charset"
#define WINHELP_CTX_features_arabicshaping "features.arabicshaping:config-features-shaping"
#define WINHELP_CTX_features_bidi "features.bidi:config-features-bidi"
#define WINHELP_CTX_features_bottombuttons "features.bottombuttons"
#define WINHELP_CTX_features_bottombuttons "features.bottombuttons:config-features-bottombuttons"
#define WINHELP_CTX_terminal_autowrap "terminal.autowrap:config-autowrap"
#define WINHELP_CTX_terminal_decom "terminal.decom:config-decom"
#define WINHELP_CTX_terminal_lfhascr "terminal.lfhascr:config-crlf"
Expand Down

0 comments on commit de57b55

Please sign in to comment.