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 2942 by maya, Tue Dec 5 09:20:36 2006 UTC revision 2943 by maya, Wed Dec 6 14:25:40 2006 UTC
# Line 48  See LICENSE.TXT for the license. Line 48  See LICENSE.TXT for the license.
48  #include <errno.h>  #include <errno.h>
49  #include <sys/stat.h>  #include <sys/stat.h>
50    
51    #ifdef I18N
52    static HFONT DlgHostsAddFont;
53    static HFONT DlgHostsReplaceFont;
54    #endif
55    
56  // BASE64構成文字列(ここでは'='は含まれていない)  // BASE64構成文字列(ここでは'='は含まれていない)
57  static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";  static char base64[] ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
# Line 1248  static BOOL CALLBACK hosts_add_dlg_proc( Line 1252  static BOOL CALLBACK hosts_add_dlg_proc(
1252                                                                                  LPARAM lParam)                                                                                  LPARAM lParam)
1253  {  {
1254          PTInstVar pvar;          PTInstVar pvar;
1255    #ifdef I18N
1256            LOGFONT logfont;
1257            HFONT font;
1258    #endif
1259    
1260          switch (msg) {          switch (msg) {
1261          case WM_INITDIALOG:          case WM_INITDIALOG:
# Line 1288  static BOOL CALLBACK hosts_add_dlg_proc( Line 1296  static BOOL CALLBACK hosts_add_dlg_proc(
1296    
1297                  init_hosts_dlg(pvar, dlg);                  init_hosts_dlg(pvar, dlg);
1298    
1299    #ifdef I18N
1300                    font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);
1301                    GetObject(font, sizeof(LOGFONT), &logfont);
1302                    if (UTIL_get_lang_font("DLG_ABOUT_FONT", dlg, &logfont, &DlgHostsAddFont, pvar)) {
1303                            SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1304                            SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1305                            SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1306                            SendDlgItemMessage(dlg, IDC_FINGER_PRINT, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1307                            SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1308                            SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1309                            SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsAddFont, MAKELPARAM(TRUE,0));
1310                    }
1311                    else {
1312                            DlgHostsAddFont = NULL;
1313                    }
1314    #endif
1315    
1316                  // add host check boxにチェックをデフォルトで入れておく                  // add host check boxにチェックをデフォルトで入れておく
1317                  SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);                  SendMessage(GetDlgItem(dlg, IDC_ADDTOKNOWNHOSTS), BM_SETCHECK, BST_CHECKED, 0);
1318    
# Line 1311  static BOOL CALLBACK hosts_add_dlg_proc( Line 1336  static BOOL CALLBACK hosts_add_dlg_proc(
1336                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1337    
1338                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
1339    
1340    #ifdef I18N
1341                            if (DlgHostsAddFont != NULL) {
1342                                    DeleteObject(DlgHostsAddFont);
1343                            }
1344    #endif
1345    
1346                          return TRUE;                          return TRUE;
1347    
1348                  case IDCANCEL:                  /* kill the connection */                  case IDCANCEL:                  /* kill the connection */
1349                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1350                          notify_closed_connection(pvar);                          notify_closed_connection(pvar);
1351                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
1352    
1353    #ifdef I18N
1354                            if (DlgHostsAddFont != NULL) {
1355                                    DeleteObject(DlgHostsAddFont);
1356                            }
1357    #endif
1358    
1359                          return TRUE;                          return TRUE;
1360    
1361                  default:                  default:
# Line 1335  static BOOL CALLBACK hosts_replace_dlg_p Line 1374  static BOOL CALLBACK hosts_replace_dlg_p
1374                                                                                          LPARAM lParam)                                                                                          LPARAM lParam)
1375  {  {
1376          PTInstVar pvar;          PTInstVar pvar;
1377    #ifdef I18N
1378            LOGFONT logfont;
1379            HFONT font;
1380    #endif
1381    
1382          switch (msg) {          switch (msg) {
1383          case WM_INITDIALOG:          case WM_INITDIALOG:
# Line 1375  static BOOL CALLBACK hosts_replace_dlg_p Line 1418  static BOOL CALLBACK hosts_replace_dlg_p
1418    
1419                  init_hosts_dlg(pvar, dlg);                  init_hosts_dlg(pvar, dlg);
1420    
1421    #ifdef I18N
1422                    font = (HFONT)SendMessage(dlg, WM_GETFONT, 0, 0);
1423                    GetObject(font, sizeof(LOGFONT), &logfont);
1424                    if (UTIL_get_lang_font("DLG_ABOUT_FONT", dlg, &logfont, &DlgHostsReplaceFont, pvar)) {
1425                            SendDlgItemMessage(dlg, IDC_HOSTWARNING, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1426                            SendDlgItemMessage(dlg, IDC_HOSTWARNING2, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1427                            SendDlgItemMessage(dlg, IDC_HOSTFINGERPRINT, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1428                            SendDlgItemMessage(dlg, IDC_ADDTOKNOWNHOSTS, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1429                            SendDlgItemMessage(dlg, IDC_CONTINUE, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1430                            SendDlgItemMessage(dlg, IDCANCEL, WM_SETFONT, (WPARAM)DlgHostsReplaceFont, MAKELPARAM(TRUE,0));
1431                    }
1432                    else {
1433                            DlgHostsReplaceFont = NULL;
1434                    }
1435    #endif
1436    
1437                  // デフォルトでチェックは入れない                  // デフォルトでチェックは入れない
1438                  return TRUE;                    /* because we do not set the focus */                  return TRUE;                    /* because we do not set the focus */
1439    
# Line 1397  static BOOL CALLBACK hosts_replace_dlg_p Line 1456  static BOOL CALLBACK hosts_replace_dlg_p
1456                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1457    
1458                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
1459    
1460    #ifdef I18N
1461                            if (DlgHostsReplaceFont != NULL) {
1462                                    DeleteObject(DlgHostsReplaceFont);
1463                            }
1464    #endif
1465    
1466                          return TRUE;                          return TRUE;
1467    
1468                  case IDCANCEL:                  /* kill the connection */                  case IDCANCEL:                  /* kill the connection */
1469                          pvar->hosts_state.hosts_dialog = NULL;                          pvar->hosts_state.hosts_dialog = NULL;
1470                          notify_closed_connection(pvar);                          notify_closed_connection(pvar);
1471                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
1472    
1473    #ifdef I18N
1474                            if (DlgHostsReplaceFont != NULL) {
1475                                    DeleteObject(DlgHostsReplaceFont);
1476                            }
1477    #endif
1478    
1479                          return TRUE;                          return TRUE;
1480    
1481                  default:                  default:
# Line 1547  void HOSTS_end(PTInstVar pvar) Line 1620  void HOSTS_end(PTInstVar pvar)
1620    
1621  /*  /*
1622   * $Log: not supported by cvs2svn $   * $Log: not supported by cvs2svn $
1623     * Revision 1.12  2006/12/05 09:20:36  maya
1624     * 表示メッセージの読み込み対応
1625     *
1626   * Revision 1.11  2006/11/30 09:56:43  maya   * Revision 1.11  2006/11/30 09:56:43  maya
1627   * 表示メッセージの読み込み対応   * 表示メッセージの読み込み対応
1628   *   *

Legend:
Removed from v.2942  
changed lines
  Added in v.2943

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