[Ttssh2-commit] [5809] チケット #34943 設定フォルダを開く

svnno****@sourc***** svnno****@sourc*****
2015年 3月 1日 (日) 01:35:59 JST


Revision: 5809
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5809
Author:   yutakapon
Date:     2015-03-01 01:35:58 +0900 (Sun, 01 Mar 2015)
Log Message:
-----------
チケット #34943 設定フォルダを開く

設定 - 設定フォルダメニューを追加した。

teraterm.ini ファイルを読み込んでいるパスを、エクスプローラで開く。
#Virtual Storeには未対策。

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/34943

Modified Paths:
--------------
    trunk/doc/en/html/reference/keycode.txt
    trunk/doc/ja/html/reference/keycode.txt
    trunk/installer/release/lang/English.lng
    trunk/installer/release/lang/French.lng
    trunk/installer/release/lang/German.lng
    trunk/installer/release/lang/Japanese.lng
    trunk/installer/release/lang/Korean.lng
    trunk/installer/release/lang/Russian.lng
    trunk/installer/release/lang/Simplified Chinese.lng
    trunk/installer/release/lang/Traditional Chinese.lng
    trunk/teraterm/common/tt_res.h
    trunk/teraterm/teraterm/ttermpro.rc
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/teraterm/vtwin.h

-------------- next part --------------
Modified: trunk/doc/en/html/reference/keycode.txt
===================================================================
--- trunk/doc/en/html/reference/keycode.txt	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/doc/en/html/reference/keycode.txt	2015-02-28 16:35:58 UTC (rev 5809)
@@ -420,6 +420,7 @@
 [Setup] Additional settings         50375
 [Setup] Save setup                  50380
 [Setup] Restore setup               50390
+[Setup] Setup directory             50391
 [Setup] Load key map                50395
 [Control] Reset terminal            50410
 [Control] Are you there             50420

Modified: trunk/doc/ja/html/reference/keycode.txt
===================================================================
--- trunk/doc/ja/html/reference/keycode.txt	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/doc/ja/html/reference/keycode.txt	2015-02-28 16:35:58 UTC (rev 5809)
@@ -430,6 +430,7 @@
 [Setup] Additional settings         50375
 [Setup] Save setup                  50380
 [Setup] Restore setup               50390
+[Setup] Setup directory             50391
 [Setup] Load key map                50395
 [Control] Reset terminal            50410
 [Control] Are you there             50420

Modified: trunk/installer/release/lang/English.lng
===================================================================
--- trunk/installer/release/lang/English.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/English.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -59,6 +59,7 @@
 MENU_SETUP_ADDITION=A&dditional settings...
 MENU_SETUP_SAVE=&Save setup...
 MENU_SETUP_RESTORE=&Restore setup...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=&Load key map...
 
 MENU_CONTROL=C&ontrol

Modified: trunk/installer/release/lang/French.lng
===================================================================
--- trunk/installer/release/lang/French.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/French.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=Plus de reglages...
 MENU_SETUP_SAVE=&Sauvegarder setup...
 MENU_SETUP_RESTORE=&Restaurer setup...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=Charger jeu de touches...
 
 MENU_CONTROL=C&ontr\xF4le

Modified: trunk/installer/release/lang/German.lng
===================================================================
--- trunk/installer/release/lang/German.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/German.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=&Erweiterte Einstellungen
 MENU_SETUP_SAVE=&Setup sichern
 MENU_SETUP_RESTORE=&Setup laden
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=&Keyboard-Layout einstellen
 
 MENU_CONTROL=Ste&uerung

Modified: trunk/installer/release/lang/Japanese.lng
===================================================================
--- trunk/installer/release/lang/Japanese.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/Japanese.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -59,6 +59,7 @@
 MENU_SETUP_ADDITION=\x82\xBB\x82̑\xBC\x82̐ݒ\xE8(&D)...
 MENU_SETUP_SAVE=\x90ݒ\xE8\x82̕ۑ\xB6(&S)...
 MENU_SETUP_RESTORE=\x90ݒ\xE8\x82̓ǂݍ\x9E\x82\xDD(&R)...
