Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/addsetting.cpp

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

revision 10472 by zmatsuo, Sat Jan 7 15:12:14 2023 UTC revision 10473 by zmatsuo, Wed Jan 11 14:41:17 2023 UTC
# Line 1718  void CLogPropPageDlg::OnOKLogFilename() Line 1718  void CLogPropPageDlg::OnOKLogFilename()
1718                          "MSG_ERROR", L"ERROR",                          "MSG_ERROR", L"ERROR",
1719                          "MSG_LOGFILE_INVALID_CHAR_ERROR", L"Invalid character is included in log file name.",                          "MSG_LOGFILE_INVALID_CHAR_ERROR", L"Invalid character is included in log file name.",
1720                          MB_ICONEXCLAMATION };                          MB_ICONEXCLAMATION };
1721                  TTMessageBoxA(m_hWnd, &info, ts.UILanguageFile);                  TTMessageBoxW(m_hWnd, &info, ts.UILanguageFileW);
1722                  return;                  return;
1723          }          }
1724    
# Line 1733  void CLogPropPageDlg::OnOKLogFilename() Line 1733  void CLogPropPageDlg::OnOKLogFilename()
1733                          "MSG_ERROR", L"ERROR",                          "MSG_ERROR", L"ERROR",
1734                          "MSG_LOGFILE_TOOLONG_ERROR", L"The log file name is too long.",                          "MSG_LOGFILE_TOOLONG_ERROR", L"The log file name is too long.",
1735                          MB_ICONEXCLAMATION };                          MB_ICONEXCLAMATION };
1736                  TTMessageBoxA(m_hWnd, &info, ts.UILanguageFile);                  TTMessageBoxW(m_hWnd, &info, ts.UILanguageFileW);
1737                  free(def_name);                  free(def_name);
1738                  return;                  return;
1739          }          }
# Line 1746  void CLogPropPageDlg::OnOKLogFilename() Line 1746  void CLogPropPageDlg::OnOKLogFilename()
1746                          "MSG_ERROR", L"ERROR",                          "MSG_ERROR", L"ERROR",
1747                          "MSG_LOGFILE_INVALID_CHAR_ERROR", L"Invalid character is included in log file name.",                          "MSG_LOGFILE_INVALID_CHAR_ERROR", L"Invalid character is included in log file name.",
1748                          MB_ICONEXCLAMATION };                          MB_ICONEXCLAMATION };
1749                  TTMessageBoxA(m_hWnd, &info, ts.UILanguageFile);                  TTMessageBoxW(m_hWnd, &info, ts.UILanguageFileW);
1750                  free(def_name);                  free(def_name);
1751                  free(buf3);                  free(buf3);
1752                  return;                  return;
# Line 1991  BOOL WriteCygtermConfFile(const char *ho Line 1991  BOOL WriteCygtermConfFile(const char *ho
1991          tmp_fp = fopen(cfg, "w");          tmp_fp = fopen(cfg, "w");
1992          if (tmp_fp == NULL) {          if (tmp_fp == NULL) {
1993                  return FALSE;                  return FALSE;
 #if 0  
                 char uimsg[MAX_UIMSG];  
                 get_lang_msg("MSG_ERROR", uimsg, sizeof(uimsg), "ERROR", ts->UILanguageFile);  
                 get_lang_msg("MSG_CYGTERM_CONF_WRITEFILE_ERROR", ts->UIMsg, sizeof(ts->UIMsg),  
                         "Can't write CygTerm configuration file (%d).", ts->UILanguageFile);  
                 _snprintf_s(buf, sizeof(buf), _TRUNCATE, ts->UIMsg, GetLastError());  
                 MessageBox(NULL, buf, uimsg, MB_ICONEXCLAMATION);  
 #endif  
1994          }          }
1995          else {          else {
1996                  if (linenum > 0) {                  if (linenum > 0) {
# Line 2244  void CCygwinPropPageDlg::OnOK() Line 2236  void CCygwinPropPageDlg::OnOK()
2236          // 変更されている場合 cygterm.cfg へ書き込む          // 変更されている場合 cygterm.cfg へ書き込む
2237          if (CmpCygtermConfFile(&settings_prop, &settings) == FALSE) {          if (CmpCygtermConfFile(&settings_prop, &settings) == FALSE) {
2238                  if (WriteCygtermConfFile(ts.HomeDir, &settings_prop) == FALSE) {                  if (WriteCygtermConfFile(ts.HomeDir, &settings_prop) == FALSE) {
2239                          char uimsg[MAX_UIMSG];                          static const TTMessageBoxInfoW info = {
2240                          char buf[256];                                  "Tera Term",
2241                          get_lang_msg("MSG_ERROR", uimsg, sizeof(uimsg), "ERROR", ts.UILanguageFile);                                  "MSG_ERROR", L"ERROR",
2242                          get_lang_msg("MSG_CYGTERM_CONF_WRITEFILE_ERROR", ts.UIMsg, sizeof(ts.UIMsg),                                  "MSG_CYGTERM_CONF_WRITEFILE_ERROR", L"Can't write CygTerm configuration file (%d).",
2243                                                   "Can't write CygTerm configuration file (%d).", ts.UILanguageFile);                                  MB_ICONEXCLAMATION };
2244                          _snprintf_s(buf, sizeof(buf), _TRUNCATE, ts.UIMsg, GetLastError());                          DWORD e = GetLastError();
2245                          MessageBoxA(buf, uimsg, MB_ICONEXCLAMATION);                          TTMessageBoxW(m_hWnd, &info, ts.UILanguageFileW, e);
2246                  }                  }
2247          }          }
2248    

Legend:
Removed from v.10472  
changed lines
  Added in v.10473

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