Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/filesys_proto.cpp

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

revision 10616 by zmatsuo, Wed Mar 1 14:18:19 2023 UTC revision 10617 by zmatsuo, Fri Mar 3 15:15:04 2023 UTC
# Line 193  static void FTSetTimeOut(PFileVarProto f Line 193  static void FTSetTimeOut(PFileVarProto f
193    
194  static void SetDialogCation(struct FileVarProto *fv, const char *key, const wchar_t *default_caption)  static void SetDialogCation(struct FileVarProto *fv, const char *key, const wchar_t *default_caption)
195  {  {
196          const char *UILanguageFile = ts.UILanguageFile;          const wchar_t *UILanguageFile = ts.UILanguageFileW;
197          wchar_t uimsg[MAX_UIMSG];          wchar_t *uimsg;
198          wchar_t caption[MAX_UIMSG];          wchar_t *caption;
199          wcsncpy_s(caption, _countof(caption), L"Tera Term: ", _TRUNCATE);          GetI18nStrWW("Tera Term", key, default_caption, UILanguageFile, &uimsg);
200          get_lang_msgW(key, uimsg, _countof(uimsg), default_caption, UILanguageFile);          aswprintf(&caption, L"Tera Term: %s", uimsg);
201          wcsncat_s(caption, _countof(caption), uimsg, _TRUNCATE);          free(uimsg);
202          free((void *)fv->DlgCaption);          free((void *)fv->DlgCaption);
203          fv->DlgCaption = _wcsdup(caption);          fv->DlgCaption = caption;
204  }  }
205    
206  static BOOL NewFileVar_(PFileVarProto *pfv)  static BOOL NewFileVar_(PFileVarProto *pfv)
# Line 338  static BOOL OpenProtoDlg(PFileVarProto f Line 338  static BOOL OpenProtoDlg(PFileVarProto f
338                  return FALSE;                  return FALSE;
339          }          }
340          CProtoDlgInfo info;          CProtoDlgInfo info;
341          info.UILanguageFile = ts.UILanguageFile;          info.UILanguageFileW = ts.UILanguageFileW;
342          info.HMainWin = fv->HMainWin;          info.HMainWin = fv->HMainWin;
343          pd->Create(hInst, HVTWin, &info);          pd->Create(hInst, HVTWin, &info);
344          fv->HWin = pd->m_hWnd;          fv->HWin = pd->m_hWnd;
# Line 429  static UINT_PTR CALLBACK XFnHook(HWND Di Line 429  static UINT_PTR CALLBACK XFnHook(HWND Di
429                  { IDC_XOPT1K, "DLG_XOPT_1K" },                  { IDC_XOPT1K, "DLG_XOPT_1K" },
430                  { IDC_XOPTBIN, "DLG_XOPT_BINARY" },                  { IDC_XOPTBIN, "DLG_XOPT_BINARY" },
431          };          };
         LPOPENFILENAMEW ofn;  
432          WORD Hi, Lo;          WORD Hi, Lo;
433          LPLONG pl;          LPLONG pl;
434          LPOFNOTIFY notify;          LPOFNOTIFY notify;
         LOGFONT logfont;  
         HFONT font;  
         const char *UILanguageFile = ts.UILanguageFile;  
435          const wchar_t *UILanguageFileW = ts.UILanguageFileW;          const wchar_t *UILanguageFileW = ts.UILanguageFileW;
436          static HFONT DlgXoptFont;          static HFONT DlgXoptFont;
437    
438          switch (Message) {          switch (Message) {
439          case WM_INITDIALOG:          case WM_INITDIALOG: {
440                  ofn = (LPOPENFILENAMEW)lParam;                  LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam;
441                    LOGFONTA logfont;
442                    HFONT font;
443                    const char *UILanguageFile = ts.UILanguageFile;
444    
445                  pl = (LPLONG)ofn->lCustData;                  pl = (LPLONG)ofn->lCustData;
446                  SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pl);                  SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pl);
447    
# Line 484  static UINT_PTR CALLBACK XFnHook(HWND Di Line 484  static UINT_PTR CALLBACK XFnHook(HWND Di
484                  }                  }
485                  CenterCommonDialog(Dialog);                  CenterCommonDialog(Dialog);
486                  return TRUE;                  return TRUE;
487            }
488          case WM_COMMAND: // for old style dialog          case WM_COMMAND: // for old style dialog
489                  switch (LOWORD(wParam)) {                  switch (LOWORD(wParam)) {
490                  case IDOK:                  case IDOK:
# Line 856  static UINT_PTR CALLBACK TransFnHook(HWN Line 857  static UINT_PTR CALLBACK TransFnHook(HWN
857          };          };
858          LPWORD pw;          LPWORD pw;
859          LPOFNOTIFY notify;          LPOFNOTIFY notify;
         LOGFONT logfont;  
         HFONT font;  
860          static HFONT DlgFoptFont;          static HFONT DlgFoptFont;
861    
862          switch (Message) {          switch (Message) {
# Line 865  static UINT_PTR CALLBACK TransFnHook(HWN Line 864  static UINT_PTR CALLBACK TransFnHook(HWN
864                  const char *UILanguageFile = ts.UILanguageFile;                  const char *UILanguageFile = ts.UILanguageFile;
865                  const wchar_t *UILanguageFileW = ts.UILanguageFileW;                  const wchar_t *UILanguageFileW = ts.UILanguageFileW;
866                  LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam;                  LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam;
867                    HFONT font;
868                    LOGFONTA logfont;
869                  pw = (LPWORD)ofn->lCustData;                  pw = (LPWORD)ofn->lCustData;
870                  SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pw);                  SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pw);
871    

Legend:
Removed from v.10616  
changed lines
  Added in v.10617

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