+MENU_OPEN_SETUP=\x90ݒ\xE8\x83t\x83H\x83\x8B\x83_(&I)..
 MENU_SETUP_LOADKEYMAP=\x83L\x81[\x83}\x83b\x83v\x93ǂݍ\x9E\x82\xDD(&L)...
 
 MENU_CONTROL=\x83R\x83\x93\x83g\x83\x8D\x81[\x83\x8B(&O)

Modified: trunk/installer/release/lang/Korean.lng
===================================================================
--- trunk/installer/release/lang/Korean.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/Korean.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=\xC3߰\xA1\xBC\xB3\xC1\xA4(&D)...
 MENU_SETUP_SAVE=\xC0\xFA\xC0\xE5\xC7ϱ\xE2(&S)...
 MENU_SETUP_RESTORE=\xB0\xA1\xC1\xAE\xBF\xC0\xB1\xE2(&R)...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=Ű\xB8ʰ\xA1\xC1\xAE\xBF\xC0\xB1\xE2(&L)...
 
 MENU_CONTROL=\xC1\xA6\xBE\xEE(&O)

Modified: trunk/installer/release/lang/Russian.lng
===================================================================
--- trunk/installer/release/lang/Russian.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/Russian.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=&\xC4\xEE\xEF\xEE\xEB\xED\xE8\xF2\xE5\xEB\xFC\xED\xFB\xE5 \xED\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE8...
 MENU_SETUP_SAVE=&\xD1\xEE\xF5\xF0\xE0\xED\xE8\xF2\xFC \xED\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE8...
 MENU_SETUP_RESTORE=&\xC2\xEE\xF1\xF1\xF2\xE0\xED\xEE\xE2\xE8\xF2\xFC \xED\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE8...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=&\xC7\xE0\xE3\xF0\xF3\xE7\xE8\xF2\xFC \xED\xE0\xF1\xF2\xF0\xEE\xE9\xEA\xE8 \xEA\xEB\xE0\xE2\xE8\xF8...
 
 MENU_CONTROL=&\xD3\xEF\xF0\xE0\xE2\xEB\xE5\xED\xE8\xE5

Modified: trunk/installer/release/lang/Simplified Chinese.lng
===================================================================
--- trunk/installer/release/lang/Simplified Chinese.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/Simplified Chinese.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=\xB8\xBD\xBC\xD3\xC9\xE8\xD6\xC3(&D)...
 MENU_SETUP_SAVE=\xB1\xA3\xB4\xE6\xC5\xE4\xD6\xC3(&S)...
 MENU_SETUP_RESTORE=\xD4\xD8\xC8\xEB\xC5\xE4\xD6\xC3(&R)...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=\xB5\xBC\xC8\xEB\xBC\xFC\xC5\xCCӳ\xC9\xE4(&L)...
 
 MENU_CONTROL=\xBF\xD8\xD6\xC6(&O)

Modified: trunk/installer/release/lang/Traditional Chinese.lng
===================================================================
--- trunk/installer/release/lang/Traditional Chinese.lng	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/installer/release/lang/Traditional Chinese.lng	2015-02-28 16:35:58 UTC (rev 5809)
@@ -60,6 +60,7 @@
 MENU_SETUP_ADDITION=\xAA\xFE\xA5[\xB3]\xA9w(&D)...
 MENU_SETUP_SAVE=\xC0x\xA6s\xB3]\xA9w(&S)...
 MENU_SETUP_RESTORE=\xB8\xFC\xA4J\xB3]\xA9w(&R)...
+MENU_OPEN_SETUP=Setup d&irectory...
 MENU_SETUP_LOADKEYMAP=\xBEɤJ\xC1\xE4\xBDL\xACM\xAEg(&L)...
 
 MENU_CONTROL=\xB1\xB1\xA8\xEE(&O)

Modified: trunk/teraterm/common/tt_res.h
===================================================================
--- trunk/teraterm/common/tt_res.h	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/teraterm/common/tt_res.h	2015-02-28 16:35:58 UTC (rev 5809)
@@ -1,6 +1,6 @@
 //{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by c:\usr\ttssh2\trunk\teraterm\teraterm\ttermpro.rc
+// Microsoft Visual C++ \x82Ő\xB6\x90\xAC\x82\xB3\x82ꂽ\x83C\x83\x93\x83N\x83\x8B\x81[\x83h \x83t\x83@\x83C\x83\x8B\x81B
+// C:\usr\ttssh2\trunk\teraterm\teraterm\ttermpro.rc \x82Ŏg\x97p
 //
 #define IDI_TTERM                       100
 #define IDR_ACC                         100
@@ -236,6 +236,7 @@
 #define ID_SETUP_ADDITIONALSETTINGS     50375
 #define ID_SETUP_SAVE                   50380
 #define ID_SETUP_RESTORE                50390
+#define ID_OPEN_SETUP                   50391
 #define ID_SETUP_LOADKEYMAP             50395
 #define ID_CONTROL_RESETTERMINAL        50410
 #define ID_CONTROL_RESETREMOTETITLE     50411

