[Ttssh2-commit] [5660] filenamebox マクロコマンドに、初期ディレクトリを指示する引数を追加した

svnno****@sourc***** svnno****@sourc*****
2014年 9月 16日 (火) 14:28:13 JST


Revision: 5660
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5660
Author:   maya
Date:     2014-09-16 14:28:12 +0900 (Tue, 16 Sep 2014)
Log Message:
-----------
filenamebox マクロコマンドに、初期ディレクトリを指示する引数を追加した
  http://sourceforge.jp/projects/ttssh2/forums/5841/35966/

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/en/html/macro/command/filenamebox.html
    trunk/doc/ja/html/about/history.html
    trunk/doc/ja/html/macro/command/filenamebox.html
    trunk/teraterm/ttpmacro/ttl.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2014-09-09 11:33:13 UTC (rev 5659)
+++ trunk/doc/en/html/about/history.html	2014-09-16 05:28:12 UTC (rev 5660)
@@ -30,6 +30,16 @@
 <hr>
 
 <h2><a name="teraterm">Tera Term</a></h2>
+<h3><a name="teraterm_4.85">2014.xx.xx (Ver 4.85) not released</a></h3>
+<ul class="history">
+  <li>Changes
+    <ul>
+      <!--li><a href="../macro/filenamebox.html">filenamebox</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ɏ\x89\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x8Ew\x92肷\x82\xE9\x88\xF8\x90\x94\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li-->
+    </ul>
+  </li>
+</ul>
+
+
 <h3><a name="teraterm_4.84">2014.08.31 (Ver 4.84)</a></h3>
 <ul class="history">
   <li>Changes

Modified: trunk/doc/en/html/macro/command/filenamebox.html
===================================================================
--- trunk/doc/en/html/macro/command/filenamebox.html	2014-09-09 11:33:13 UTC (rev 5659)
+++ trunk/doc/en/html/macro/command/filenamebox.html	2014-09-16 05:28:12 UTC (rev 5660)
@@ -18,7 +18,7 @@
 </p>
 
 <pre class="macro-syntax">
-filenamebox &lt;title&gt; [&lt;dialogtype&gt;]
+filenamebox &lt;title&gt; [&lt;dialogtype&gt; [&lt;initialdir&gt;]]
 </pre>
 
 <h2>Parameters</h2>
@@ -31,6 +31,10 @@
 	<dd>Specifies the type of dialog box.<br>
 	    If this parameter is zero, creates [Open] dialog box.<br>
 	    If this parameter is nonzero, creates [Save] dialog box.</dd>
+
+	<dt class="macro">string &lt;initialdir&gt; (optional default="") (version 4.85 or later)</dt>
+	<--dd>\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82̏\x89\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x8Ew\x92肷\x82\xE9\x81B<br>
+	    \x8B󕶎\x9A\x97\xF1\x82△\x8C\xF8\x82ȃp\x83X\x82\xF0\x8Ew\x92肷\x82\xE9\x82ƁAWindows \x82̎d\x97l(OPENFILENAME\x8D\\x91\xA2\x91̂\xCClpstrInitialDir\x82̎d\x97l)\x82ɂ\xE6\x82菉\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xAA\x8C\x88\x92肳\x82\xEA\x82\xE9\x81B</dd-->
 </dl>
 
 <h2>Return Value</h2>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2014-09-09 11:33:13 UTC (rev 5659)
+++ trunk/doc/ja/html/about/history.html	2014-09-16 05:28:12 UTC (rev 5660)
@@ -30,6 +30,16 @@
 <hr>
 
 <h2><a name="teraterm">Tera Term</a></h2>
+<h3><a name="teraterm_4.85">2014.xx.xx (Ver 4.85) not released</a></h3>
+<ul class="history">
+  <li>\x95ύX
+    <ul>
+      <li><a href="../macro/filenamebox.html">filenamebox</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ɏ\x89\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x8Ew\x92肷\x82\xE9\x88\xF8\x90\x94\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+    </ul>
+  </li>
+</ul>
+
+
 <h3><a name="teraterm_4.84">2014.08.31 (Ver 4.84)</a></h3>
 <ul class="history">
   <li>\x95ύX

