1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 20:12:48 -05:00

Add ability to configure the initial window title

[originally from svn r661]
This commit is contained in:
Simon Tatham
2000-10-02 12:24:58 +00:00
parent 4a2ea18a51
commit 7fc8ef792f
6 changed files with 115 additions and 58 deletions

View File

@ -415,7 +415,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
*/
{
char *error;
char msg[1024];
char msg[1024], *title;
char *realhost;
error = back->init (hwnd, cfg.host, cfg.port, &realhost);
@ -425,9 +425,14 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) {
return 0;
}
window_name = icon_name = NULL;
sprintf(msg, "%s - PuTTY", realhost);
set_title (msg);
set_icon (msg);
if (*cfg.wintitle) {
title = cfg.wintitle;
} else {
sprintf(msg, "%s - PuTTY", realhost);
title = msg;
}
set_title (title);
set_icon (title);
}
session_closed = FALSE;