Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/ttssh2/ttxssh/hosts.c

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

revision 7592 by zmatsuo, Wed Apr 17 15:08:42 2019 UTC revision 7703 by zmatsuo, Tue May 21 14:27:30 2019 UTC
# Line 61  See LICENSE.TXT for the license. Line 61  See LICENSE.TXT for the license.
61  #define EndDialog(p1,p2) \  #define EndDialog(p1,p2) \
62          TTEndDialog(p1, p2)          TTEndDialog(p1, p2)
63    
 //static HFONT DlgHostsAddFont;  
 //static HFONT DlgHostsReplaceFont;  
   
64  // BASE64構成文字列(ここでは'='は含まれていない)  // BASE64構成文字列(ここでは'='は含まれていない)
65  static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";  static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
66    
# Line 1710  static BOOL CALLBACK hosts_add_dlg_proc( Line 1707  static BOOL CALLBACK hosts_add_dlg_proc(
1707                                          LPARAM lParam)                                          LPARAM lParam)
1708  {  {
1709          PTInstVar pvar;          PTInstVar pvar;
 //      LOGFONT logfont;  
 //      HFONT font;  
1710          char uimsg[MAX_UIMSG];          char uimsg[MAX_UIMSG];
1711    
1712          switch (msg) {          switch (msg) {
# Line 1784  static BOOL CALLBACK hosts_add_dlg_proc( Line 1779  static BOOL CALLBACK hosts_add_dlg_proc(
1779                  }                  }
1780    
1781                  init_hosts_dlg(pvar, dlg);                  init_hosts_dlg(pvar, dlg);
 #if 0  
                 font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);  
                 GetObject(font, sizeof(LOGFONT), &logfont);  
                 if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgHostsAddFont, pvar)) {  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FINGER_PRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                 }  
                 else {  
                         DlgHostsAddFont = NULL;  
                 }  
 #endif  
1782                  // add host check boxにチェックをデフォルトで入れておく                  // add host check boxにチェックをデフォルトで入れておく
1783                  SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);                  SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);
1784    
# Line 1835  static BOOL CALLBACK hosts_add_dlg_proc( Line 1809  static BOOL CALLBACK hosts_add_dlg_proc(
1809                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1810    
1811                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
 #if 0  
                         if (DlgHostsAddFont != NULL) {  
                                 DeleteObject(DlgHostsAddFont);  
                         }  
 #endif  
1812                          return TRUE;                          return TRUE;
1813    
1814                  case IDCANCEL:                  /* kill the connection */                  case IDCANCEL:                  /* kill the connection */
# Line 1847  canceled: Line 1816  canceled:
1816                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1817                          notify_closed_connection(pvar, "authentication cancelled");                          notify_closed_connection(pvar, "authentication cancelled");
1818                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
 #if 0  
                         if (DlgHostsAddFont != NULL) {  
                                 DeleteObject(DlgHostsAddFont);  
                         }  
 #endif  
1819                          return TRUE;                          return TRUE;
1820    
1821                  case IDC_FP_HASH_ALG_MD5:                  case IDC_FP_HASH_ALG_MD5:
# Line 1878  static BOOL CALLBACK hosts_replace_dlg_p Line 1842  static BOOL CALLBACK hosts_replace_dlg_p
1842                                              LPARAM lParam)                                              LPARAM lParam)
1843  {  {
1844          PTInstVar pvar;          PTInstVar pvar;
 //      LOGFONT logfont;  
 //      HFONT font;  
1845          char uimsg[MAX_UIMSG];          char uimsg[MAX_UIMSG];
1846    
1847          switch (msg) {          switch (msg) {
# Line 1952  static BOOL CALLBACK hosts_replace_dlg_p Line 1914  static BOOL CALLBACK hosts_replace_dlg_p
1914                  }                  }
1915    
1916                  init_hosts_dlg(pvar, dlg);                  init_hosts_dlg(pvar, dlg);
 #if 0  
                 font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);  
                 GetObject(font, sizeof(LOGFONT), &logfont);  
                 if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgHostsReplaceFont, pvar)) {  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));  
                 }  
                 else {  
                         DlgHostsReplaceFont = NULL;  
                 }  
 #endif  