Modified: trunk/doc/ja/html/macro/command/filenamebox.html
===================================================================
--- trunk/doc/ja/html/macro/command/filenamebox.html	2014-09-09 11:33:13 UTC (rev 5659)
+++ trunk/doc/ja/html/macro/command/filenamebox.html	2014-09-16 05:28:12 UTC (rev 5660)
@@ -18,7 +18,7 @@
 </p>
 
 <pre class="macro-syntax">
-filenamebox &lt;title&gt; [&lt;dialogtype&gt;]
+filenamebox &lt;title&gt; [&lt;dialogtype&gt; [&lt;initialdir&gt;]]
 </pre>
 
 <h2>\x83p\x83\x89\x83\x81\x81[\x83^</h2>
@@ -31,6 +31,10 @@
 	<dd>\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82̎\xED\x97ނ\xF0\x8Ew\x92肷\x82\xE9\x81B<br>
 	    0\x82\xF0\x8Ew\x92肷\x82\xE9\x82Ɓm\x83t\x83@\x83C\x83\x8B\x82\xF0\x8AJ\x82\xAD\x81n\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x8AJ\x82\xAD\x81B<br>
 	    0\x88ȊO\x82̒l\x82\xF0\x8Ew\x92肷\x82\xE9\x82Ɓm\x83t\x83@\x83C\x83\x8B\x96\xBC\x82\xF0\x95t\x82\xAF\x82ĕۑ\xB6\x81n\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82\xF0\x8AJ\x82\xAD\x81B</dd>
+
+	<dt class="macro">\x95\xB6\x8E\x9A\x97\xF1 &lt;initialdir&gt; (\x83I\x83v\x83V\x83\x87\x83\x93 \x83f\x83t\x83H\x83\x8B\x83g="") (\x83o\x81[\x83W\x83\x87\x83\x93 4.85 \x88ȍ~)</dt>
+	<dd>\x83_\x83C\x83A\x83\x8D\x83O\x83{\x83b\x83N\x83X\x82̏\x89\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xF0\x8Ew\x92肷\x82\xE9\x81B<br>
+	    \x8B󕶎\x9A\x97\xF1\x82△\x8C\xF8\x82ȃp\x83X\x82\xF0\x8Ew\x92肷\x82\xE9\x82ƁAWindows \x82̎d\x97l(OPENFILENAME\x8D\\x91\xA2\x91̂\xCClpstrInitialDir\x82̎d\x97l)\x82ɂ\xE6\x82菉\x8A\xFA\x83f\x83B\x83\x8C\x83N\x83g\x83\x8A\x82\xAA\x8C\x88\x92肳\x82\xEA\x82\xE9\x81B</dd>
 </dl>
 
 <h2>\x95Ԃ\xE8\x92l</h2>

Modified: trunk/teraterm/ttpmacro/ttl.c
===================================================================
--- trunk/teraterm/ttpmacro/ttl.c	2014-09-09 11:33:13 UTC (rev 5659)
+++ trunk/teraterm/ttpmacro/ttl.c	2014-09-16 05:28:12 UTC (rev 5660)
@@ -1417,15 +1417,23 @@
 	OPENFILENAME ofn;
 	char uimsg[MAX_UIMSG];
 	BOOL SaveFlag = FALSE;
+	TStrVal InitDir = "";
 	BOOL ret;
 
 	Err = 0;
 	GetStrVal(Str1,&Err);
 	if (Err!=0) return Err;
 
+	// get 2nd arg(optional) if given
 	if (CheckParameterGiven()) { // dialogtype
 		GetIntVal(&SaveFlag, &Err);
 		if (Err!=0) return Err;
+
+		// get 3rd arg(optional) if given
+		if (CheckParameterGiven()) { // initdir
+			GetStrVal(InitDir, &Err);
+			if (Err!=0) return Err;
+		}
 	}
 
 	if ((Err==0) && (GetFirstChar()!=0))
@@ -1444,6 +1452,9 @@
 		get_lang_msg("FILEDLG_ALL_FILTER", uimsg, sizeof(uimsg), "All(*.*)\\0*.*\\0\\0", UILanguageFile);
 		ofn.lpstrFilter     = uimsg;
 		ofn.lpstrInitialDir = NULL;
+		if (strlen(InitDir) > 0) {
+			ofn.lpstrInitialDir = InitDir;
+		}
 		if (SaveFlag) {
 			ofn.Flags = OFN_OVERWRITEPROMPT;
 			ret = GetSaveFileName(&ofn);



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