Revision: 8106 https://osdn.net/projects/ttssh2/scm/svn/commits/8106 Author: yutakapon Date: 2019-09-10 23:42:39 +0900 (Tue, 10 Sep 2019) Log Message: ----------- Eterm look-feel: - 「壁紙と画像を混合する」を設定できるようにした。 -- teraterm.ini に BGIgnoreThemeFile エントリを追加した。デフォルトはoff。 - 壁紙と混合する画像ファイルをランダムに選択する際、無関係なファイルを選択することがある問題を修正した。 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/en/html/menu/setup-additional.html trunk/doc/en/html/setup/teraterm-ini.html trunk/doc/ja/html/about/history.html trunk/doc/ja/html/menu/setup-additional.html trunk/doc/ja/html/setup/teraterm-ini.html trunk/installer/release/TERATERM.INI 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/teraterm.h trunk/teraterm/common/tttypes.h trunk/teraterm/teraterm/addsetting.cpp trunk/teraterm/teraterm/ttermpro.rc trunk/teraterm/teraterm/vtdisp.c trunk/teraterm/teraterm/vtdisp.h trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/ttpset/ttset.c -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/en/html/about/history.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -44,11 +44,13 @@ <li>Changed of indication from "Protocol" to "IP version" and from "UNSPEC" to "AUTO" on <a href="../menu/file-new.html">New connection dialog</a>.</li> <li>When the opacity value of the window is temporarily changed by operating the mouse wheel on the title bar of VT window, the tooltip of the opacity value is shown.</li> <li>The location of resizing toolchip is automatically moved to coordinates after resizing.</li> + <li>Eterm look-feel: Added the <a href="../menu/setup-additional.html#MixedThemeFile">Mixed ThemeFile to Background</a> configuration. Also, added the the <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> entry in the teraterm.ini file. The default value is off.</li> </ul> </li> <li>Bug fixes <ul> <li>The toolchip during resizing can not be displayed on the left and top edge of the desktop. This bug was introduced in 4.103.</li> + <li>Eterm look-feel: When a image file is randomly selected with the wallpaper, invalid file may be selected. </li> </ul> </li> Modified: trunk/doc/en/html/menu/setup-additional.html =================================================================== --- trunk/doc/en/html/menu/setup-additional.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/en/html/menu/setup-additional.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -277,6 +277,12 @@ <strong>NOTICE: You need to save setup and restart Tera Term for enabling this settings.</strong> </dd> + <dt id="MixedThemeFile">Mixed ThemeFile to Background</dt> + <dd> + When the Eterm look-feel feature is enabled, you can specify whether to mix the wallpaper and the image of theme file. <br> + Howerver, this option can not be used with Background Image at the same time. <br> + </dd> + <dt>Background Image</dt> <dd> When the Eterm look-feel feature is enabled, an image file can be specified as background. Modified: trunk/doc/en/html/setup/teraterm-ini.html =================================================================== --- trunk/doc/en/html/setup/teraterm-ini.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/en/html/setup/teraterm-ini.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -56,6 +56,18 @@ <td style="width:250px;"><-</td> <td></td> </tr> + <tr> + <td id="BGThemeFile">BGThemeFile</td> + <td style="width:250px;">theme\*.ini</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> + <tr> + <td id="BGIgnoreThemeFile">BGIgnoreThemeFile</td> + <td style="width:250px;">off</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> </table> <h2>Tera Term</h2> Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/ja/html/about/history.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -44,11 +44,13 @@ <li><a href="../menu/file-new.html">New connection\x83_\x83C\x83A\x83\x8D\x83O</a>\x82̕\\x8BL\x82\xF0\x81uProtocol\x81v\x82\xA9\x82\xE7\x81uIP version\x81v\x82ɁA\x81uUNSPEC\x81v\x82\xF0\x81uAUTO\x81v\x82ɕύX\x82\xB5\x82\xBD\x81B</li> <li>VT \x83E\x83B\x83\x93\x83h\x83E\x82̃^\x83C\x83g\x83\x8B\x83o\x81[\x8F\xE3\x82Ń}\x83E\x83X\x83z\x83C\x81[\x83\x8B\x82𑀍삵\x82ăE\x83B\x83\x93\x83h\x83E\x82̕s\x93\xA7\x96\xBE\x93x\x82\xF0\x88ꎞ\x93I\x82ɕύX\x82\xB7\x82\xE9\x82Ƃ\xAB\x81A\x95s\x93\xA7\x96\xBE\x93x\x82\xF0\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82ɕ\\x8E\xA6\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82̕\\x8E\xA6\x88ʒu\x82\xF0\x83\x8A\x83T\x83C\x83Y\x8C\xE3\x82̍\xC0\x95W\x82ɒǏ]\x82\xB7\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> + <li>Eterm look-feel: <a href="../menu/setup-additional.html#MixedThemeFile">\x95ǎ\x86\x82Ɖ摜\x82\xF0\x8D\xAC\x8D\x87\x82\xB7\x82\xE9</a>\x82\xF0\x90ݒ\xE8\x82ł\xAB\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81Bteraterm.ini \x82\xC9 <a href="../setup/teraterm-ini.html#BGIgnoreThemeFile">BGIgnoreThemeFile</a> \x83G\x83\x93\x83g\x83\x8A\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B\x83f\x83t\x83H\x83\x8B\x83g\x82\xCDoff\x81B</li> </ul> </li> <li>\x83o\x83O\x8FC\x90\xB3 <ul> <li>\x83\x8A\x83T\x83C\x83Y\x92\x86\x82̏c\x89\xA1\x83T\x83C\x83Y\x83c\x81[\x83\x8B\x83`\x83b\x83v\x82\xAA\x81A\x83f\x83X\x83N\x83g\x83b\x83v\x82̍\xB6\x92[\x82Ə\xE3\x92[\x82ŕ\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xA2\x82\xBD\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B4.103\x82ł̃G\x83\x93\x83o\x83O\x81B</li> + <li>Eterm look-feel: \x95ǎ\x86\x82ƍ\xAC\x8D\x87\x82\xB7\x82\xE9\x89摜\x83t\x83@\x83C\x83\x8B\x82\xF0\x83\x89\x83\x93\x83_\x83\x80\x82ɑI\x91\xF0\x82\xB7\x82\xE9\x8DہA\x96\xB3\x8AW\x82ȃt\x83@\x83C\x83\x8B\x82\xF0\x91I\x91\xF0\x82\xB7\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li> </ul> </li> Modified: trunk/doc/ja/html/menu/setup-additional.html =================================================================== --- trunk/doc/ja/html/menu/setup-additional.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/ja/html/menu/setup-additional.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -273,6 +273,12 @@ Eterm\x95\x97\x82̔\xBC\x93\xA7\x96\xBE\x83E\x83B\x83\x93\x83h\x83E\x82\xF0\x8Eg\x97p\x82\xB7\x82邱\x82Ƃ\xAA\x82ł\xAB\x82܂\xB7\x81B<br> <strong>\x92\x8D\x88ӁF\x90ݒ\xE8\x82\xF0\x97L\x8C\xF8\x82ɂ\xB7\x82\xE9\x82ɂ́A\x90ݒ\xE8\x82̕ۑ\xB6\x82\xC6Tera Term\x82̍ċN\x93\xAE\x82\xAA\x95K\x97v\x82ł\xB7\x81B</strong> </dd> + + <dt id="MixedThemeFile">Mixed ThemeFile to Background</dt> + <dd> + Eterm lookfeel\x8B@\x94\\x82\xAA\x97L\x8C\xF8\x82̏ꍇ\x81A\x95ǎ\x86\x82ƃe\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82̉摜\x82\xF0\x8D\xAC\x8D\x87\x82\xB7\x82邩\x82ǂ\xA4\x82\xA9\x8Ew\x92\xE8\x82ł\xAB\x82܂\xB7\x81B<br> + \x82Ȃ\xA8\x81ABackground Image\x82Ƃ͓\xAF\x8E\x9E\x82Ɏg\x97p\x82ł\xAB\x82܂\xB9\x82\xF1\x81B + </dd> <dt>Background Image</dt> <dd> Modified: trunk/doc/ja/html/setup/teraterm-ini.html =================================================================== --- trunk/doc/ja/html/setup/teraterm-ini.html 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/doc/ja/html/setup/teraterm-ini.html 2019-09-10 14:42:39 UTC (rev 8106) @@ -56,6 +56,18 @@ <td style="width:250px;"><-</td> <td></td> </tr> + <tr> + <td id="BGThemeFile">BGThemeFile</td> + <td style="width:250px;">theme\*.ini</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> + <tr> + <td id="BGIgnoreThemeFile">BGIgnoreThemeFile</td> + <td style="width:250px;">off</td> + <td style="width:250px;"><-</td> + <td></td> + </tr> </table> <h2>Tera Term</h2> Modified: trunk/installer/release/TERATERM.INI =================================================================== --- trunk/installer/release/TERATERM.INI 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/TERATERM.INI 2019-09-10 14:42:39 UTC (rev 8106) @@ -21,7 +21,11 @@ ; wildcard => random select BGThemeFile=theme\*.ini +; This option ignores the BGThemeFile in any case. When the option is on, +; the wallpaper image does not be mixed with theme file image. +BGIgnoreThemeFile=off + [Tera Term] ; Tera Term version number Version=2.3 Modified: trunk/installer/release/lang/English.lng =================================================================== --- trunk/installer/release/lang/English.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/English.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -231,6 +231,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=&Eterm lookfeel(*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=Background &Image DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=Image Brigh&tness DLG_TAB_VISUAL_MOUSE=&Mouse cursor Modified: trunk/installer/release/lang/French.lng =================================================================== --- trunk/installer/release/lang/French.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/French.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=Apparence Eterm(*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=Background &Image DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=Image Brigh&tness DLG_TAB_VISUAL_MOUSE=Curseur de la souris Modified: trunk/installer/release/lang/German.lng =================================================================== --- trunk/installer/release/lang/German.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/German.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=&Eterm-Aussehen(*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=Background &Image DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=Image Brigh&tness DLG_TAB_VISUAL_MOUSE=&Mauszeiger Modified: trunk/installer/release/lang/Japanese.lng =================================================================== --- trunk/installer/release/lang/Japanese.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/Japanese.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -231,6 +231,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=\x83A\x83N\x83e\x83C\x83u\x8E\x9E(%)(&A) DLG_TAB_VISUAL_ALPHA_INACTIVE=\x94\xF1\x83A\x83N\x83e\x83B\x83u\x8E\x9E(%)(&C) DLG_TAB_VISUAL_ETERM=&Eterm\x95\x97\x82ɂ\xB7\x82\xE9(*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=\x95ǎ\x86\x82Ɖ摜\x82\xF0\x8D\xAC\x8D\x87\x82\xB7\x82\xE9(&T) DLG_TAB_VISUAL_BGIMG=\x94w\x8Ci\x89摜(&I) DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=\x89摜\x82̖\xBE\x82邳(&T) DLG_TAB_VISUAL_MOUSE=\x83}\x83E\x83X\x83J\x81[\x83\\x83\x8B(&M) Modified: trunk/installer/release/lang/Korean.lng =================================================================== --- trunk/installer/release/lang/Korean.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/Korean.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=Eterm \xB4\xC0\xB3\xA6(*)(&E) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=\xB9\xE8\xB0\xE6\xB1\xB2(&I) DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=Image Brigh&tness DLG_TAB_VISUAL_MOUSE=\xB8\xB6\xBF콺 Ŀ\xBC\xAD(&M) Modified: trunk/installer/release/lang/Russian.lng =================================================================== --- trunk/installer/release/lang/Russian.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/Russian.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=&\xD1\xF2\xE8\xEB\xFC Eterm (*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=&\xD4\xEE\xED\xEE\xE2\xFB\xE9 \xF0\xE8\xF1\xF3\xED\xEE\xEA DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=&\xDF\xF0\xEA\xEE\xF1\xF2\xFC \xE8\xE7\xEE\xE1\xF0\xE0\xE6\xE5\xED\xE8\xFF DLG_TAB_VISUAL_MOUSE=&\xCA\xF3\xF0\xF1\xEE\xF0 \xEC\xFB\xF8\xE8 Modified: trunk/installer/release/lang/Simplified Chinese.lng =================================================================== --- trunk/installer/release/lang/Simplified Chinese.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/Simplified Chinese.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=&Eterm \xB7\xE7\xB8\xF1 (*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=\xB1\xB3\xBE\xB0ͼ\xCF\xF1(&I) DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=ͼ\xCF\xF1\xC1\xC1\xB6\xC8(&T) DLG_TAB_VISUAL_MOUSE=\xB9\xE2\xB1\xEA(&M) Modified: trunk/installer/release/lang/Traditional Chinese.lng =================================================================== --- trunk/installer/release/lang/Traditional Chinese.lng 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/installer/release/lang/Traditional Chinese.lng 2019-09-10 14:42:39 UTC (rev 8106) @@ -232,6 +232,7 @@ DLG_TAB_VISUAL_ALPHA_ACTIVE=&Active(%) DLG_TAB_VISUAL_ALPHA_INACTIVE=Ina&ctive(%) DLG_TAB_VISUAL_ETERM=&Eterm \xAD\xB7\xAE\xE6 (*) +DLG_TAB_VISUAL_BGMIXED_THEMEFILE=Mixed &ThemeFile to Background DLG_TAB_VISUAL_BGIMG=\xADI\xB4\xBA\xB9Ϲ\xB3(&I) DLG_TAB_VISUAL_BGIMG_BRIGHTNESS=Image Brigh&tness DLG_TAB_VISUAL_MOUSE=\xB4\xE5\xBC\xD0(&M) Modified: trunk/teraterm/common/teraterm.h =================================================================== --- trunk/teraterm/common/teraterm.h 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/common/teraterm.h 2019-09-10 14:42:39 UTC (rev 8106) @@ -65,6 +65,9 @@ #define BG_THEME_IMAGE_BRIGHTNESS_DEFAULT 64 #define BG_THEME_IMAGE_BRIGHTNESS1 "BGSrc1Alpha" #define BG_THEME_IMAGE_BRIGHTNESS2 "BGSrc2Alpha" +#define BG_THEME_IMAGEFILE_NAME "ImageFile.INI" +#define BG_THEME_THEMEFILE_SCALE "Scale.INI" +#define BG_THEME_THEMEFILE_TILE "Tile.INI" // Added by 337 2006/03/01 #define USE_NORMAL_BGCOLOR Modified: trunk/teraterm/common/tttypes.h =================================================================== --- trunk/teraterm/common/tttypes.h 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/common/tttypes.h 2019-09-10 14:42:39 UTC (rev 8106) @@ -403,6 +403,7 @@ int BGNoCopyBits; int BGNoFrame; char BGThemeFile[MAX_PATH]; + int BGIgnoreThemeFile; } eterm_lookfeel_t; typedef struct cygterm { Modified: trunk/teraterm/teraterm/addsetting.cpp =================================================================== --- trunk/teraterm/teraterm/addsetting.cpp 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/teraterm/addsetting.cpp 2019-09-10 14:42:39 UTC (rev 8106) @@ -657,6 +657,7 @@ { IDC_ALPHA_BLEND_ACTIVE_LABEL, "DLG_TAB_VISUAL_ALPHA_ACTIVE" }, { IDC_ALPHA_BLEND_INACTIVE_LABEL, "DLG_TAB_VISUAL_ALPHA_INACTIVE" }, { IDC_ETERM_LOOKFEEL, "DLG_TAB_VISUAL_ETERM" }, + { IDC_MIXED_THEME_FILE, "DLG_TAB_VISUAL_BGMIXED_THEMEFILE" }, { IDC_BGIMG_CHECK, "DLG_TAB_VISUAL_BGIMG" }, { IDC_BGIMG_BRIGHTNESS, "DLG_TAB_VISUAL_BGIMG_BRIGHTNESS" }, { IDC_MOUSE, "DLG_TAB_VISUAL_MOUSE" }, @@ -704,11 +705,24 @@ _snprintf_s(buf, sizeof(buf), _TRUNCATE, "%d", ts.BGImgBrightness); SetDlgItemNum(IDC_EDIT_BGIMG_BRIGHTNESS, ts.BGImgBrightness); + // BGEnable\x8AW\x82Ȃ\xAD\x81A\x83`\x83F\x83b\x83N\x83{\x83b\x83N\x83X\x82\xF0\x95t\x82\xAF\x82\xE9\x81B + if (strcmp(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE) == 0) { + SetCheck(IDC_BGIMG_CHECK, BST_CHECKED); + } else { + SetCheck(IDC_BGIMG_CHECK, BST_UNCHECKED); + } + // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82\x8B\x82\xB7\x82\xE9\x8Fꍇ\x82͕ǎ\x86\x82ƍ\xAC\x8D\x87\x82\xB5\x82Ȃ\xA2\x81B + if (ts.EtermLookfeel.BGIgnoreThemeFile) { + SetCheck(IDC_MIXED_THEME_FILE, BST_UNCHECKED); + } else { + SetCheck(IDC_MIXED_THEME_FILE, BST_CHECKED); + } + if (ts.EtermLookfeel.BGEnable) { EnableDlgItem(IDC_BGIMG_CHECK, TRUE); + EnableDlgItem(IDC_MIXED_THEME_FILE, TRUE); if (strcmp(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE) == 0) { - SetCheck(IDC_BGIMG_CHECK, BST_CHECKED); EnableDlgItem(IDC_BGIMG_EDIT, TRUE); EnableDlgItem(IDC_BGIMG_BUTTON, TRUE); @@ -715,7 +729,6 @@ EnableDlgItem(IDC_BGIMG_BRIGHTNESS, TRUE); EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, TRUE); } else { - SetCheck(IDC_BGIMG_CHECK, BST_UNCHECKED); EnableDlgItem(IDC_BGIMG_EDIT, FALSE); EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); @@ -722,6 +735,7 @@ EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); } + } else { EnableDlgItem(IDC_BGIMG_CHECK, FALSE); EnableDlgItem(IDC_BGIMG_EDIT, FALSE); @@ -729,6 +743,8 @@ EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); + + EnableDlgItem(IDC_MIXED_THEME_FILE, FALSE); } // (3)Mouse cursor type @@ -797,6 +813,7 @@ case IDC_ETERM_LOOKFEEL: // \x83`\x83F\x83b\x83N\x82\xB3\x82ꂽ\x82\xE7 Enable/Disable \x82\xF0\x83g\x83O\x83\x8B\x82\xB7\x82\xE9\x81B if (GetCheck(IDC_ETERM_LOOKFEEL)) { + EnableDlgItem(IDC_MIXED_THEME_FILE, TRUE); EnableDlgItem(IDC_BGIMG_CHECK, TRUE); if (GetCheck(IDC_BGIMG_CHECK)) { EnableDlgItem(IDC_BGIMG_EDIT, TRUE); @@ -824,9 +841,18 @@ // \x94w\x8Ci\x89摜\x82\xE0\x96\xB3\x8C\x{27B0B7}\x82\xE9\x81B SetDlgItemTextT(IDC_BGIMG_EDIT, _T("")); SetDlgItemInt(IDC_EDIT_BGIMG_BRIGHTNESS, BG_THEME_IMAGE_BRIGHTNESS_DEFAULT); + + EnableDlgItem(IDC_MIXED_THEME_FILE, FALSE); } return TRUE; + case IDC_MIXED_THEME_FILE: + if (GetCheck(IDC_MIXED_THEME_FILE)) { + // \x94w\x8Ci\x89摜\x82̃`\x83F\x83b\x83N\x82͊O\x82\xB7\x81B + SetCheck(IDC_BGIMG_CHECK, BST_UNCHECKED); + } + return TRUE; + case IDC_BGIMG_CHECK: if (GetCheck(IDC_BGIMG_CHECK)) { EnableDlgItem(IDC_BGIMG_EDIT, TRUE); @@ -836,6 +862,8 @@ EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, TRUE); strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE, sizeof(ts.EtermLookfeel.BGThemeFile)); + // \x8D\xAC\x8D\x87\x82̃`\x83F\x83b\x83N\x82͊O\x82\xB7\x81B + SetCheck(IDC_MIXED_THEME_FILE, BST_UNCHECKED); } else { EnableDlgItem(IDC_BGIMG_EDIT, FALSE); EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); @@ -982,6 +1010,27 @@ (i > 255) ? 255 : i; } + // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82\xF0\x8DŏI\x90ݒ肷\x82\xE9\x81B + if (ts.EtermLookfeel.BGEnable) { + if (GetCheck(IDC_BGIMG_CHECK)) { + strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE, sizeof(ts.EtermLookfeel.BGThemeFile)); + } else { + strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE_DEFAULT, sizeof(ts.EtermLookfeel.BGThemeFile)); + } + if (GetCheck(IDC_MIXED_THEME_FILE)) { + // \x95ǎ\x86\x82ƍ\xAC\x8D\x87\x82̏ꍇ\x81A\x83f\x83t\x83H\x83\x8B\x83g\x82ɖ߂\xB5\x82Ă\xA8\x82\xAD\x81B + ts.EtermLookfeel.BGIgnoreThemeFile = FALSE; + } else { + // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82\x8B\x82\xB7\x82\xE9\x81B + ts.EtermLookfeel.BGIgnoreThemeFile = TRUE; + } + + } else { + // BG\x82\xAA\x96\xB3\x8C\xF8\x82̏ꍇ\x82̓f\x83t\x83H\x83\x8B\x83g\x82ɖ߂\xB5\x82Ă\xA8\x82\xAD\x81B + strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE_DEFAULT, sizeof(ts.EtermLookfeel.BGThemeFile)); + } + + // (3) sel = GetCurSel(IDC_MOUSE_CURSOR); if (sel >= 0 && sel < MOUSE_CURSOR_MAX) { Modified: trunk/teraterm/teraterm/ttermpro.rc =================================================================== --- trunk/teraterm/teraterm/ttermpro.rc 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/teraterm/ttermpro.rc 2019-09-10 14:42:39 UTC (rev 8106) @@ -87,8 +87,7 @@ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,140,108,10 CONTROL "Display session &number",IDC_TITLEFMT_DISPSESSION, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,155,108,10 - CONTROL "Display &VT/TEK",IDC_TITLEFMT_DISPVTTEK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,170,108,10 + CONTROL "Display &VT/TEK",IDC_TITLEFMT_DISPVTTEK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,170,108,10 CONTROL "Swap hostname and &title position",IDC_TITLEFMT_SWAPHOSTTITLE, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,140,130,10 CONTROL "Display tcp &port number",IDC_TITLEFMT_DISPTCPPORT, @@ -143,7 +142,8 @@ LTEXT "P&aste delay per line",IDC_PASTEDELAY_LABEL,11,160,70,10 EDITTEXT IDC_PASTEDELAY_EDIT,95,158,24,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "ms",IDC_PASTEDELAY_LABEL2,123,160,23,10 - CONTROL "Ena&bling text selection when the window is activated by mouse",IDC_SELECT_ON_ACTIVATE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,173,229,10 + CONTROL "Ena&bling text selection when the window is activated by mouse",IDC_SELECT_ON_ACTIVATE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,10,173,229,10 END IDD_TABSHEET_VISUAL DIALOGEX 0, 0, 258, 188 @@ -155,37 +155,39 @@ EDITTEXT IDC_ALPHA_BLEND_ACTIVE,69,16,19,12,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Ina&ctive(%)",IDC_ALPHA_BLEND_INACTIVE_LABEL,7,31,60,8 EDITTEXT IDC_ALPHA_BLEND_INACTIVE,69,30,19,12,ES_AUTOHSCROLL | ES_NUMBER - GROUPBOX "",IDC_STATIC,97,2,155,54 + GROUPBOX "",IDC_STATIC,97,2,155,74 CONTROL "&Eterm lookfeel(*)",IDC_ETERM_LOOKFEEL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,99,8,66,12 - LTEXT "Image Brightness",IDC_BGIMG_BRIGHTNESS,166,19,56,8 - EDITTEXT IDC_EDIT_BGIMG_BRIGHTNESS,225,18,22,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Background &Image",IDC_BGIMG_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,27,73,10 - EDITTEXT IDC_BGIMG_EDIT,103,38,108,14,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_BGIMG_BUTTON,217,38,14,14 + CONTROL "Mixed &ThemeFile to Background",IDC_MIXED_THEME_FILE, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,105,21,115,10 + CONTROL "Background &Image",IDC_BGIMG_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,43,73,10 + LTEXT "Image Brightness",IDC_BGIMG_BRIGHTNESS,166,33,56,8 + EDITTEXT IDC_EDIT_BGIMG_BRIGHTNESS,225,30,22,14,ES_AUTOHSCROLL | ES_NUMBER + EDITTEXT IDC_BGIMG_EDIT,103,57,108,14,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_BGIMG_BUTTON,217,57,14,14 LTEXT "&Mouse cursor",IDC_MOUSE,5,46,70,8 - COMBOBOX IDC_MOUSE_CURSOR,15,57,80,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - RTEXT "&Font Quality",IDC_FONT_QUALITY_LABEL,102,59,61,8 - COMBOBOX IDC_FONT_QUALITY,167,58,80,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "AN&SI color",IDC_ANSICOLOR,5,73,43,8 - LISTBOX IDC_ANSI_COLOR,15,84,28,51,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - LTEXT "&Red",IDC_RED,45,87,22,8 - EDITTEXT IDC_COLOR_RED,69,85,19,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Green",IDC_GREEN,45,104,22,8 - EDITTEXT IDC_COLOR_GREEN,69,102,19,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "&Blue",IDC_BLUE,45,121,22,8 - EDITTEXT IDC_COLOR_BLUE,69,119,19,14,ES_AUTOHSCROLL | ES_NUMBER - LTEXT "SAMPLE",IDC_SAMPLE_COLOR,90,104,25,8 + COMBOBOX IDC_MOUSE_CURSOR,13,57,80,66,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + RTEXT "&Font Quality",IDC_FONT_QUALITY_LABEL,102,84,61,8 + COMBOBOX IDC_FONT_QUALITY,167,81,80,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "AN&SI color",IDC_ANSICOLOR,5,94,43,8 + LISTBOX IDC_ANSI_COLOR,15,105,28,51,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LTEXT "&Red",IDC_RED,45,108,22,8 + EDITTEXT IDC_COLOR_RED,69,106,19,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "&Green",IDC_GREEN,45,125,22,8 + EDITTEXT IDC_COLOR_GREEN,69,123,19,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "&Blue",IDC_BLUE,45,142,22,8 + EDITTEXT IDC_COLOR_BLUE,69,140,19,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "SAMPLE",IDC_SAMPLE_COLOR,90,125,25,8 CONTROL "Enable B&old attribute color",IDC_ENABLE_ATTR_COLOR_BOLD, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,74,105,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,97,105,12 CONTROL "Enable B&link attribute color",IDC_ENABLE_ATTR_COLOR_BLINK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,86,105,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,109,105,12 CONTROL "Enable Re&verse attribute color",IDC_ENABLE_ATTR_COLOR_REVERSE, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,98,105,12 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,121,105,12 CONTROL "Enable &URL attribute color",IDC_ENABLE_URL_COLOR, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,110,105,12 - CONTROL "Enable A&NSI color",IDC_ENABLE_ANSI_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,122,105,12 - CONTROL "Un&derline URL string",IDC_URL_UNDERLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,134,105,12 - LTEXT "(*)Need to Save setup and restart Tera Term",IDC_RESTART,15,152,237,8 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,133,105,12 + CONTROL "Enable A&NSI color",IDC_ENABLE_ANSI_COLOR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,145,105,12 + CONTROL "Un&derline URL string",IDC_URL_UNDERLINE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,125,157,105,12 + LTEXT "(*)Need to Save setup and restart Tera Term",IDC_RESTART,15,172,237,8 END IDD_TABSHEET_LOG DIALOGEX 0, 0, 258, 188 @@ -403,6 +405,7 @@ BEGIN LEFTMARGIN, 5 RIGHTMARGIN, 252 + VERTGUIDE, 48 TOPMARGIN, 5 BOTTOMMARGIN, 185 END Modified: trunk/teraterm/teraterm/vtdisp.c =================================================================== --- trunk/teraterm/teraterm/vtdisp.c 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/teraterm/vtdisp.c 2019-09-10 14:42:39 UTC (rev 8106) @@ -411,6 +411,15 @@ strncpy_s(tmp,tmplen,fullpath,filePart - fullpath); strncpy_s(filename,destlen,tmp,_TRUNCATE); } + + // \x83A\x83h\x83z\x83b\x83N\x82ł͂\xA0\x82邪\x81AImageFile.INI\x82Ȃ\xE7\x95ʖ\xBC\x82ɂ\xB7\x82\xE9\x81B + // ImageFile.INI\x82̓e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82Ƃ\xB5\x82Ďg\x82\xA6\x82Ȃ\xA2\x82\xBD\x82߁B + if (strcmp(filespec_src, BG_THEME_IMAGEFILE_DEFAULT) == 0) { + if (strcmp(fd.cFileName, BG_THEME_IMAGEFILE_NAME) == 0) { + _snprintf_s(fd.cFileName, sizeof(fd.cFileName), _TRUNCATE, "%s", BG_THEME_THEMEFILE_SCALE); + } + } + strncat_s(filename,destlen,fd.cFileName,_TRUNCATE); } @@ -1463,10 +1472,21 @@ DeleteFile(BGSrc2.fileTmp); } -void BGInitialize(void) +/* + * Eterm lookfeel\x8B@\x94\\x82ɂ\xE6\x82鏉\x8A\x{227B3C8}\x97\x9D + * + * initialize_once: + * TRUE: Tera Term\x82̋N\x93\xAE\x8E\x9E + * FALSE: Tera Term\x82̋N\x93\xAE\x8E\x9E\x88ȊO + */ +void BGInitialize(BOOL initialize_once) { char path[MAX_PATH],config_file[MAX_PATH],tempPath[MAX_PATH]; + ZeroMemory(path, sizeof(path)); + ZeroMemory(config_file, sizeof(config_file)); + ZeroMemory(tempPath, sizeof(tempPath)); + // VTColor \x82\xF0\x93ǂݍ\x9E\x82\xDD BGVTColor[0] = ts.VTColor[0]; BGVTColor[1] = ts.VTColor[1]; @@ -1530,9 +1550,17 @@ ts.BGImgBrightness = GetPrivateProfileInt(BG_SECTION, BG_THEME_IMAGE_BRIGHTNESS1, BG_THEME_IMAGE_BRIGHTNESS_DEFAULT, path); } + // BGEnable\x82\xAA\x90^\x82ł\xE0\x81Ainitialize_once == FALSE\x82̏ꍇ\x82͏\x89\x8A\xFA\x89\xBB\x82\xF0\x82\xB5\x82Ȃ\xA2\x81B + // Tera Term\x82̋N\x93\xAE\x8E\x9E\x82݂̂ɏ\x89\x8A\x{227B0B7}\x82\xE9\x81B + if (initialize_once) { + // Tera Term\x8BN\x93\xAE\x8E\x9E\x82Ɉ\xEA\x93x\x82\xBE\x82\xAF\x93ǂށB + ts.EtermLookfeel.BGIgnoreThemeFile = BGGetOnOff("BGIgnoreThemeFile", FALSE ,ts.SetupFName); + } + if(!BGEnable) return; + //\x97\x90\x90\x94\x8F\x89\x8A\xFA\x89\xBB // add cast (2006.2.18 yutaka) srand((unsigned int)time(NULL)); @@ -1584,6 +1612,14 @@ GetPrivateProfileString(BG_SECTION,"BGThemeFile","",path,MAX_PATH,ts.SetupFName); RandomFile(path,config_file,sizeof(config_file)); + // ImageFile.INI\x82ł͂Ȃ\xA2\x8Fꍇ\x82̓\x89\x83\x93\x83_\x83\x80\x82ɑI\x82ԁB + if (strstr(path, BG_THEME_IMAGEFILE_NAME) == NULL) { + // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82\x8B\x82\xB7\x82\xE9\x8Fꍇ\x82͋\xF3\x82ɂ\xB7\x82\xE9\x81B + if (ts.EtermLookfeel.BGIgnoreThemeFile) { + ZeroMemory(config_file, sizeof(config_file)); + } + } + //\x90ݒ\xE8\x82̃I\x81[\x83o\x81[\x83\x89\x83C\x83h if(strcmp(config_file,"")) { @@ -1812,7 +1848,7 @@ CRTWidth = GetSystemMetrics(SM_CXSCREEN); CRTHeight = GetSystemMetrics(SM_CYSCREEN); - BGInitialize(); + BGInitialize(TRUE); #else InitColorTable(); #endif // ALPHABLEND_TYPE2 Modified: trunk/teraterm/teraterm/vtdisp.h =================================================================== --- trunk/teraterm/teraterm/vtdisp.h 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/teraterm/vtdisp.h 2019-09-10 14:42:39 UTC (rev 8106) @@ -34,7 +34,7 @@ /* prototypes */ //<!--by AKASI -void BGInitialize(void); +void BGInitialize(BOOL initialize_once); void BGSetupPrimary(BOOL); void BGExchangeColor(void); Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/teraterm/vtwin.cpp 2019-09-10 14:42:39 UTC (rev 8106) @@ -1520,7 +1520,7 @@ /* background and ANSI color */ #ifdef ALPHABLEND_TYPE2 - BGInitialize(); + BGInitialize(FALSE); BGSetupPrimary(TRUE); // 2006/03/17 by 337 : Alpha\x92l\x82\xE0\x91\xA6\x8E\x9E\x95ύX // Layered\x91\x8B\x82ɂȂ\xC1\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ\x82͌\xF8\x89ʂ\xAA\x96\xB3\x82\xA2 @@ -4496,7 +4496,7 @@ break; case IDOK: #ifdef ALPHABLEND_TYPE2 - BGInitialize(); + BGInitialize(FALSE); BGSetupPrimary(TRUE); #else DispApplyANSIColor(); @@ -4570,7 +4570,7 @@ // Eterm lookfeel\x82̉\xE6\x96ʏ\xEE\x95\xF1\x82\xE0\x8DX\x90V\x82\xB7\x82邱\x82ƂŁA\x83\x8A\x83A\x83\x8B\x83^\x83C\x83\x80\x82ł̔w\x8Ci\x90F\x95ύX\x82\xAA // \x89\\x82ƂȂ\xE9\x81B(2006.2.24 yutaka) #ifdef ALPHABLEND_TYPE2 - BGInitialize(); + BGInitialize(FALSE); BGSetupPrimary(TRUE); #endif Modified: trunk/teraterm/ttpset/ttset.c =================================================================== --- trunk/teraterm/ttpset/ttset.c 2019-09-10 13:33:11 UTC (rev 8105) +++ trunk/teraterm/ttpset/ttset.c 2019-09-10 14:42:39 UTC (rev 8106) @@ -3055,6 +3055,8 @@ WritePrivateProfileString(BG_SECTION, BG_DESTFILE, ts->BGImageFilePath, Temp); WriteInt(BG_SECTION, BG_THEME_IMAGE_BRIGHTNESS1, Temp, ts->BGImgBrightness); WriteInt(BG_SECTION, BG_THEME_IMAGE_BRIGHTNESS2, Temp, ts->BGImgBrightness); + WriteOnOff(ETERM_SECTION, "BGIgnoreThemeFile", FName, + ts->EtermLookfeel.BGIgnoreThemeFile); #ifdef USE_NORMAL_BGCOLOR // UseNormalBGColor