Revision: 10022 https://osdn.net/projects/ttssh2/scm/svn/commits/10022 Author: zmatsuo Date: 2022-06-26 01:14:48 +0900 (Sun, 26 Jun 2022) Log Message: ----------- 未使用部分削除 Modified Paths: -------------- branches/theme/teraterm/teraterm/addsetting.cpp branches/theme/teraterm/teraterm/vtdisp.c -------------- next part -------------- Modified: branches/theme/teraterm/teraterm/addsetting.cpp =================================================================== --- branches/theme/teraterm/teraterm/addsetting.cpp 2022-06-25 16:14:37 UTC (rev 10021) +++ branches/theme/teraterm/teraterm/addsetting.cpp 2022-06-25 16:14:48 UTC (rev 10022) @@ -696,6 +696,7 @@ EnableDlgItem(IDC_ALPHA_BLEND_INACTIVE, isLayeredWindowSupported); EnableDlgItem(IDC_ALPHA_BLEND_INACTIVE_TRACKBAR, isLayeredWindowSupported); + // (2) theme file { SendDlgItemMessageA(IDC_THEME_FILE, CB_ADDSTRING, 0, (LPARAM)"\x8Eg\x97p\x82\xB5\x82Ȃ\xA2"); SendDlgItemMessageA(IDC_THEME_FILE, CB_ADDSTRING, 1, (LPARAM)"\x8CŒ\xE8\x83e\x81[\x83}(\x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x8Ew\x92\xE8)"); @@ -711,58 +712,6 @@ SetDlgItemTextW(IDC_THEME_EDIT, ts.EtermLookfeel.BGThemeFileW); } -#if 0 - // (2)[BG] BGEnable - SetCheck(IDC_ETERM_LOOKFEEL, ts.EtermLookfeel.BGEnable); - - // Eterm look-feel\x82̔w\x8Ci\x89摜\x8Ew\x92\xE8\x81B - SetDlgItemTextA(IDC_BGIMG_EDIT, ts.BGImageFilePath); - - 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) { - EnableDlgItem(IDC_BGIMG_EDIT, TRUE); - EnableDlgItem(IDC_BGIMG_BUTTON, TRUE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, TRUE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, TRUE); - } else { - EnableDlgItem(IDC_BGIMG_EDIT, FALSE); - EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); - } - - } else { - EnableDlgItem(IDC_BGIMG_CHECK, FALSE); - EnableDlgItem(IDC_BGIMG_EDIT, FALSE); - EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); - - EnableDlgItem(IDC_MIXED_THEME_FILE, FALSE); - } -#endif - // (3)Mouse cursor type int sel = 0; for (int i = 0 ; MouseCursor[i].name ; i++) { @@ -900,74 +849,6 @@ EnableDlgItem(IDC_THEME_BUTTON, enable); break; } -#if 0 - 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); - EnableDlgItem(IDC_BGIMG_BUTTON, TRUE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, TRUE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, TRUE); - } else { - EnableDlgItem(IDC_BGIMG_EDIT, FALSE); - EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); - } - } else { - EnableDlgItem(IDC_BGIMG_CHECK, FALSE); - EnableDlgItem(IDC_BGIMG_EDIT, FALSE); - EnableDlgItem(IDC_BGIMG_BUTTON, FALSE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); - - // \x96\xB3\x8C\x{27B0B3}\x82ꂽ\x82\xE7\x81ABGThemeFile \x82\xF0\x8C\xB3\x82ɖ߂\xB7\x81B - strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE_DEFAULT, sizeof(ts.EtermLookfeel.BGThemeFile)); - // \x94w\x8Ci\x89摜\x82\xE0\x96\xB3\x8C\x{27B0B7}\x82\xE9\x81B - SetDlgItemText(IDC_BGIMG_EDIT, ""); - 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); - EnableDlgItem(IDC_BGIMG_BUTTON, TRUE); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, TRUE); - 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); - - EnableDlgItem(IDC_BGIMG_BRIGHTNESS, FALSE); - EnableDlgItem(IDC_EDIT_BGIMG_BRIGHTNESS, FALSE); - - // \x96\xB3\x8C\x{27B0B3}\x82ꂽ\x82\xE7\x81ABGThemeFile \x82\xF0\x8C\xB3\x82ɖ߂\xB7\x81B - strncpy_s(ts.EtermLookfeel.BGThemeFile, BG_THEME_IMAGEFILE_DEFAULT, sizeof(ts.EtermLookfeel.BGThemeFile)); - // \x94w\x8Ci\x89摜\x82\xE0\x96\xB3\x8C\x{27B0B7}\x82\xE9\x81B - SetDlgItemText(IDC_BGIMG_EDIT, ""); - SetDlgItemInt(IDC_EDIT_BGIMG_BRIGHTNESS, BG_THEME_IMAGE_BRIGHTNESS_DEFAULT); - } - return TRUE; -#endif case IDC_THEME_BUTTON | (BN_CLICKED << 16): { // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x82\xF0\x91I\x91\xF0\x82\xB7\x82\xE9 OPENFILENAMEW ofn = {}; @@ -1182,48 +1063,7 @@ (i > 255) ? 255 : i; } - // (2) -#if 0 - // \x83O\x83\x8D\x81[\x83o\x83\x8B\x95ϐ\x94 BGEnable \x82ڏ\x91\x82\xAB\x8A\xB7\x82\xA6\x82\xE9\x82ƁA\x83v\x83\x8D\x83O\x83\x89\x83\x80\x82\xAA\x97\x8E\x82\xBF\x82邱\x82Ƃ\xAA - // \x82\xA0\x82\xE9\x82̂ŃR\x83s\x81[\x82\xF0\x8FC\x90\xB3\x82\xB7\x82\xE9\x82݂̂Ƃ\xB7\x82\xE9\x81B(2005.4.24 yutaka) - if (ts.EtermLookfeel.BGEnable != GetCheck(IDC_ETERM_LOOKFEEL)) { - flag_changed = 1; - ts.EtermLookfeel.BGEnable = GetCheck(IDC_ETERM_LOOKFEEL); - } - if (ts.EtermLookfeel.BGEnable) { - GetDlgItemTextA(IDC_BGIMG_EDIT, ts.BGImageFilePath, sizeof(ts.BGImageFilePath)); - } else { - strncpy_s(ts.BGImageFilePath, sizeof(ts.BGImageFilePath), "%SystemRoot%\\Web\\Wallpaper\\*.bmp", _TRUNCATE); - } - - GetDlgItemTextA(IDC_EDIT_BGIMG_BRIGHTNESS, buf, sizeof(buf)); - if (isdigit(buf[0])) { - int i = atoi(buf); - ts.BGImgBrightness = - (i < 0) ? 0 : - (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)); - } -#endif + // (2) \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B\x91I\x91\xF0 { int r = GetCurSel(IDC_THEME_FILE); switch (r) { Modified: branches/theme/teraterm/teraterm/vtdisp.c =================================================================== --- branches/theme/teraterm/teraterm/vtdisp.c 2022-06-25 16:14:37 UTC (rev 10021) +++ branches/theme/teraterm/teraterm/vtdisp.c 2022-06-25 16:14:48 UTC (rev 10022) @@ -456,16 +456,6 @@ strncpy_s(filename,destlen,tmp,_TRUNCATE); } -#if 0 - // \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); - } - } -#endif - strncat_s(filename,destlen,fd.cFileName,_TRUNCATE); } @@ -1498,47 +1488,6 @@ if (!BGEnable) return; -#if 0 - // BG \x82\xAA\x97L\x8C\xF8\x82\xA9\x83`\x83F\x83b\x83N - // \x8B\xF3\x82̏ꍇ\x82̂݁A\x83f\x83B\x83X\x83N\x82\xA9\x82\xE7\x93ǂށBBGInitialize()\x82\xAA Tera Term \x8BN\x93\xAE\x8E\x9E\x88ȊO\x82ɂ\xE0\x81A - // Additional settings \x82\xA9\x82\xE7\x8CĂяo\x82\xB3\x82\xEA\x82邱\x82Ƃ\xAA\x82\xA0\x82邽\x82߁B - if (ts.EtermLookfeel.BGThemeFile[0] == '\0') { - ts.EtermLookfeel.BGEnable = BGEnable = BGGetOnOff("BGEnable", FALSE, ts.SetupFNameW); - } - else { - BGEnable = BGGetOnOff("BGEnable", FALSE, ts.SetupFNameW); - } - - hGetPrivateProfileStringW(BG_SECTIONW, L"BGSPIPath", L"plugin", ts.SetupFNameW, &ts.EtermLookfeel.BGSPIPathW); - WideCharToACP_t(ts.EtermLookfeel.BGSPIPathW, ts.EtermLookfeel.BGSPIPath, sizeof(ts.EtermLookfeel.BGSPIPath)); - - if (ts.EtermLookfeel.BGThemeFile[0] == '\0') { - wchar_t *theme_imagefile; - - //\x83R\x83\x93\x83t\x83B\x83O\x83t\x83@\x83C\x83\x8B(\x83e\x81[\x83}\x83t\x83@\x83C\x83\x8B)\x82̌\x88\x92\xE8 - hGetPrivateProfileStringW(BG_SECTIONW, L"BGThemeFile", L"", ts.SetupFNameW, &ts.EtermLookfeel.BGThemeFileW); - WideCharToACP_t(ts.EtermLookfeel.BGThemeFileW, ts.EtermLookfeel.BGThemeFile, sizeof(ts.EtermLookfeel.BGThemeFile)); - - // \x83e\x81[\x83}\x83t\x83@\x83C\x83\x8BImageFile.INI\x82\xA9\x82\xE7 - aswprintf(&theme_imagefile, L"%s\\%hs", ts.HomeDirW, BG_THEME_IMAGEFILE); - - // \x8Eg\x82\xED\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x81A\x95s\x97v - // \x94w\x8Ci\x89摜\x82̖\xBE\x82邳\x82̓ǂݍ\x9E\x82݁B - // BGSrc1Alpha \x82\xC6 BGSrc2Alpha\x82͓\xAF\x92l\x82Ƃ\xB5\x82Ĉ\xB5\x82\xA4\x81B - ts.BGImgBrightness = - GetPrivateProfileIntW(BG_SECTIONW, BG_THEME_IMAGE_BRIGHTNESS1W, BG_THEME_IMAGE_BRIGHTNESS_DEFAULT, theme_imagefile); - - free(theme_imagefile); - } - - // 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.SetupFNameW); - } -#endif - //\x97\x90\x90\x94\x8F\x89\x8A\xFA\x89\xBB // add cast (2006.2.18 yutaka) srand((unsigned int)time(NULL));