Modified: trunk/teraterm/teraterm/ttermpro.rc
===================================================================
--- trunk/teraterm/teraterm/ttermpro.rc	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/teraterm/teraterm/ttermpro.rc	2015-02-28 16:35:58 UTC (rev 5809)
@@ -16,10 +16,8 @@
 // \x89p\x8C\xEA (\x95č\x91) resources
 
 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 #pragma code_page(1252)
-#endif //_WIN32
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -262,7 +260,7 @@
     LTEXT           "Elapsed time:",IDC_PROT_ELAPSED,12,48,46,8
     RTEXT           "",IDC_PROTOELAPSEDTIME,60,48,70,8
     RTEXT           "",IDC_PROTOPERCENT,104,61,26,8,0,WS_EX_TRANSPARENT
-    CONTROL         "",IDC_PROTOPROGRESS,"msctls_progress32",NOT WS_VISIBLE | WS_BORDER | 0x1,12,58,92,14,WS_EX_TRANSPARENT
+    CONTROL         "",IDC_PROTOPROGRESS,"msctls_progress32",PBS_SMOOTH | NOT WS_VISIBLE | WS_BORDER,12,58,92,14,WS_EX_TRANSPARENT
     DEFPUSHBUTTON   "Cancel",IDCANCEL,51,77,40,14
 END
 
@@ -283,7 +281,7 @@
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO 
+GUIDELINES DESIGNINFO
 BEGIN
     IDD_DAD_DIALOG, DIALOG
     BEGIN
@@ -455,7 +453,7 @@
 // Menu
 //
 
-IDR_MENU MENU 
+IDR_MENU MENU
 BEGIN
     POPUP "&File"
     BEGIN
@@ -541,6 +539,7 @@
         MENUITEM SEPARATOR
         MENUITEM "&Save setup...",              ID_SETUP_SAVE
         MENUITEM "&Restore setup...",           ID_SETUP_RESTORE
+        MENUITEM "Setup d&irectory...",         ID_OPEN_SETUP
         MENUITEM SEPARATOR
         MENUITEM "&Load key map...",            ID_SETUP_LOADKEYMAP
     END
@@ -568,7 +567,7 @@
     END
 END
 
-IDR_TEKMENU MENU 
+IDR_TEKMENU MENU
 BEGIN
     POPUP "&File"
     BEGIN
@@ -599,7 +598,7 @@
     END
 END
 
-IDR_PASTEMENU MENU 
+IDR_PASTEMENU MENU
 BEGIN
     MENUITEM "&Paste",                      ID_EDIT_PASTE2
     MENUITEM "Paste<C&R>",                  ID_EDIT_PASTECR
@@ -611,7 +610,7 @@
 // Accelerator
 //
 
-IDR_ACC ACCELERATORS 
+IDR_ACC ACCELERATORS
 BEGIN
     "T",            ID_ACC_AREYOUTHERE,     VIRTKEY, ALT, NOINVERT
     "C",            ID_ACC_COPY,            VIRTKEY, ALT, NOINVERT

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/teraterm/teraterm/vtwin.cpp	2015-02-28 16:35:58 UTC (rev 5809)
@@ -197,6 +197,7 @@
 	ON_COMMAND(ID_SETUP_GENERAL, OnSetupGeneral)
 	ON_COMMAND(ID_SETUP_SAVE, OnSetupSave)
 	ON_COMMAND(ID_SETUP_RESTORE, OnSetupRestore)
+	ON_COMMAND(ID_OPEN_SETUP, OnOpenSetupDirectory)
 	ON_COMMAND(ID_SETUP_LOADKEYMAP, OnSetupLoadKeyMap)
 	ON_COMMAND(ID_CONTROL_RESETTERMINAL, OnControlResetTerminal)
 	ON_COMMAND(ID_CONTROL_RESETREMOTETITLE, OnControlResetRemoteTitle)
