svnno****@sourc*****
svnno****@sourc*****
2009年 6月 15日 (月) 12:20:22 JST
Revision: 3487 http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3487 Author: doda Date: 2009-06-15 12:20:22 +0900 (Mon, 15 Jun 2009) Log Message: ----------- ウィンドウタイトル報告シーケンスに対応。 Modified Paths: -------------- trunk/teraterm/teraterm/vtterm.c -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtterm.c =================================================================== --- trunk/teraterm/teraterm/vtterm.c 2009-06-15 02:55:48 UTC (rev 3486) +++ trunk/teraterm/teraterm/vtterm.c 2009-06-15 03:20:22 UTC (rev 3487) @@ -1792,7 +1792,7 @@ void CSSunSequence() /* Sun terminal private sequences */ { int x, y, len; - char Report[16]; + char Report[TitleBuffSize*2+10]; switch (Param[1]) { case 1: // De-iconify window @@ -1879,6 +1879,52 @@ SendCSIstr(Report, len); } break; + case 20: // Report icon label + if (ts.WindowFlag & WF_TITLEREPORT) { + switch (ts.AcceptTitleChangeRequest) { + case IdTitleChangeRequestOff: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "L%s", CLocale, ts.Title); + break; + case IdTitleChangeRequestAhead: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "L%s %s", CLocale, cv.TitleRemote, ts.Title); + break; + case IdTitleChangeRequestLast: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "L%s %s", CLocale, ts.Title, cv.TitleRemote); + break; + default: + if (cv.TitleRemote[0] == 0) { + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "L%s", CLocale, ts.Title); + } + else { + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "L%s", CLocale, cv.TitleRemote); + } + } + SendOSCstr(Report, len); + } + break; + case 21: // Report window title + if (ts.WindowFlag & WF_TITLEREPORT) { + switch (ts.AcceptTitleChangeRequest) { + case IdTitleChangeRequestOff: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "l%s", CLocale, ts.Title); + break; + case IdTitleChangeRequestAhead: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "l%s %s", CLocale, cv.TitleRemote, ts.Title); + break; + case IdTitleChangeRequestLast: + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "l%s %s", CLocale, ts.Title, cv.TitleRemote); + break; + default: + if (cv.TitleRemote[0] == 0) { + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "l%s", CLocale, ts.Title); + } + else { + len = _snprintf_s_l(Report, sizeof(Report), _TRUNCATE, "l%s", CLocale, cv.TitleRemote); + } + } + SendOSCstr(Report, len); + } + break; } }