[Ttssh2-commit] [5096] xtermのウィンドウタイトルスタッキングに対応した。

svnno****@sourc***** svnno****@sourc*****
2012年 12月 11日 (火) 12:26:39 JST


Revision: 5096
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5096
Author:   doda
Date:     2012-12-11 12:26:39 +0900 (Tue, 11 Dec 2012)
Log Message:
-----------
xtermのウィンドウタイトルスタッキングに対応した。

Modified Paths:
--------------
    trunk/doc/en/html/about/ctrlseq.html
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/ctrlseq.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/teraterm/vtterm.c

-------------- next part --------------
Modified: trunk/doc/en/html/about/ctrlseq.html
===================================================================
--- trunk/doc/en/html/about/ctrlseq.html	2012-12-10 21:46:32 UTC (rev 5095)
+++ trunk/doc/en/html/about/ctrlseq.html	2012-12-11 03:26:39 UTC (rev 5096)
@@ -274,6 +274,10 @@
     = 21    Reports window title.
             Response: OSC l <i>title</i> ST
               <i>title</i>    Window title.
+    = 22    Save window title on stack.
+            <i>Ps2</i> = 0, 1, 2    Save window title.
+    = 23    Restore window title from stack.
+            <i>Ps2</i> = 0, 1, 2    Restore window title.
 </pre>
 </td></tr>
 <tr><td>CSI u</td>	<td>RCP</td>	<td> Restore cursor position. Same as DECRC. </td></tr>

Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2012-12-10 21:46:32 UTC (rev 5095)
+++ trunk/doc/en/html/about/history.html	2012-12-11 03:26:39 UTC (rev 5096)
@@ -36,6 +36,7 @@
   <li>Changes
     <ul>
       <li>added support for the DECFRA (Fill Rectangular Area) control sequence.</li>
+      <li>added support for the window-ops control sequence to push/pop window title on stack.</li>
     </ul>
   </li>
 

Modified: trunk/doc/ja/html/about/ctrlseq.html
===================================================================
--- trunk/doc/ja/html/about/ctrlseq.html	2012-12-10 21:46:32 UTC (rev 5095)
+++ trunk/doc/ja/html/about/ctrlseq.html	2012-12-11 03:26:39 UTC (rev 5096)
@@ -265,6 +265,10 @@
     = 21    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xF0\x95񍐂\xB7\x82\xE9\x81B
             \x89\x9E\x93\x9A: OSC l <i>title</i> ST
               <i>title</i>    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B
+    = 22    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xF0\x83X\x83^\x83b\x83N\x82ɕۑ\xB6\x82\xB7\x82\xE9\x81B
+            <i>Ps2</i> = 0, 1, 2    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xF0\x95ۑ\xB6\x82\xB7\x82\xE9\x81B
+    = 23    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82\xF0\x83X\x83^\x83b\x83N\x82\xA9\x82畜\x8C\xB3\x82\xB7\x82\xE9\x81B
+            <i>Ps2</i> = 0, 1, 2    \x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82𕜌\xB3\x82\xB7\x82\xE9\x81B
 </pre>
 </td></tr>
 <tr><td>CSI u</td>	<td>RCP</td>	<td>\x95ۑ\xB6\x82\xB5\x82\xBD\x83J\x81[\x83\\x83\x8B\x88ʒu\x82𕜌\xB3\x82\xB7\x82\xE9\x81B</td></tr>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2012-12-10 21:46:32 UTC (rev 5095)
+++ trunk/doc/ja/html/about/history.html	2012-12-11 03:26:39 UTC (rev 5096)
@@ -36,6 +36,7 @@
   <li>\x95ύX
     <ul>
       <li>DECFRA(\x8B\xE9\x8C`\x97̈敶\x8E\x9A\x96\x84\x82\xDF)\x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82ɑΉ\x9E\x82\xB5\x82\xBD\x81B</li>
+      <li>\x83E\x83B\x83\x93\x83h\x83E\x83^\x83C\x83g\x83\x8B\x82̃X\x83^\x83b\x83N\x82ւ̑ޔ\xF0/\x95\x9C\x8C\xB3\x82\xF0\x8Ds\x82\xA4\x83E\x83B\x83\x93\x83h\x83E\x91\x80\x8D쐧\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82ɑΉ\x9E\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2012-12-10 21:46:32 UTC (rev 5095)
+++ trunk/teraterm/teraterm/vtterm.c	2012-12-11 03:26:39 UTC (rev 5096)
@@ -107,6 +107,13 @@
 static int ParseMode;
 static int ChangeEmu;
 
+typedef struct tstack {
+    char *title;
+    struct tstack *next;
+} TStack;
+typedef TStack *PTStack;
+PTStack TitleStack = NULL;
+
 /* user defined keys */
 static BOOL WaitKeyId, WaitHi;
 
@@ -2150,6 +2157,7 @@
   {
     int x, y, len;
     char Report[TitleBuffSize*2+10];
+    PTStack t;
 
     switch (Param[1]) {
       case 1: // De-iconify window
@@ -2299,6 +2307,44 @@
 	    break;
 	}
         break;
+    case 22: // Push Title
+      if (NParam < 2) {
+	Param[2] = 0;
+      }
+      switch (Param[2]) {
+      case 0:
+      case 1:
+      case 2:
+	if (ts.AcceptTitleChangeRequest && (t=malloc(sizeof(TStack))) != NULL) {
+	  if ((t->title = _strdup(cv.TitleRemote)) != NULL) {
+	    t->next = TitleStack;
+	    TitleStack = t;
+	  }
+	  else {
+	    free(t);
+	  }
+	}
+	break;
+      }
+      break;
+    case 23: // Pop Title
+      if (NParam < 2) {
+	Param[2] = 0;
+      }
+      switch (Param[2]) {
+      case 0:
+      case 1:
+      case 2:
+	if (ts.AcceptTitleChangeRequest && TitleStack != NULL) {
+	  t = TitleStack;
+	  TitleStack = t->next;
+	  strncpy_s(cv.TitleRemote, sizeof(cv.TitleRemote), t->title, _TRUNCATE);
+	  ChangeTitle();
+	  free(t->title);
+	  free(t);
+	}
+	break;
+      }
     }
   }
 



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