@@ -1207,6 +1208,9 @@
 	GetMenuString(SetupMenu, ID_SETUP_RESTORE, uimsg, sizeof(uimsg), MF_BYCOMMAND);
 	get_lang_msg("MENU_SETUP_RESTORE", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
 	ModifyMenu(SetupMenu, ID_SETUP_RESTORE, MF_BYCOMMAND, ID_SETUP_RESTORE, ts.UIMsg);
+	GetMenuString(SetupMenu, ID_OPEN_SETUP, uimsg, sizeof(uimsg), MF_BYCOMMAND);
+	get_lang_msg("MENU_OPEN_SETUP", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
+	ModifyMenu(SetupMenu, ID_OPEN_SETUP, MF_BYCOMMAND, ID_OPEN_SETUP, ts.UIMsg);
 	GetMenuString(SetupMenu, ID_SETUP_LOADKEYMAP, uimsg, sizeof(uimsg), MF_BYCOMMAND);
 	get_lang_msg("MENU_SETUP_LOADKEYMAP", ts.UIMsg, sizeof(ts.UIMsg), uimsg, ts.UILanguageFile);
 	ModifyMenu(SetupMenu, ID_SETUP_LOADKEYMAP, MF_BYCOMMAND, ID_SETUP_LOADKEYMAP, ts.UIMsg);
@@ -4522,6 +4526,71 @@
 	}
 }
 
+
+//
+// \x83G\x83N\x83X\x83v\x83\x8D\x81[\x83\x89\x82Ńp\x83X\x82\xF0\x8AJ\x82\xAD\x81B
+//
+// return TRUE: success
+//        FALSE: failure
+//
+static BOOL openDirectoryWithExplorer(char *path, int pathlen)
+{
+	LPSHELLFOLDER pDesktopFolder;
+	LPMALLOC pMalloc;
+	LPITEMIDLIST pIDL;
+	WCHAR pwszDisplayName[1024];
+	size_t szRet, DisplayNameMax;
+	SHELLEXECUTEINFO si;
+	BOOL ret = FALSE;
+
+	DisplayNameMax = sizeof(pwszDisplayName) / sizeof(pwszDisplayName[0]);
+
+	if (SHGetDesktopFolder(&pDesktopFolder) == S_OK) {
+		if (SHGetMalloc(&pMalloc) == S_OK) {
+			szRet = mbstowcs(pwszDisplayName, path, DisplayNameMax - 1);
+			if (szRet != -1) {
+				pwszDisplayName[szRet] = L'\0';
+
+				if (pDesktopFolder->ParseDisplayName(NULL, NULL, pwszDisplayName, NULL, &pIDL, NULL) == S_OK) {
+					::ZeroMemory(&si, sizeof(si));
+					si.cbSize = sizeof(si);
+					si.fMask = SEE_MASK_IDLIST;
+					si.lpVerb = _T("open");
+					si.lpIDList = pIDL;
+					si.nShow = SW_SHOWNORMAL;
+					::ShellExecuteEx(&si);
+					pMalloc->Free((void*)pIDL);
+
+					ret = TRUE;
+				}
+
+			}
+			pMalloc->Release();
+		}
+		pDesktopFolder->Release();
+	}
+
+	return (ret);
+}
+
+
+//
+// \x8C\xBB\x8Dݓǂݍ\x9E\x82܂\xEA\x82Ă\xA2\x82\xE9 teraterm.ini \x83t\x83@\x83C\x83\x8B\x82\xAA\x8Ai\x94[\x82\xB3\x82\xEA\x82Ă\xA2\x82\xE9
+// \x83t\x83H\x83\x8B\x83_\x82\xF0\x83G\x83N\x83X\x83v\x83\x8D\x81[\x83\x89\x82ŊJ\x82\xAD\x81B
+//
+// (2015.2.28 yutaka)
+//
+void CVTWindow::OnOpenSetupDirectory()
+{
+	char path[MAX_PATH];
+
+	// \x90ݒ\xE8\x83t\x83@\x83C\x83\x8B\x82̃p\x83X\x82\xF0\x8E擾\x82\xB7\x82\xE9\x81B
+	ExtractDirName(ts.SetupFName, path);
+
+	openDirectoryWithExplorer(path, sizeof(path));
+}
+
+
 void CVTWindow::OnSetupLoadKeyMap()
 {
 	BOOL Ok;

Modified: trunk/teraterm/teraterm/vtwin.h
===================================================================
--- trunk/teraterm/teraterm/vtwin.h	2015-02-28 14:43:30 UTC (rev 5808)
+++ trunk/teraterm/teraterm/vtwin.h	2015-02-28 16:35:58 UTC (rev 5809)
@@ -164,6 +164,7 @@
 	afx_msg void OnSetupGeneral();
 	afx_msg void OnSetupSave();
 	afx_msg void OnSetupRestore();
+	afx_msg void OnOpenSetupDirectory();
 	afx_msg void OnSetupLoadKeyMap();
 	afx_msg void OnControlResetTerminal();
 	afx_msg void OnControlResetRemoteTitle();



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