1917                  CenterWindow(dlg, GetParent(dlg));                  CenterWindow(dlg, GetParent(dlg));
1918                  // デフォルトでチェックは入れない                  // デフォルトでチェックは入れない
1919                  return TRUE;                    /* because we do not set the focus */                  return TRUE;                    /* because we do not set the focus */
# Line 2000  static BOOL CALLBACK hosts_replace_dlg_p Line 1942  static BOOL CALLBACK hosts_replace_dlg_p
1942                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1943    
1944                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
 #if 0  
                         if (DlgHostsReplaceFont != NULL) {  
                                 DeleteObject(DlgHostsReplaceFont);  
                         }  
 #endif  
1945                          return TRUE;                          return TRUE;
1946    
1947                  case IDCANCEL:                  /* kill the connection */                  case IDCANCEL:                  /* kill the connection */
# Line 2012  canceled: Line 1949  canceled:
1949                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1950                          notify_closed_connection(pvar, "authentication cancelled");                          notify_closed_connection(pvar, "authentication cancelled");
1951                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
 #if 0  
                         if (DlgHostsReplaceFont != NULL) {  
                                 DeleteObject(DlgHostsReplaceFont);  
                         }  
 #endif  
1952                          return TRUE;                          return TRUE;
1953    
1954                  case IDC_FP_HASH_ALG_MD5:                  case IDC_FP_HASH_ALG_MD5:
# Line 2117  static BOOL CALLBACK hosts_add2_dlg_proc Line 2049  static BOOL CALLBACK hosts_add2_dlg_proc
2049                  }                  }
2050    
2051                  init_hosts_dlg(pvar, dlg);                  init_hosts_dlg(pvar, dlg);
 #if 0  
                 font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);  
                 GetObject(font, sizeof(LOGFONT), &logfont);  
                 if (UTIL_get_lang_font("DLG_TAHOMA_FONT", dlg, &logfont, &DlgHostsAddFont, pvar)) {  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPCHECK, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTSSHFPDNSSEC, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_MD5, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FP_HASH_ALG_SHA256, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_FINGER_PRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE, 0));  
                         SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                         SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));  
                 }  
                 else {  
                         DlgHostsAddFont = NULL;  
                 }  
 #endif  
2052                  CenterWindow(dlg, GetParent(dlg));                  CenterWindow(dlg, GetParent(dlg));
2053                  // add host check box のデフォルトは off にする                  // add host check box のデフォルトは off にする
2054                  // SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);                  // SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);
# Line 2167  static BOOL CALLBACK hosts_add2_dlg_proc Line 2078  static BOOL CALLBACK hosts_add2_dlg_proc
2078                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
2079    
2080                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
 #if 0  
                         if (DlgHostsAddFont != NULL) {  
                                 DeleteObject(DlgHostsAddFont);  
                         }  
 #endif  
2081                          return TRUE;                          return TRUE;
2082    
2083                  case IDCANCEL:                  /* kill the connection */                  case IDCANCEL:                  /* kill the connection */
# Line 2179  canceled: Line 2085  canceled:
2085                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
2086                          notify_closed_connection(pvar, "authentication cancelled");                          notify_closed_connection(pvar, "authentication cancelled");
2087                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
 #if 0  
                         if (DlgHostsAddFont != NULL) {  
                                 DeleteObject(DlgHostsAddFont);  
                         }  
 #endif  
2088                          return TRUE;                          return TRUE;
2089    
2090                  case IDC_FP_HASH_ALG_MD5:                  case IDC_FP_HASH_ALG_MD5:

Legend:
Removed from v.7592  
changed lines
  Added in v.7703

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