[Ttssh2-commit] [3836] マクロ実行中においても、Control - Macroメニューを選択できるようにし、該当するマクロウィンドウをアクティブ化できるようにした。

svnno****@sourc***** svnno****@sourc*****
2010年 4月 2日 (金) 00:27:55 JST


Revision: 3836
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3836
Author:   yutakapon
Date:     2010-04-02 00:27:55 +0900 (Fri, 02 Apr 2010)

Log Message:
-----------
マクロ実行中においても、Control - Macroメニューを選択できるようにし、該当するマクロウィンドウをアクティブ化できるようにした。

ただし、アクティブ化できているのは、現状「マクロウィンドウ」のみであり、マクロから起動された
statusboxなどは、アクティブ化されないため、改善が必要。
また、メニューストリングの localize 化は未対応。

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/teraterm/ttdde.c
    trunk/teraterm/teraterm/vtwin.cpp


-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2010-04-01 13:07:20 UTC (rev 3835)
+++ trunk/doc/en/html/about/history.html	2010-04-01 15:27:55 UTC (rev 3836)
@@ -30,7 +30,7 @@
 
 <h2><a name="teraterm">Tera Term</a></h2>
 
-<h3><a name="teraterm_4.66">2010.3.24 (Ver 4.66 unreleased)</a></h3>
+<h3><a name="teraterm_4.66">2010.4.2 (Ver 4.66 unreleased)</a></h3>
 <ul class="history">
   <li>Changes
     <ul>
@@ -41,7 +41,8 @@
           <li>added the "<a href="../macro/command/ymodemrecv.html">ymodemrecv</a>" macro command.</li>
           <li>added the "<a href="../macro/command/ymodemsend.html">ymodemsend</a>" macro command.</li>
         </ul></li>
-      <li>added support of VPB and HPB control sequence.</li>
+      <li>added support for the VPB and HPB control sequence.</li>
+      <li>A user can select the Macro of the Control menu while a macro is running, and the macro window is activated when the user selects the menu.</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2010-04-01 13:07:20 UTC (rev 3835)
+++ trunk/doc/ja/html/about/history.html	2010-04-01 15:27:55 UTC (rev 3836)
@@ -30,7 +30,7 @@
 
 <h2><a name="teraterm">Tera Term</a></h2>
 
-<h3><a name="teraterm_4.66">2010.3.24 (Ver 4.66 unreleased)</a></h3>
+<h3><a name="teraterm_4.66">2010.4.2 (Ver 4.66 unreleased)</a></h3>
 <ul class="history">
   <li>•ÏX
     <ul>
@@ -42,6 +42,7 @@
           <li>ƒ}ƒNƒƒRƒ}ƒ“ƒh "<a href="../macro/command/ymodemsend.html">ymodemsend</a>" ‚ð’ljÁ‚µ‚½B</li>
         </ul></li>
       <li>VPB, HPB §ŒäƒV[ƒPƒ“ƒX‚ɑΉž‚µ‚½B</li>
+      <li>ƒ}ƒNƒŽÀs’†‚É‚¨‚¢‚Ä‚àAControl - Macro ƒƒjƒ…[‚ð‘I‘ð‚Å‚«‚é‚悤‚É‚µAŠY“–‚·‚éƒ}ƒNƒƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‰»‚Å‚«‚é‚悤‚É‚µ‚½B</li>
     </ul>
   </li>
 

Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2010-04-01 13:07:20 UTC (rev 3835)
+++ trunk/teraterm/teraterm/ttdde.c	2010-04-01 15:27:55 UTC (rev 3836)
@@ -1096,7 +1096,9 @@
 
 	// Control menu‚©‚ç‚̃}ƒNƒŒÄ‚яo‚µ‚ŁA‚·‚łɃ}ƒNƒ‹N“®’†‚̏ꍇA
 	// ŠY“–‚·‚é"ttpmacro"‚ðƒtƒ‰ƒbƒVƒ…‚·‚éB
-	if (FName == NULL && Startup == FALSE && ConvH != 0) {
+	// (2010.4.2 yutaka)
+	if ((FName == NULL && Startup == FALSE) && ConvH != 0) {
+#if 0
 		HWND hwnd;
 		DWORD pid;
 
@@ -1104,12 +1106,17 @@
 		while (hwnd) {
 			GetWindowThreadProcessId(hwnd, &pid);
 			if (pid == pi.dwProcessId) {
-				BringWindowToTop(hwnd);
-				SetForegroundWindow(hwnd);
+				// TODO: 
 				break;
 			}
 			hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
 		}
+#else
+		ShowWindow(HWndDdeCli, SW_NORMAL);
+		SetForegroundWindow(HWndDdeCli);
+		BringWindowToTop(HWndDdeCli);
+		FlashWindow(HWndDdeCli, TRUE);
+#endif
 
 		return;
 	}

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2010-04-01 13:07:20 UTC (rev 3835)
+++ trunk/teraterm/teraterm/vtwin.cpp	2010-04-01 15:27:55 UTC (rev 3836)
@@ -1367,15 +1367,18 @@
 		}
 
 		if ((ConvH!=0) || (FileVar!=NULL)) {
-			// Control - Macro ƒƒjƒ…[‚Ì‘½dŒÄ‚яo‚µ‚ð‹–‰Â‚·‚é‚ɂ́A#if 1 ‚É‚·‚éB
-#if 0
-			EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_ENABLED);
+			// Control - Macro ƒƒjƒ…[‚Ì‘½dŒÄ‚яo‚µ‚ð‹–‰Â‚·‚éB
+#if 1
+			ModifyMenu(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND, ID_CONTROL_MACRO, "&Macro Running");
+			DrawMenuBar();
 #else
 			EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_GRAYED);
 #endif
 		}
 		else {
-			EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_ENABLED);
+			//EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_ENABLED);
+			ModifyMenu(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND, ID_CONTROL_MACRO, "&Macro");
+			DrawMenuBar();
 		}
 
 	}



Ttssh2-commit メーリングリストの案内