Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpset/ttset.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10129 by zmatsuo, Tue Aug 9 01:08:26 2022 UTC revision 10134 by zmatsuo, Tue Aug 9 15:11:40 2022 UTC
# Line 740  static void WriteCygtermConfFile(PTTSet Line 740  static void WriteCygtermConfFile(PTTSet
740   */   */
741  static void DispReadIni(const wchar_t *FName, PTTSet ts)  static void DispReadIni(const wchar_t *FName, PTTSet ts)
742  {  {
743            wchar_t *base;
744            ts->EtermLookfeel.BGEnable = GetPrivateProfileInt(BG_SECTION, "BGEnable", 0, FName);
745          ts->EtermLookfeel.BGUseAlphaBlendAPI = GetOnOff(BG_SECTION, "BGUseAlphaBlendAPI", FName, TRUE);          ts->EtermLookfeel.BGUseAlphaBlendAPI = GetOnOff(BG_SECTION, "BGUseAlphaBlendAPI", FName, TRUE);
746          ts->EtermLookfeel.BGNoFrame = GetOnOff(BG_SECTION, "BGNoFrame", FName, FALSE);          ts->EtermLookfeel.BGNoFrame = GetOnOff(BG_SECTION, "BGNoFrame", FName, FALSE);
747          ts->EtermLookfeel.BGFastSizeMove = GetOnOff(BG_SECTION, "BGFastSizeMove", FName, TRUE);          ts->EtermLookfeel.BGFastSizeMove = GetOnOff(BG_SECTION, "BGFastSizeMove", FName, TRUE);
748          ts->EtermLookfeel.BGNoCopyBits = GetOnOff(BG_SECTION, "BGFlickerlessMove", FName, TRUE);          ts->EtermLookfeel.BGNoCopyBits = GetOnOff(BG_SECTION, "BGFlickerlessMove", FName, TRUE);
749            if (ts->EtermLookfeel.BGSPIPathW != NULL) {
750                    free(ts->EtermLookfeel.BGSPIPathW);
751            }
752            hGetPrivateProfileStringW(BG_SECTIONW, L"BGSPIPath", L"plugin", FName, &base);
753            if (base[0] == 0) {
754                    free(base);
755                    ts->EtermLookfeel.BGSPIPathW = NULL;
756            }
757            else {
758                    wchar_t *full;
759                    if (IsRelativePathW(base)) {
760                            aswprintf(&full, L"%s\\%s", ts->HomeDirW, base);
761                            ts->EtermLookfeel.BGSPIPathW = full;
762                            free(base);
763                    }
764                    else {
765                            ts->EtermLookfeel.BGSPIPathW = base;
766                    }
767            }
768            hGetPrivateProfileStringW(BG_SECTIONW, L"BGThemeFile", L"", FName, &base);
769            if (base[0] == 0) {
770                    free(base);
771                    ts->EtermLookfeel.BGThemeFileW = NULL;
772            }
773            else {
774                    if (IsRelativePathW(base)) {
775                            wchar_t *full;
776                            aswprintf(&full, L"%s\\%s", ts->HomeDirW, base);
777                            ts->EtermLookfeel.BGThemeFileW = full;
778                            free(base);
779                    }
780                    else {
781                            ts->EtermLookfeel.BGThemeFileW = base;
782                    }
783            }
784  }  }
785    
786  /**  /**
# Line 752  static void DispReadIni(const wchar_t *F Line 789  static void DispReadIni(const wchar_t *F
789   */   */
790  static void DispWriteIni(const wchar_t *FName, PTTSet ts)  static void DispWriteIni(const wchar_t *FName, PTTSet ts)
791  {  {
792            // Eterm lookfeel alphablend (theme file)
793            WriteInt(BG_SECTION, "BGEnable", FName, ts->EtermLookfeel.BGEnable);
794            WritePrivateProfileStringW(BG_SECTIONW, L"BGThemeFile",
795                                      ts->EtermLookfeel.BGThemeFileW, FName);
796          WriteOnOff(BG_SECTION, "BGUseAlphaBlendAPI", FName,          WriteOnOff(BG_SECTION, "BGUseAlphaBlendAPI", FName,
797                     ts->EtermLookfeel.BGUseAlphaBlendAPI);                     ts->EtermLookfeel.BGUseAlphaBlendAPI);
798          WritePrivateProfileString(BG_SECTION, "BGSPIPath",          WritePrivateProfileStringW(BG_SECTIONW, L"BGSPIPath",
799                                    ts->EtermLookfeel.BGSPIPath, FName);                                    ts->EtermLookfeel.BGSPIPathW, FName);
800          WriteOnOff(BG_SECTION, "BGFastSizeMove", FName,          WriteOnOff(BG_SECTION, "BGFastSizeMove", FName,
801                     ts->EtermLookfeel.BGFastSizeMove);                     ts->EtermLookfeel.BGFastSizeMove);
802          WriteOnOff(BG_SECTION, "BGFlickerlessMove", FName,          WriteOnOff(BG_SECTION, "BGFlickerlessMove", FName,
# Line 3129  void PASCAL _WriteIniFile(const wchar_t Line 3170  void PASCAL _WriteIniFile(const wchar_t
3170    
3171          DispWriteIni(FName, ts);          DispWriteIni(FName, ts);
3172    
         // Eterm lookfeel alphablend (2005.4.24 yutaka)  
         WriteOnOff(BG_SECTION, "BGEnable", FName,  
                    ts->EtermLookfeel.BGEnable);  
         WritePrivateProfileString(BG_SECTION, "BGThemeFile",  
                                   ts->EtermLookfeel.BGThemeFile, FName);  
   
3173          // themeフォルダを作る          // themeフォルダを作る
3174          {          {
3175                  wchar_t *theme_folder = NULL;                  wchar_t *theme_folder = NULL;
# Line 3145  void PASCAL _WriteIniFile(const wchar_t Line 3180  void PASCAL _WriteIniFile(const wchar_t
3180    
3181          // テーマファイルに保存("theme\\ImageFile.INI")          // テーマファイルに保存("theme\\ImageFile.INI")
3182          //              TODO BGThemeFileはチェックしなくてよい?          //              TODO BGThemeFileはチェックしなくてよい?
3183    #if 0
3184          {          {
3185                  wchar_t *theme_file = NULL;                  wchar_t *theme_file = NULL;
3186                  aswprintf(&theme_file, L"%s\\%hs", ts->HomeDirW, BG_THEME_IMAGEFILE);                  aswprintf(&theme_file, L"%s\\%hs", ts->HomeDirW, BG_THEME_IMAGEFILE);
# Line 3153  void PASCAL _WriteIniFile(const wchar_t Line 3189  void PASCAL _WriteIniFile(const wchar_t
3189                  WriteInt(BG_SECTION, BG_THEME_IMAGE_BRIGHTNESS2, theme_file, ts->BGImgBrightness);                  WriteInt(BG_SECTION, BG_THEME_IMAGE_BRIGHTNESS2, theme_file, ts->BGImgBrightness);
3190                  free(theme_file);                  free(theme_file);
3191          }          }
3192    #endif
         WriteOnOff(BG_SECTION, "BGIgnoreThemeFile", FName,  
                 ts->EtermLookfeel.BGIgnoreThemeFile);  
3193    
3194  #ifdef USE_NORMAL_BGCOLOR  #ifdef USE_NORMAL_BGCOLOR
3195          // UseNormalBGColor          // UseNormalBGColor
# Line 4212  void TTSetUnInit(TTTSet *ts) Line 4246  void TTSetUnInit(TTTSet *ts)
4246                  (void **)&ts->ExeDirW,                  (void **)&ts->ExeDirW,
4247                  (void **)&ts->LogDirW,                  (void **)&ts->LogDirW,
4248                  (void **)&ts->FileDirW,                  (void **)&ts->FileDirW,
                 (void **)&ts->BGImageFilePathW,  
4249                  (void **)&ts->LogDefaultPathW,                  (void **)&ts->LogDefaultPathW,
4250                  (void **)&ts->MacroFNW,                  (void **)&ts->MacroFNW,
4251                  (void **)&ts->LogFNW,                  (void **)&ts->LogFNW,

Legend:
Removed from v.10129  
changed lines
  Added in v.10134

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26