svnno****@sourc*****
svnno****@sourc*****
2010年 7月 27日 (火) 23:07:14 JST
Revision: 3950 http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3950 Author: doda Date: 2010-07-27 23:07:14 +0900 (Tue, 27 Jul 2010) Log Message: ----------- 最小化されたウィンドウを対象外とした、次/前のウィンドウを表示するショートカットキー NextShownWin/PrevShownWin を追加。 Modified Paths: -------------- trunk/teraterm/common/ttcommon.h trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/ttpcmn/ttcmn.c trunk/teraterm/ttpcmn/ttpcmn.def trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/teraterm/common/ttcommon.h =================================================================== --- trunk/teraterm/common/ttcommon.h 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/common/ttcommon.h 2010-07-27 14:07:14 UTC (rev 3950) @@ -32,6 +32,7 @@ void FAR PASCAL SetWinList(HWND HWin, HWND HDlg, int IList); void FAR PASCAL SelectWin(int WinId); void FAR PASCAL SelectNextWin(HWND HWin, int Next); +void FAR PASCAL SelectNextShownWin(HWND HWin, int Next); HWND FAR PASCAL GetNthWin(int n); int FAR PASCAL CommReadRawByte(PComVar cv, LPBYTE b); Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/common/tttypes.h 2010-07-27 14:07:14 UTC (rev 3950) @@ -695,9 +695,11 @@ #define IdCmdBuffBottom 82 #define IdCmdNextWin 83 #define IdCmdPrevWin 84 -#define IdCmdLocalEcho 85 -#define IdScrollLock 86 -#define IdUser1 87 +#define IdCmdNextSWin 85 +#define IdCmdPrevSWin 86 +#define IdCmdLocalEcho 87 +#define IdScrollLock 88 +#define IdUser1 89 #define NumOfUDK IdUDK20-IdUDK6+1 #define NumOfUserKey 99 #define IdKeyMax IdUser1+NumOfUserKey-1 Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/teraterm/vtwin.cpp 2010-07-27 14:07:14 UTC (rev 3950) @@ -2997,6 +2997,12 @@ case IdCmdPrevWin: SelectNextWin(HVTWin,-1); break; + case IdCmdNextSWin: + SelectNextShownWin(HVTWin,1); + break; + case IdCmdPrevSWin: + SelectNextShownWin(HVTWin,-1); + break; case IdCmdLocalEcho: if (ts.LocalEcho==0) { ts.LocalEcho = 1; Modified: trunk/teraterm/ttpcmn/ttcmn.c =================================================================== --- trunk/teraterm/ttpcmn/ttcmn.c 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/ttpcmn/ttcmn.c 2010-07-27 14:07:14 UTC (rev 3950) @@ -732,6 +732,8 @@ case IdCmdBuffBottom: case IdCmdNextWin: case IdCmdPrevWin: + case IdCmdNextSWin: + case IdCmdPrevSWin: case IdCmdLocalEcho: case IdScrollLock: PostMessage(HWin,WM_USER_ACCELCOMMAND,KeyCode,0); @@ -927,6 +929,35 @@ SelectWin(i); } +void FAR PASCAL SelectNextShownWin(HWND HWin, int Next) +{ + int i; + + i = 0; + while ((i < pm->NWin) && (pm->WinList[i]!=HWin)) { + i++; + } + if (pm->WinList[i]!=HWin) { + return; + } + + do { + i += Next; + if (i >= pm->NWin) { + i = 0; + } + else if (i < 0) { + i = pm->NWin-1; + } + + if (pm->WinList[i] == HWin) { + return; + } + } while (IsIconic(pm->WinList[i])); + + SelectWin(i); +} + HWND FAR PASCAL GetNthWin(int n) { if (n<pm->NWin) { Modified: trunk/teraterm/ttpcmn/ttpcmn.def =================================================================== --- trunk/teraterm/ttpcmn/ttpcmn.def 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/ttpcmn/ttpcmn.def 2010-07-27 14:07:14 UTC (rev 3950) @@ -13,6 +13,7 @@ SetWinList @13 SelectWin @14 SelectNextWin @15 + SelectNextShownWin @54 GetNthWin @16 CommReadRawByte @20 CommInsert1Byte @21 Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2010-07-26 10:04:50 UTC (rev 3949) +++ trunk/teraterm/ttpset/ttset.c 2010-07-27 14:07:14 UTC (rev 3950) @@ -2570,6 +2570,10 @@ GetInt(KeyMap, IdCmdPrevWin, ShortCut, "PrevWin", FName); + GetInt(KeyMap, IdCmdNextSWin, ShortCut, "NextShownWin", FName); + + GetInt(KeyMap, IdCmdPrevSWin, ShortCut, "PrevShownWin", FName); + GetInt(KeyMap, IdCmdLocalEcho, ShortCut, "LocalEcho", FName); GetInt(KeyMap, IdScrollLock, ShortCut, "ScrollLock", FName);