[Ttssh2-commit] [3837] すでに実行中のマクロウィンドウを、分かりやすくフラッシュするために、新規に Control - Show Macro Window

svnno****@sourc***** svnno****@sourc*****
2010年 4月 4日 (日) 00:39:43 JST


Revision: 3837
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=3837
Author:   yutakapon
Date:     2010-04-04 00:39:39 +0900 (Sun, 04 Apr 2010)

Log Message:
-----------
すでに実行中のマクロウィンドウを、分かりやすくフラッシュするために、新規に Control - Show Macro Window 
メニューを追加した。
また、マクロから起動された statusbox なども明確にするために、フラッシュするようにした。

Modified Paths:
--------------
    trunk/teraterm/common/tt_res.h
    trunk/teraterm/teraterm/ttdde.c
    trunk/teraterm/teraterm/ttermpro.rc
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/teraterm/vtwin.h


-------------- next part --------------
Modified: trunk/teraterm/common/tt_res.h
===================================================================
--- trunk/teraterm/common/tt_res.h	2010-04-01 15:27:55 UTC (rev 3836)
+++ trunk/teraterm/common/tt_res.h	2010-04-03 15:39:39 UTC (rev 3837)
@@ -228,6 +228,7 @@
 #define ID_TEKHELP_ABOUT                51990
 #define ID_EDIT_EXTERNALSETUP           52005
 #define ID_FILE_TERATERMMENU            52006
+#define ID_SHOW_MACRO                   52030
 
 // Next default values for new objects
 // 
@@ -235,7 +236,7 @@
 #ifndef APSTUDIO_READONLY_SYMBOLS
 #define _APS_NO_MFC                     1
 #define _APS_NEXT_RESOURCE_VALUE        122
-#define _APS_NEXT_COMMAND_VALUE         52030
+#define _APS_NEXT_COMMAND_VALUE         52031
 #define _APS_NEXT_CONTROL_VALUE         2524
 #define _APS_NEXT_SYMED_VALUE           101
 #endif

Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2010-04-01 15:27:55 UTC (rev 3836)
+++ trunk/teraterm/teraterm/ttdde.c	2010-04-03 15:39:39 UTC (rev 3837)
@@ -1088,7 +1088,7 @@
 //		  In this case, the connection to the host will
 //		  made after the link to TT(P)MACRO is established.
 {
-	static PROCESS_INFORMATION pi;
+	PROCESS_INFORMATION pi;
 	int i;
 	char Cmnd[MAXPATHLEN+40];
 	STARTUPINFO si;
@@ -1096,18 +1096,18 @@
 
 	// Control menu‚©‚ç‚̃}ƒNƒŒÄ‚яo‚µ‚ŁA‚·‚łɃ}ƒNƒ‹N“®’†‚̏ꍇA
 	// ŠY“–‚·‚é"ttpmacro"‚ðƒtƒ‰ƒbƒVƒ…‚·‚éB
-	// (2010.4.2 yutaka)
+	// (2010.4.2 yutaka, maya)
 	if ((FName == NULL && Startup == FALSE) && ConvH != 0) {
-#if 0
+#if 1
 		HWND hwnd;
-		DWORD pid;
+		DWORD pid_macro, pid;
 
+		GetWindowThreadProcessId(HWndDdeCli, &pid_macro);
 		hwnd = GetTopWindow(NULL);
 		while (hwnd) {
 			GetWindowThreadProcessId(hwnd, &pid);
-			if (pid == pi.dwProcessId) {
-				// TODO: 
-				break;
+			if (pid == pid_macro) {
+				FlashWindow(hwnd, TRUE);
 			}
 			hwnd = GetNextWindow(hwnd, GW_HWNDNEXT);
 		}

Modified: trunk/teraterm/teraterm/ttermpro.rc
===================================================================
--- trunk/teraterm/teraterm/ttermpro.rc	2010-04-01 15:27:55 UTC (rev 3836)
+++ trunk/teraterm/teraterm/ttermpro.rc	2010-04-03 15:39:39 UTC (rev 3837)
@@ -520,6 +520,7 @@
         MENUITEM "&Open TEK",                   ID_CONTROL_OPENTEK
         MENUITEM "&Close TEK",                  ID_CONTROL_CLOSETEK
         MENUITEM SEPARATOR
+        MENUITEM "Show Macro &Window",          52030, GRAYED
         MENUITEM "&Macro",                      ID_CONTROL_MACRO
     END
     POPUP "&Help"

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2010-04-01 15:27:55 UTC (rev 3836)
+++ trunk/teraterm/teraterm/vtwin.cpp	2010-04-03 15:39:39 UTC (rev 3837)
@@ -203,6 +203,7 @@
 	ON_COMMAND(ID_CONTROL_OPENTEK, OnControlOpenTEK)
 	ON_COMMAND(ID_CONTROL_CLOSETEK, OnControlCloseTEK)
 	ON_COMMAND(ID_CONTROL_MACRO, OnControlMacro)
+	ON_COMMAND(ID_SHOW_MACRO, OnShowMacroWindow)
 	ON_COMMAND(ID_WINDOW_WINDOW, OnWindowWindow)
 	ON_COMMAND(ID_HELP_INDEX2, OnHelpIndex)
 	ON_COMMAND(ID_HELP_ABOUT, OnHelpAbout)
@@ -1367,18 +1368,12 @@
 		}
 
 		if ((ConvH!=0) || (FileVar!=NULL)) {
-			// 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
+			EnableMenuItem(ControlMenu,ID_SHOW_MACRO,MF_BYCOMMAND | MF_ENABLED);
 		}
 		else {
-			//EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_ENABLED);
-			ModifyMenu(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND, ID_CONTROL_MACRO, "&Macro");
-			DrawMenuBar();
+			EnableMenuItem(ControlMenu,ID_CONTROL_MACRO,MF_BYCOMMAND | MF_ENABLED);
+			EnableMenuItem(ControlMenu,ID_SHOW_MACRO,MF_BYCOMMAND | MF_GRAYED);
 		}
 
 	}
@@ -5068,6 +5063,11 @@
 	RunMacro(NULL,FALSE);
 }
 
+void CVTWindow::OnShowMacroWindow()
+{
+	RunMacro(NULL,FALSE);
+}
+
 void CVTWindow::OnWindowWindow()
 {
 	BOOL Close;

Modified: trunk/teraterm/teraterm/vtwin.h
===================================================================
--- trunk/teraterm/teraterm/vtwin.h	2010-04-01 15:27:55 UTC (rev 3836)
+++ trunk/teraterm/teraterm/vtwin.h	2010-04-03 15:39:39 UTC (rev 3837)
@@ -169,6 +169,7 @@
 	afx_msg void OnControlOpenTEK();
 	afx_msg void OnControlCloseTEK();
 	afx_msg void OnControlMacro();
+	afx_msg void OnShowMacroWindow();
 	afx_msg void OnWindowWindow();
 	afx_msg void OnHelpIndex();
 	afx_msg void OnHelpUsing();



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