scmno****@osdn*****
scmno****@osdn*****
2018年 7月 13日 (金) 00:26:23 JST
Revision: 7145 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7145 Author: zmatsuo Date: 2018-07-13 00:26:23 +0900 (Fri, 13 Jul 2018) Log Message: ----------- drag and dropダイアログファイル分離 - サイズ調整 - far,pascalキーワード削除(一部) - プロジェクトの依存関係がおかしかったので修正(VS2017) Modified Paths: -------------- branches/drag_and_drop/teraterm/common/i18n.c branches/drag_and_drop/teraterm/common/i18n.h branches/drag_and_drop/teraterm/common/ttlib.c branches/drag_and_drop/teraterm/common/ttlib.h branches/drag_and_drop/teraterm/common/tttypes.h branches/drag_and_drop/teraterm/svnrev/svnrev.cpp branches/drag_and_drop/teraterm/svnrev/svnrev.v15.vcxproj branches/drag_and_drop/teraterm/teraterm/ttermpro.rc branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj.filters branches/drag_and_drop/teraterm/teraterm/vtdisp.c branches/drag_and_drop/teraterm/teraterm/vtwin.cpp branches/drag_and_drop/teraterm/ttpdlg/ttdlg.c branches/drag_and_drop/teraterm/ttpdlg/ttpdlg.v15.vcxproj branches/drag_and_drop/teraterm/ttpfile/ttpfile.v15.vcxproj branches/drag_and_drop/teraterm/ttpmacro/ttpmacro.v15.vcxproj branches/drag_and_drop/teraterm/ttpset/ttpset.v15.vcxproj branches/drag_and_drop/teraterm/ttptek/ttptek.v15.vcxproj Added Paths: ----------- branches/drag_and_drop/teraterm/teraterm/dnddlg.cpp branches/drag_and_drop/teraterm/teraterm/dnddlg.h -------------- next part -------------- Modified: branches/drag_and_drop/teraterm/common/i18n.c =================================================================== --- branches/drag_and_drop/teraterm/common/i18n.c 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/common/i18n.c 2018-07-12 15:26:23 UTC (rev 7145) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2017 TeraTerm Project + * Copyright (C) 2006-2018 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,13 +28,13 @@ #include "i18n.h" -void PASCAL GetI18nStr(PCHAR section, PCHAR key, PCHAR buf, int buf_len, PCHAR def, PCHAR iniFile) +void GetI18nStr(PCHAR section, PCHAR key, PCHAR buf, int buf_len, PCHAR def, const char *iniFile) { GetPrivateProfileString(section, key, def, buf, buf_len, iniFile); RestoreNewLine(buf); } -int PASCAL GetI18nLogfont(PCHAR section, PCHAR key, PLOGFONT logfont, int ppi, PCHAR iniFile) +int GetI18nLogfont(PCHAR section, PCHAR key, PLOGFONT logfont, int ppi, const char *iniFile) { static char tmp[MAX_UIMSG]; static char font[LF_FACESIZE]; Modified: branches/drag_and_drop/teraterm/common/i18n.h =================================================================== --- branches/drag_and_drop/teraterm/common/i18n.h 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/common/i18n.h 2018-07-12 15:26:23 UTC (rev 7145) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2017 TeraTerm Project + * Copyright (C) 2006-2018 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -38,8 +38,8 @@ extern "C" { #endif -void PASCAL GetI18nStr(PCHAR section, PCHAR key, PCHAR buf, int buf_len, PCHAR def, PCHAR iniFile); -int PASCAL GetI18nLogfont(PCHAR section, PCHAR key, PLOGFONT logfont, int ppi, PCHAR iniFile); +void GetI18nStr(PCHAR section, PCHAR key, PCHAR buf, int buf_len, PCHAR def, const char *iniFile); +int GetI18nLogfont(PCHAR section, PCHAR key, PLOGFONT logfont, int ppi, const char *iniFile); #ifdef __cplusplus } Modified: branches/drag_and_drop/teraterm/common/ttlib.c =================================================================== --- branches/drag_and_drop/teraterm/common/ttlib.c 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/common/ttlib.c 2018-07-12 15:26:23 UTC (rev 7145) @@ -970,12 +970,12 @@ strncpy_s(buf, buflen, Temp, _TRUNCATE); } -void get_lang_msg(PCHAR key, PCHAR buf, int buf_len, PCHAR def, PCHAR iniFile) +void get_lang_msg(PCHAR key, PCHAR buf, int buf_len, PCHAR def, const char *iniFile) { GetI18nStr("Tera Term", key, buf, buf_len, def, iniFile); } -int get_lang_font(PCHAR key, HWND dlg, PLOGFONT logfont, HFONT *font, PCHAR iniFile) +int get_lang_font(PCHAR key, HWND dlg, PLOGFONT logfont, HFONT *font, const char *iniFile) { if (GetI18nLogfont("Tera Term", key, logfont, GetDeviceCaps(GetDC(dlg),LOGPIXELSY), Modified: branches/drag_and_drop/teraterm/common/ttlib.h =================================================================== --- branches/drag_and_drop/teraterm/common/ttlib.h 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/common/ttlib.h 2018-07-12 15:26:23 UTC (rev 7145) @@ -67,8 +67,8 @@ void GetDefaultSetupFName(char *home, char *dest, int destlen); void GetUILanguageFile(char *buf, int buflen); void GetOnOffEntryInifile(char *entry, char *buf, int buflen); -void get_lang_msg(PCHAR key, PCHAR buf, int buf_len, PCHAR def, PCHAR iniFile); -int get_lang_font(PCHAR key, HWND dlg, PLOGFONT logfont, HFONT *font, PCHAR iniFile); +void get_lang_msg(PCHAR key, PCHAR buf, int buf_len, PCHAR def, const char *iniFile); +int get_lang_font(PCHAR key, HWND dlg, PLOGFONT logfont, HFONT *font, const char *iniFile); BOOL doSelectFolder(HWND hWnd, char *path, int pathlen, char *def, char *msg); void OutputDebugPrintf(char *fmt, ...); BOOL is_NT4(); Modified: branches/drag_and_drop/teraterm/common/tttypes.h =================================================================== --- branches/drag_and_drop/teraterm/common/tttypes.h 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/common/tttypes.h 2018-07-12 15:26:23 UTC (rev 7145) @@ -684,7 +684,6 @@ }; typedef struct tttset TTTSet, *PTTSet; -//typedef TTTSet far *PTTSet; /* New Line modes */ #define IdCR 1 @@ -782,11 +781,6 @@ /* Baud rate ID */ #define BaudNone 0 -static PCHAR far BaudList[] = - {"110","300","600","1200","2400","4800","9600", - "14400","19200","38400","57600","115200", - "230400", "460800", "921600", NULL}; - /* Parity ID */ #define IdParityNone 1 #define IdParityOdd 2 @@ -817,7 +811,7 @@ WORD ComPort; // serial port # WORD MaxComPort; // max serial port # } TGetHNRec; -typedef TGetHNRec far *PGetHNRec; +typedef TGetHNRec *PGetHNRec; /* Tera Term internal key codes */ #define IdUp 1 @@ -935,7 +929,7 @@ /* user key type */ BYTE UserKeyType[NumOfUserKey]; } TKeyMap; -typedef TKeyMap far *PKeyMap; +typedef TKeyMap *PKeyMap; /* Control Characters */ @@ -1093,7 +1087,7 @@ DWORD ConnectedTime; } TComVar; -typedef TComVar far *PComVar; +typedef TComVar *PComVar; #define ID_FILE 0 #define ID_EDIT 1 @@ -1138,7 +1132,7 @@ BOOL WinUndoFlag; int WinUndoStyle; } TMap; -typedef TMap far *PMap; +typedef TMap *PMap; // TMap \x82\xF0\x8Ai\x94[\x82\xB7\x82\xE9\x83t\x83@\x83C\x83\x8B\x83}\x83b\x83s\x83\x93\x83O\x83I\x83u\x83W\x83F\x83N\x83g(\x8B\xA4\x97L\x83\x81\x83\x82\x83\x8A)\x82̖\xBC\x91O // TMap(\x82Ƃ\xBB\x82̃\x81\x83\x93\x83o)\x82̍X\x90V\x8E\x9E\x82͋\x8C\x83o\x81[\x83W\x83\x87\x83\x93\x82Ƃ̓\xAF\x8E\x9E\x8BN\x93\xAE\x82ׂ̈ɕς\xA6\x82\xE9\x95K\x97v\x82\xAA\x82\xA0\x82邪 Modified: branches/drag_and_drop/teraterm/svnrev/svnrev.cpp =================================================================== --- branches/drag_and_drop/teraterm/svnrev/svnrev.cpp 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/svnrev/svnrev.cpp 2018-07-12 15:26:23 UTC (rev 7145) @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009-2017 TeraTerm Project + * Copyright (C) 2009-2018 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,10 @@ // _popen \x82̓X\x83y\x81[\x83X\x82\xAA\x8A܂܂\xEA\x82\xE9\x8Fꍇ\x82Ƀ_\x83u\x83\x8B\x83N\x83H\x81[\x83g\x82ň͂\xF1\x82ł\xE0 // \x82\xA4\x82܂\xAD\x93\xAE\x82\xA9\x82Ȃ\xA2\x82\xBD\x82\xDF 8.3 \x8C`\x8E\xAE\x82ɕϊ\xB7 - GetShortPathName(svnversion, arg1, sizeof(arg1)); + DWORD r = GetShortPathName(svnversion, arg1, sizeof(arg1)); + if (r == 0) { + return -1; // svn did not exist + } GetShortPathName(path, arg2, sizeof(arg2)); _snprintf_s(command, sizeof(command), _TRUNCATE, "%s -n %s", arg1, arg2); Modified: branches/drag_and_drop/teraterm/svnrev/svnrev.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/svnrev/svnrev.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/svnrev/svnrev.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -63,6 +63,7 @@ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -77,6 +78,7 @@ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> Added: branches/drag_and_drop/teraterm/teraterm/dnddlg.cpp =================================================================== --- branches/drag_and_drop/teraterm/teraterm/dnddlg.cpp (rev 0) +++ branches/drag_and_drop/teraterm/teraterm/dnddlg.cpp 2018-07-12 15:26:23 UTC (rev 7145) @@ -0,0 +1,329 @@ +/* + * (C) 2005-2018 TeraTerm Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "dnddlg.h" + +#include <windowsx.h> +#include <stdio.h> // for _snprintf_s + +#include "tt_res.h" + +#include "i18n.h" +#include "ttlib.h" +#include "dlglib.h" +#include "tttypes.h" // for ttwinman.h +#include "ttwinman.h" // for ts + +struct DlgTextInfo { + int nIDDlgItem; + char *key; +}; + +struct DrapDropDlgParam { + const char *TargetFilename; + enum drop_type DropType; + unsigned char DropTypePaste; + bool ScpEnable; + char *ScpSendDirPtr; + int ScpSendDirSize; + bool SendfileEnable; + bool PasteNewlineEnable; + int RemaingFileCount; + bool DoSameProcess; + bool DoSameProcessNextDrop; + bool DoNotShowDialogEnable; + bool DoNotShowDialog; + const char *UILanguageFile; +}; + +struct DrapDropDlgData { + HFONT hPrevFont; + DrapDropDlgParam *Param; +}; + +static HFONT SetDlgFonts(HWND hDlg, const int nIDDlgItems[], int nIDDlgItemCount, const char *UILanguageFile, PCHAR key) +{ + if (key == NULL) key = "DLG_TAHOMA_FONT"; + HFONT hPrevFont = (HFONT)SendMessage(hDlg, WM_GETFONT, 0, 0); + LOGFONT logfont; + GetObject(hPrevFont, sizeof(LOGFONT), &logfont); + HFONT hNewFont; + if (get_lang_font("DLG_TAHOMA_FONT", hDlg, &logfont, &hNewFont, UILanguageFile)) { + for (int i = 0 ; i < nIDDlgItemCount ; i++) { + const int nIDDlgItem = nIDDlgItems[i]; + SendDlgItemMessage(hDlg, nIDDlgItem, WM_SETFONT, (WPARAM)hNewFont, MAKELPARAM(TRUE,0)); + } + } + return hNewFont; +} + +static void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, const char *UILanguageFile) +{ + for (int i = 0 ; i < infoCount; i++) { + char *key = infos[i].key; + char uimsg[MAX_UIMSG]; + get_lang_msg(key, uimsg, sizeof(uimsg), "", UILanguageFile); + if (uimsg[0] != '\0') { + const int nIDDlgItem = infos[i].nIDDlgItem; + if (nIDDlgItem == 0) { + SetWindowText(hDlgWnd, uimsg); + } else { + SetDlgItemText(hDlgWnd, nIDDlgItem, uimsg); + } + } + } +} + +static LRESULT CALLBACK OnDragDropDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp) +{ + static const int FontIDs[] = { + IDC_FILENAME_EDIT, + IDC_DAD_STATIC, + IDC_SCP_RADIO, IDC_SENDFILE_RADIO, IDC_PASTE_RADIO, + IDC_SCP_PATH_LABEL, IDC_SCP_PATH, IDC_SCP_PATH_NOTE, + IDC_BINARY_CHECK, + IDC_ESCAPE_CHECK, IDC_NEWLINE_RADIO, IDC_SPACE_RADIO, + IDC_SAME_PROCESS_CHECK, IDC_SAME_PROCESS_NEXTDROP_CHECK, IDC_DONTSHOW_CHECK, + IDC_DAD_NOTE, + IDOK, IDCANCEL, + }; + static const DlgTextInfo TextInfos[] = { + { 0, "DLG_DANDD_TITLE" }, + { IDC_DAD_STATIC, "DLG_DANDD_TEXT" }, + { IDC_SCP_PATH_NOTE, "DLG_DADDD_DEST_NOTE" }, + { IDC_SAME_PROCESS_CHECK, "DLG_DANDD_CONFLICTS" }, + { IDC_SAME_PROCESS_NEXTDROP_CHECK, "DLG_DANDD_SAME_NEEXTDROP" }, + { IDC_DONTSHOW_CHECK, "DLG_DANDD_DONTSHOW_NEEXTDROP" }, + { IDC_DAD_NOTE, "DLG_DANDD_NOTE" }, + { IDOK, "BTN_OK" }, + { IDCANCEL, "BTN_CANCEL" }, + }; + DrapDropDlgData *DlgData = (DrapDropDlgData *)GetWindowLongPtr(hDlgWnd, GWLP_USERDATA); + + switch (msg) { + case WM_INITDIALOG: + { + DlgData = (DrapDropDlgData *)malloc(sizeof(DrapDropDlgData)); + SetWindowLongPtr(hDlgWnd, GWLP_USERDATA, (LONG_PTR)DlgData); + DrapDropDlgParam *Param = (DrapDropDlgParam *)lp; + DlgData->Param = Param; + DlgData->hPrevFont = SetDlgFonts(hDlgWnd, FontIDs, _countof(FontIDs), Param->UILanguageFile, NULL); + SetDlgTexts(hDlgWnd, TextInfos, _countof(TextInfos), Param->UILanguageFile); + + // target file + SetDlgItemText(hDlgWnd, IDC_FILENAME_EDIT, Param->TargetFilename); + + // checkbox + CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, + (Param->DropType == DROP_TYPE_SEND_FILE || + Param->DropType == DROP_TYPE_SEND_FILE_BINARY) ? IDC_SENDFILE_RADIO : + Param->DropType == DROP_TYPE_PASTE_FILENAME ? IDC_PASTE_RADIO : + IDC_SCP_RADIO); + + // SCP + SendMessage(GetDlgItem(hDlgWnd, IDC_SCP_PATH), WM_SETTEXT, 0, (LPARAM)Param->ScpSendDirPtr); + if (!Param->ScpEnable) { + // 無効化 + EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_RADIO), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH_LABEL), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH_NOTE), FALSE); + } + + // Send File + if (Param->DropType == DROP_TYPE_SEND_FILE_BINARY) { + SendMessage(GetDlgItem(hDlgWnd, IDC_BINARY_CHECK), BM_SETCHECK, BST_CHECKED, 0); + } + if (!Param->SendfileEnable) { + // 無効化 + EnableWindow(GetDlgItem(hDlgWnd, IDC_SENDFILE_RADIO), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_BINARY_CHECK), FALSE); + } + + // Paste Filename + if (Param->DropTypePaste & DROP_TYPE_PASTE_ESCAPE) { + SendMessage(GetDlgItem(hDlgWnd, IDC_ESCAPE_CHECK), BM_SETCHECK, BST_CHECKED, 0); + } + CheckRadioButton(hDlgWnd, IDC_SPACE_RADIO, IDC_NEWLINE_RADIO, + Param->DropTypePaste & DROP_TYPE_PASTE_NEWLINE? + IDC_NEWLINE_RADIO : IDC_SPACE_RADIO); + if (Param->RemaingFileCount < 2) { + EnableWindow(GetDlgItem(hDlgWnd, IDC_SPACE_RADIO), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_NEWLINE_RADIO), FALSE); + } + + // Do this for the next %d conflicts + char orgmsg[MAX_UIMSG]; + GetDlgItemText(hDlgWnd, IDC_SAME_PROCESS_CHECK, orgmsg, sizeof(orgmsg)); + char uimsg[MAX_UIMSG]; + _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, orgmsg, Param->RemaingFileCount - 1); + SetDlgItemText(hDlgWnd, IDC_SAME_PROCESS_CHECK, uimsg); + if (Param->RemaingFileCount < 2) { + EnableWindow(GetDlgItem(hDlgWnd, IDC_SAME_PROCESS_CHECK), FALSE); + } + + // Dont Show Dialog + if (Param->DoNotShowDialog) { + SendMessage(GetDlgItem(hDlgWnd, IDC_DONTSHOW_CHECK), BM_SETCHECK, BST_CHECKED, 0); + } + if (!Param->DoNotShowDialogEnable) { + EnableWindow(GetDlgItem(hDlgWnd, IDC_DONTSHOW_CHECK), FALSE); + EnableWindow(GetDlgItem(hDlgWnd, IDC_DAD_NOTE), FALSE); + } + + // focus to "SCP dest textbox" or "Cancel" + if (Param->ScpEnable) { + // "SCP" 有効時は Cancel にフォーカスを当て、最終的に SCP PATH にフォーカスが + // 当たるようにする。 + SetFocus(GetDlgItem(hDlgWnd, IDC_SCP_RADIO)); + } else { + // フォーカスの初期状態を Cancel にする為、この時点では IDOK に + // フォーカスを当てる。後で WM_NEXTDLGCTL でフォーカスが次のボタンになる。 + SetFocus(GetDlgItem(hDlgWnd, IDOK)); + } + // フォーカスを次のボタンに移す + // SetFocus() で直接フォーカスを当てるとタブキーの動作等に問題が出るため、 + // このメッセージを併用する + PostMessage(hDlgWnd, WM_NEXTDLGCTL, 0, 0L); + + // TRUEにするとボタンにフォーカスが当たらない。 + return FALSE; + } + + case WM_COMMAND: + { + WORD wID = GET_WM_COMMAND_ID(wp, lp); + const WORD wCMD = GET_WM_COMMAND_CMD(wp, lp); + if (wCMD == BN_DBLCLK && + (wID == IDC_SCP_RADIO || wID == IDC_SENDFILE_RADIO || wID == IDC_PASTE_RADIO)) + { // radio buttons double click + wID = IDOK; + } + if (wCMD == EN_SETFOCUS && wID == IDC_SCP_PATH) { + CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_SCP_RADIO); + } + if (wID == IDC_BINARY_CHECK) { + CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_SENDFILE_RADIO); + } + if (wID == IDC_ESCAPE_CHECK || + wID == IDC_SPACE_RADIO || wID == IDC_NEWLINE_RADIO) + { + CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_PASTE_RADIO); + } + if (wID == IDOK) { + if (IsDlgButtonChecked(hDlgWnd, IDC_SCP_RADIO) == BST_CHECKED) { + // SCP + DlgData->Param->DropType = DROP_TYPE_SCP; + SendMessage(GetDlgItem(hDlgWnd, IDC_SCP_PATH), WM_GETTEXT, + (WPARAM)DlgData->Param->ScpSendDirSize, + (LPARAM)DlgData->Param->ScpSendDirPtr); + } else if (IsDlgButtonChecked(hDlgWnd, IDC_SENDFILE_RADIO) == BST_CHECKED) { + // Send File + DlgData->Param->DropType = + (IsDlgButtonChecked(hDlgWnd, IDC_BINARY_CHECK) == BST_CHECKED) ? + DROP_TYPE_SEND_FILE_BINARY : DROP_TYPE_SEND_FILE; + } else /* if (IsDlgButtonChecked(hDlgWnd, IDC_PASTE_RADIO) == BST_CHECKED) */ { + // Paste Filename + DlgData->Param->DropType = DROP_TYPE_PASTE_FILENAME; + DlgData->Param->DropTypePaste = 0; + DlgData->Param->DropTypePaste |= + (IsDlgButtonChecked(hDlgWnd, IDC_ESCAPE_CHECK) == BST_CHECKED) ? + DROP_TYPE_PASTE_ESCAPE : 0; + DlgData->Param->DropTypePaste |= + (IsDlgButtonChecked(hDlgWnd, IDC_NEWLINE_RADIO) == BST_CHECKED) ? + DROP_TYPE_PASTE_NEWLINE : 0; + } + DlgData->Param->DoSameProcess = + (IsDlgButtonChecked(hDlgWnd, IDC_SAME_PROCESS_CHECK) == BST_CHECKED) ? + true : false; + DlgData->Param->DoSameProcessNextDrop = + (IsDlgButtonChecked(hDlgWnd, IDC_SAME_PROCESS_NEXTDROP_CHECK) == BST_CHECKED) ? + true : false; + DlgData->Param->DoNotShowDialog = + (IsDlgButtonChecked(hDlgWnd, IDC_DONTSHOW_CHECK) == BST_CHECKED) ? + true : false; + } + if (wID == IDCANCEL) { + DlgData->Param->DropType = DROP_TYPE_CANCEL; + } + if (wID == IDOK || wID == IDCANCEL) { + if (DlgData->hPrevFont != NULL) { + DeleteObject(DlgData->hPrevFont); + } + EndDialog(hDlgWnd, wID); + free(DlgData); + break; + } + return FALSE; + } + + default: + return FALSE; + } + return TRUE; +} + +enum drop_type ShowDropDialogBox( + HINSTANCE hInstance, HWND hWndParent, + const char *TargetFilename, + enum drop_type DefaultDropType, + int RemaingFileCount, + bool EnableSCP, + bool EnableSendFile, + bool EnableDoNotShowDialog, + unsigned char *DropTypePaste, + bool *DoSameProcess, + bool *DoSameProcessNextDrop, + bool *DoNotShowDialog) +{ + DrapDropDlgParam Param; + Param.TargetFilename = TargetFilename; + Param.DropType = DefaultDropType; + Param.DropTypePaste = *DropTypePaste; + Param.ScpEnable = EnableSCP; + Param.ScpSendDirPtr = ts.ScpSendDir; + Param.ScpSendDirSize = sizeof(ts.ScpSendDir); + Param.SendfileEnable = EnableSendFile; + Param.PasteNewlineEnable = true; + Param.RemaingFileCount = RemaingFileCount; + Param.DoNotShowDialog = *DoNotShowDialog; + Param.DoNotShowDialogEnable = EnableDoNotShowDialog; + Param.UILanguageFile = ts.UILanguageFile; + int ret = DialogBoxParam( + hInstance, MAKEINTRESOURCE(IDD_DAD_DIALOG), + hWndParent, (DLGPROC)OnDragDropDlgProc, + (LPARAM)&Param); + if (ret != IDOK) { + return DROP_TYPE_CANCEL; + } + *DropTypePaste = Param.DropTypePaste; + *DoSameProcess = Param.DoSameProcess; + *DoSameProcessNextDrop = Param.DoSameProcessNextDrop; + *DoNotShowDialog = Param.DoNotShowDialog; + return Param.DropType; +} Added: branches/drag_and_drop/teraterm/teraterm/dnddlg.h =================================================================== --- branches/drag_and_drop/teraterm/teraterm/dnddlg.h (rev 0) +++ branches/drag_and_drop/teraterm/teraterm/dnddlg.h 2018-07-12 15:26:23 UTC (rev 7145) @@ -0,0 +1,53 @@ +/* + * (C) 2005-2018 TeraTerm Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <windows.h> + +enum drop_type { + DROP_TYPE_CANCEL, + DROP_TYPE_SCP, + DROP_TYPE_SEND_FILE, // past contents of file + DROP_TYPE_SEND_FILE_BINARY, + DROP_TYPE_PASTE_FILENAME, +}; + +#define DROP_TYPE_PASTE_ESCAPE 0x01 +#define DROP_TYPE_PASTE_NEWLINE 0x02 + +enum drop_type ShowDropDialogBox( + HINSTANCE hInstance, HWND hWndParent, + const char *TargetFilename, + enum drop_type DefaultDropType, + int RemaingFileCount, + bool EnableSCP, + bool EnableSendFile, + bool EnableDoNotShowDialog, + unsigned char *DropTypePaste, + bool *DoSameProcess, + bool *DoSameProcessNextDrop, + bool *DoNotShowDialog); Modified: branches/drag_and_drop/teraterm/teraterm/ttermpro.rc =================================================================== --- branches/drag_and_drop/teraterm/teraterm/ttermpro.rc 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/teraterm/ttermpro.rc 2018-07-12 15:26:23 UTC (rev 7145) @@ -29,30 +29,30 @@ IDD_DAD_DIALOG DIALOGEX 0, 0, 187, 267 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Tera Term: File Drag and Drop" -FONT 8, "Tahoma", 400, 0, 0x0 +FONT 8, "Tahoma", 0, 0, 0x0 BEGIN - EDITTEXT IDC_FILENAME_EDIT,7,6,172,14,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP + EDITTEXT IDC_FILENAME_EDIT,7,6,236,14,ES_AUTOHSCROLL | ES_READONLY | NOT WS_TABSTOP LTEXT "Are you sure that you want to send the file content?",IDC_DAD_STATIC,7,25,173,8 - CONTROL "&SCP",IDC_SCP_RADIO,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,36,29,10 + CONTROL "&SCP",IDC_SCP_RADIO,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,36,236,10 CONTROL "S&end File (Paste content of file)",IDC_SENDFILE_RADIO, - "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,77,172,10 - CONTROL "&Paste Filename",IDC_PASTE_RADIO,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,109,172,10 + "Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,77,236,10 + CONTROL "&Paste Filename",IDC_PASTE_RADIO,"Button",BS_AUTORADIOBUTTON | BS_NOTIFY,7,109,236,10 LTEXT "des&t:",IDC_SCP_PATH_LABEL,19,50,22,8 - EDITTEXT IDC_SCP_PATH,46,47,133,14,ES_AUTOHSCROLL - LTEXT "dest is home directory if empty",IDC_SCP_PATH_NOTE,50,64,120,8 - CONTROL "Bina&ry",IDC_BINARY_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,92,151,10 - CONTROL "Es&cape",IDC_ESCAPE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,19,125,151,10 - CONTROL "Separat&or is Space",IDC_SPACE_RADIO,"Button",BS_AUTORADIOBUTTON,19,139,160,10 - CONTROL "Separator is &NewLine",IDC_NEWLINE_RADIO,"Button",BS_AUTORADIOBUTTON,19,154,160,10 + EDITTEXT IDC_SCP_PATH,44,47,199,14,ES_AUTOHSCROLL + LTEXT "dest is home directory if empty",IDC_SCP_PATH_NOTE,44,64,199,8 + CONTROL "Bina&ry",IDC_BINARY_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,92,188,10 + CONTROL "Es&cape",IDC_ESCAPE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,21,125,188,10 + CONTROL "Separat&or is Space",IDC_SPACE_RADIO,"Button",BS_AUTORADIOBUTTON,21,139,188,10 + CONTROL "Separator is &NewLine",IDC_NEWLINE_RADIO,"Button",BS_AUTORADIOBUTTON,21,154,188,10 CONTROL "&Do this for the next %d conflicts",IDC_SAME_PROCESS_CHECK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,173,172,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,173,236,10 CONTROL "Do sa&me process, next drop",IDC_SAME_PROCESS_NEXTDROP_CHECK, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,188,172,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,188,236,10 CONTROL "Do not d&isplay this dialog, next drop",IDC_DONTSHOW_CHECK, - "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,203,172,11 - DEFPUSHBUTTON "OK",IDOK,69,245,50,14 - PUSHBUTTON "Cancel",IDCANCEL,130,245,50,14 - LTEXT "Drop with CTRL, this dialog is displayed",IDC_DAD_NOTE,7,221,172,8 + "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,7,203,236,11 + DEFPUSHBUTTON "OK",IDOK,133,236,50,14 + PUSHBUTTON "Cancel",IDCANCEL,193,236,50,14 + LTEXT "Drop with CTRL, this dialog is displayed",IDC_DAD_NOTE,7,221,236,8 END IDD_COMMENT_DIALOG DIALOGEX 0, 0, 239, 19 Modified: branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -116,6 +116,8 @@ <SuppressStartupBanner>true</SuppressStartupBanner> <CompileAs>Default</CompileAs> <MultiProcessorCompilation>true</MultiProcessorCompilation> + <IntrinsicFunctions>true</IntrinsicFunctions> + <WholeProgramOptimization>true</WholeProgramOptimization> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -131,6 +133,9 @@ <SubSystem>Windows</SubSystem> <TargetMachine>MachineX86</TargetMachine> <IgnoreSpecificDefaultLibraries>nafxcw.lib;LIBCMT.lib</IgnoreSpecificDefaultLibraries> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> </Link> <Manifest> <AdditionalManifestFiles>.\teraterm.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles> @@ -144,6 +149,7 @@ <ClCompile Include="buffer.c" /> <ClCompile Include="clipboar.c" /> <ClCompile Include="commlib.c" /> + <ClCompile Include="dnddlg.cpp" /> <ClCompile Include="filesys.cpp" /> <ClCompile Include="ftdlg.cpp" /> <ClCompile Include="keyboard.c" /> @@ -173,8 +179,10 @@ <Image Include="..\..\cygterm\cygterm.ico" /> <Image Include="..\common\tek.ico" /> <Image Include="..\common\Teraterm.ico" /> + <Image Include="..\common\teraterm_3d.ico" /> <Image Include="..\common\teraterm_classic.ico" /> <Image Include="..\common\vt.ico" /> + <Image Include="..\common\vt_3d.ico" /> <Image Include="..\common\vt_classic.ico" /> </ItemGroup> <ItemGroup> @@ -182,33 +190,67 @@ <ResourceCompile Include="ttermpro.rc" /> </ItemGroup> <ItemGroup> + <ClInclude Include="..\common\compat_w95.h" /> + <ClInclude Include="..\common\dlglib.h" /> + <ClInclude Include="..\common\tektypes.h" /> + <ClInclude Include="..\common\teraterm.h" /> + <ClInclude Include="..\common\tt-version.h" /> + <ClInclude Include="..\common\ttcommon.h" /> + <ClInclude Include="..\common\ttddecmnd.h" /> + <ClInclude Include="..\common\ttftypes.h" /> + <ClInclude Include="..\common\ttlib.h" /> + <ClInclude Include="..\common\ttplugin.h" /> + <ClInclude Include="..\common\tttypes.h" /> <ClInclude Include="..\common\tt_res.h" /> <ClInclude Include="addsetting.h" /> + <ClInclude Include="buffer.h" /> + <ClInclude Include="clipboar.h" /> + <ClInclude Include="commlib.h" /> + <ClInclude Include="dnddlg.h" /> + <ClInclude Include="filesys.h" /> + <ClInclude Include="ftdlg.h" /> + <ClInclude Include="keyboard.h" /> + <ClInclude Include="prnabort.h" /> + <ClInclude Include="protodlg.h" /> <ClInclude Include="sizetip.h" /> + <ClInclude Include="teklib.h" /> + <ClInclude Include="tekwin.h" /> + <ClInclude Include="telnet.h" /> + <ClInclude Include="teraapp.h" /> + <ClInclude Include="teraprn.h" /> + <ClInclude Include="ttdde.h" /> + <ClInclude Include="ttdialog.h" /> <ClInclude Include="ttfileio.h" /> + <ClInclude Include="ttime.h" /> + <ClInclude Include="ttplug.h" /> + <ClInclude Include="ttsetup.h" /> + <ClInclude Include="ttwinman.h" /> + <ClInclude Include="ttwsk.h" /> + <ClInclude Include="vtdisp.h" /> + <ClInclude Include="vtterm.h" /> + <ClInclude Include="vtwin.h" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttpdlg\ttpdlg.v12.vcxproj"> + <ProjectReference Include="..\ttpdlg\ttpdlg.v15.vcxproj"> <Project>{47cb840d-85c8-460f-9101-beb54bef9d56}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttpfile\ttpfile.v12.vcxproj"> + <ProjectReference Include="..\ttpfile\ttpfile.v15.vcxproj"> <Project>{311f2b21-aec4-4384-8209-bb83b54749b4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttpmacro\ttpmacro.v12.vcxproj"> + <ProjectReference Include="..\ttpmacro\ttpmacro.v15.vcxproj"> <Project>{ba519362-a2c2-4b1a-905b-f00791f9038a}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttpset\ttpset.v12.vcxproj"> + <ProjectReference Include="..\ttpset\ttpset.v15.vcxproj"> <Project>{5cf58947-e861-4a5c-b0b1-e85486f149cd}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttptek\ttptek.v12.vcxproj"> + <ProjectReference Include="..\ttptek\ttptek.v15.vcxproj"> <Project>{6d08053b-1c68-4a7e-8766-3553f5af010b}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> Modified: branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj.filters =================================================================== --- branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/teraterm/ttermpro.v15.vcxproj.filters 2018-07-12 15:26:23 UTC (rev 7145) @@ -16,26 +16,14 @@ <UniqueIdentifier>{e3efecca-9842-408d-979e-a4c7af432f65}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl</Extensions> </Filter> + <Filter Include="dialog"> + <UniqueIdentifier>{23d7c62e-eff4-4a0d-b8b4-7fc703717c0e}</UniqueIdentifier> + </Filter> </ItemGroup> <ItemGroup> - <ClCompile Include="addsetting.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="..\common\dlglib.c"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="filesys.cpp"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="ftdlg.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="prnabort.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - <ClCompile Include="protodlg.cpp"> - <Filter>Source Files</Filter> - </ClCompile> <ClCompile Include="..\common\stdafx.cpp"> <Filter>Source Files</Filter> </ClCompile> @@ -75,9 +63,6 @@ <ClCompile Include="ttdde.c"> <Filter>Source Files %28C%29</Filter> </ClCompile> - <ClCompile Include="ttdialog.c"> - <Filter>Source Files %28C%29</Filter> - </ClCompile> <ClCompile Include="ttfileio.c"> <Filter>Source Files %28C%29</Filter> </ClCompile> @@ -111,6 +96,27 @@ <ClCompile Include="WSAAsyncGetAddrInfo.c"> <Filter>Source Files %28C%29</Filter> </ClCompile> + <ClCompile Include="..\common\dlglib.c"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="dnddlg.cpp"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="ftdlg.cpp"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="protodlg.cpp"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="prnabort.cpp"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="ttdialog.c"> + <Filter>dialog</Filter> + </ClCompile> + <ClCompile Include="addsetting.cpp"> + <Filter>dialog</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <Image Include="..\..\cygterm\cygterm.ico"> @@ -131,6 +137,12 @@ <Image Include="..\common\vt_classic.ico"> <Filter>Resource Files</Filter> </Image> + <Image Include="..\common\teraterm_3d.ico"> + <Filter>Resource Files</Filter> + </Image> + <Image Include="..\common\vt_3d.ico"> + <Filter>Resource Files</Filter> + </Image> </ItemGroup> <ItemGroup> <ResourceCompile Include="tt-version.rc"> @@ -141,9 +153,6 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ClInclude Include="addsetting.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="sizetip.h"> <Filter>Header Files</Filter> </ClInclude> @@ -153,5 +162,113 @@ <ClInclude Include="ttfileio.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="..\common\ttlib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttwinman.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\ttftypes.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="teklib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\teraterm.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\tektypes.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="tekwin.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="telnet.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="teraapp.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="teraprn.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttwsk.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\ttcommon.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttdde.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\ttddecmnd.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttime.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttplug.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\ttplugin.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="ttsetup.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\tttypes.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\tt-version.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="buffer.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="clipboar.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="commlib.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="filesys.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="keyboard.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="vtterm.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="vtwin.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="vtdisp.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="..\common\compat_w95.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="dnddlg.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="prnabort.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="protodlg.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="ttdialog.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="..\common\dlglib.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="ftdlg.h"> + <Filter>dialog</Filter> + </ClInclude> + <ClInclude Include="addsetting.h"> + <Filter>dialog</Filter> + </ClInclude> </ItemGroup> -</Project> +</Project> \ No newline at end of file Modified: branches/drag_and_drop/teraterm/teraterm/vtdisp.c =================================================================== --- branches/drag_and_drop/teraterm/teraterm/vtdisp.c 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/teraterm/vtdisp.c 2018-07-12 15:26:23 UTC (rev 7145) @@ -1,6 +1,6 @@ /* * Copyright (C) 1994-1998 T. Teranishi - * (C) 2005-2017 TeraTerm Project + * (C) 2005-2018 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -44,7 +44,7 @@ #define CurWidth 2 -int DefaultColorTable[256][3] = { +static const BYTE DefaultColorTable[256][3] = { { 0, 0, 0}, {255, 0, 0}, { 0,255, 0}, {255,255, 0}, { 0, 0,255}, {255, 0,255}, { 0,255,255}, {255,255,255}, // 0 - 7 {128,128,128}, {128, 0, 0}, { 0,128, 0}, {128,128, 0}, { 0, 0,128}, {128, 0,128}, { 0,128,128}, {192,192,192}, // 8 - 15 { 0, 0, 0}, { 0, 0, 95}, { 0, 0,135}, { 0, 0,175}, { 0, 0,215}, { 0, 0,255}, { 0, 95, 0}, { 0, 95, 95}, // 16 - 23 Modified: branches/drag_and_drop/teraterm/teraterm/vtwin.cpp =================================================================== --- branches/drag_and_drop/teraterm/teraterm/vtwin.cpp 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/teraterm/vtwin.cpp 2018-07-12 15:26:23 UTC (rev 7145) @@ -77,6 +77,7 @@ #include "addsetting.h" #include "winjump.h" #include "sizetip.h" +#include "dnddlg.h" #include "initguid.h" //#include "Usbiodef.h" @@ -2024,301 +2025,6 @@ DeleteNotifyIcon(&cv); } -static void SetDlgFonts(HWND hDlg, const int nIDDlgItems[], int nIDDlgItemCount, HFONT hFont) -{ - for (int i = 0 ; i < nIDDlgItemCount ; i++) { - const int nIDDlgItem = nIDDlgItems[i]; - SendDlgItemMessage(hDlg, nIDDlgItem, WM_SETFONT, (WPARAM)hFont, MAKELPARAM(TRUE,0)); - } -} - -typedef struct { - int nIDDlgItem; - char *key; -} DlgTextInfo; - -static void SetDlgTexts(HWND hDlgWnd, const DlgTextInfo *infos, int infoCount, char *UILanguageFile) -{ - for (int i = 0 ; i < infoCount; i++) { - char *key = infos[i].key; - char uimsg[MAX_UIMSG]; - get_lang_msg(key, uimsg, sizeof(uimsg), "", UILanguageFile); - if (uimsg[0] != '\0') { - const int nIDDlgItem = infos[i].nIDDlgItem; - if (nIDDlgItem == 0) { - SetWindowText(hDlgWnd, uimsg); - } else { - SetDlgItemText(hDlgWnd, nIDDlgItem, uimsg); - } - } - } -} - -enum drop_type { - DROP_TYPE_CANCEL, - DROP_TYPE_SCP, - DROP_TYPE_SEND_FILE, // past contents of file - DROP_TYPE_SEND_FILE_BINARY, - DROP_TYPE_PASTE_FILENAME, -}; - -#define DROP_TYPE_PASTE_ESCAPE 0x01 -#define DROP_TYPE_PASTE_NEWLINE 0x02 - -struct DrapDropDlgParam { - const char *TargetFilename; - enum drop_type DropType; - unsigned char DropTypePaste; - bool ScpEnable; - char *ScpSendDirPtr; - int ScpSendDirSize; - bool SendfileEnable; - bool PasteNewlineEnable; - int RemaingFileCount; - bool DoSameProcess; - bool DoSameProcessNextDrop; - bool DoNotShowDialogEnable; - bool DoNotShowDialog; -}; - -struct DrapDropDlgData { - HFONT DlgDragDropFont; - struct DrapDropDlgParam *Param; -}; - -static LRESULT CALLBACK OnDragDropDlgProc(HWND hDlgWnd, UINT msg, WPARAM wp, LPARAM lp) -{ - struct DrapDropDlgData *DlgData = (struct DrapDropDlgData *)GetWindowLongPtr(hDlgWnd, GWLP_USERDATA); - - switch (msg) { - case WM_INITDIALOG: - { - LOGFONT logfont; - HFONT font; - HFONT DlgDragDropFont = NULL; - DlgData = (struct DrapDropDlgData *)malloc(sizeof(struct DrapDropDlgData)); - SetWindowLongPtr(hDlgWnd, GWLP_USERDATA, (LONG_PTR)DlgData); - struct DrapDropDlgParam *Param = (struct DrapDropDlgParam *)lp; - DlgData->Param = Param; - font = (HFONT)SendMessage(hDlgWnd, WM_GETFONT, 0, 0); - GetObject(font, sizeof(LOGFONT), &logfont); - if (get_lang_font("DLG_TAHOMA_FONT", hDlgWnd, &logfont, &DlgDragDropFont, ts.UILanguageFile)) { - static const int IDs[] = { - IDC_FILENAME_EDIT, - IDC_DAD_STATIC, - IDC_SCP_RADIO, IDC_SENDFILE_RADIO, IDC_PASTE_RADIO, - IDC_SCP_PATH_LABEL, IDC_SCP_PATH, IDC_SCP_PATH_NOTE, - IDC_BINARY_CHECK, - IDC_ESCAPE_CHECK, IDC_NEWLINE_RADIO, IDC_SPACE_RADIO, - IDC_SAME_PROCESS_CHECK, IDC_SAME_PROCESS_NEXTDROP_CHECK, IDC_DONTSHOW_CHECK, - IDC_DAD_NOTE, - IDOK, IDCANCEL, - }; - SetDlgFonts(hDlgWnd, IDs, _countof(IDs), DlgDragDropFont); - } else { - DlgDragDropFont = NULL; - } - DlgData->DlgDragDropFont = DlgDragDropFont; - - static const DlgTextInfo textInfos[] = { - { 0, "MSG_DANDD_CONF_TITLE" }, - { IDC_DAD_STATIC, "MSG_DANDD_CONF" }, - { IDC_SAME_PROCESS_CHECK, "MSG_DANDD_CONF_CONFLICTS" }, - }; - SetDlgTexts(hDlgWnd, textInfos, _countof(textInfos), ts.UILanguageFile); - - // target file - SetDlgItemText(hDlgWnd, IDC_FILENAME_EDIT, Param->TargetFilename); - - // checkbox - CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, - (Param->DropType == DROP_TYPE_SEND_FILE || - Param->DropType == DROP_TYPE_SEND_FILE_BINARY) ? IDC_SENDFILE_RADIO : - Param->DropType == DROP_TYPE_PASTE_FILENAME ? IDC_PASTE_RADIO : - IDC_SCP_RADIO); - - // SCP - SendMessage(GetDlgItem(hDlgWnd, IDC_SCP_PATH), WM_SETTEXT, 0, (LPARAM)Param->ScpSendDirPtr); - if (!Param->ScpEnable) { - // \x96\xB3\x8C\xF8\x89\xBB - EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_RADIO), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH_LABEL), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_SCP_PATH_NOTE), FALSE); - } - - // Send File - if (Param->DropType == DROP_TYPE_SEND_FILE_BINARY) { - SendMessage(GetDlgItem(hDlgWnd, IDC_BINARY_CHECK), BM_SETCHECK, BST_CHECKED, 0); - } - if (!Param->SendfileEnable) { - // \x96\xB3\x8C\xF8\x89\xBB - EnableWindow(GetDlgItem(hDlgWnd, IDC_SENDFILE_RADIO), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_BINARY_CHECK), FALSE); - } - - // Paste Filename - if (Param->DropTypePaste & DROP_TYPE_PASTE_ESCAPE) { - SendMessage(GetDlgItem(hDlgWnd, IDC_ESCAPE_CHECK), BM_SETCHECK, BST_CHECKED, 0); - } - CheckRadioButton(hDlgWnd, IDC_SPACE_RADIO, IDC_NEWLINE_RADIO, - Param->DropTypePaste & DROP_TYPE_PASTE_NEWLINE? - IDC_NEWLINE_RADIO : IDC_SPACE_RADIO); - if (Param->RemaingFileCount < 2) { - EnableWindow(GetDlgItem(hDlgWnd, IDC_SPACE_RADIO), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_NEWLINE_RADIO), FALSE); - } - - // Do this for the next %d conflicts - char orgmsg[MAX_UIMSG]; - GetDlgItemText(hDlgWnd, IDC_SAME_PROCESS_CHECK, orgmsg, sizeof(orgmsg)); - char uimsg[MAX_UIMSG]; - _snprintf_s(uimsg, sizeof(uimsg), _TRUNCATE, orgmsg, Param->RemaingFileCount - 1); - SetDlgItemText(hDlgWnd, IDC_SAME_PROCESS_CHECK, uimsg); - if (Param->RemaingFileCount < 2) { - EnableWindow(GetDlgItem(hDlgWnd, IDC_SAME_PROCESS_CHECK), FALSE); - } - - // Dont Show Dialog - if (Param->DoNotShowDialog) { - SendMessage(GetDlgItem(hDlgWnd, IDC_DONTSHOW_CHECK), BM_SETCHECK, BST_CHECKED, 0); - } - if (!Param->DoNotShowDialogEnable) { - EnableWindow(GetDlgItem(hDlgWnd, IDC_DONTSHOW_CHECK), FALSE); - EnableWindow(GetDlgItem(hDlgWnd, IDC_DAD_NOTE), FALSE); - } - - // focus to "SCP dest textbox" or "Cancel" - if (Param->ScpEnable) { - // "SCP" \x97L\x8C\xF8\x8E\x9E\x82\xCD Cancel \x82Ƀt\x83H\x81[\x83J\x83X\x82āA\x8DŏI\x93I\x82\xC9 SCP PATH \x82Ƀt\x83H\x81[\x83J\x83X\x82\xAA - // \x93\x96\x82\xBD\x82\xE9\x82悤\x82ɂ\xB7\x82\xE9\x81B - SetFocus(GetDlgItem(hDlgWnd, IDC_SCP_RADIO)); - } else { - // \x83t\x83H\x81[\x83J\x83X\x82̏\x89\x8A\xFA\x8F\xF3\x91Ԃ\xF0 Cancel \x82ɂ\xB7\x82\xE9\x88ׁA\x82\xB1\x82̎\x9E\x93_\x82ł\xCD IDOK \x82\xC9 - // \x83t\x83H\x81[\x83J\x83X\x82Ă\xE9\x81B\x8C\xE3\x82\xC5 WM_NEXTDLGCTL \x82Ńt\x83H\x81[\x83J\x83X\x82\xAA\x8E\x9F\x82̃{\x83^\x83\x93\x82ɂȂ\xE9\x81B - SetFocus(GetDlgItem(hDlgWnd, IDOK)); - } - // \x83t\x83H\x81[\x83J\x83X\x82\xF0\x8E\x9F\x82̃{\x83^\x83\x93\x82Ɉڂ\xB7 - // SetFocus() \x82Œ\xBC\x90ڃt\x83H\x81[\x83J\x83X\x82Ă\xE9\x82ƃ^\x83u\x83L\x81[\x82̓\xAE\x8D쓙\x82ɖ\xE2\x91肪\x8Fo\x82邽\x82߁A - // \x82\xB1\x82̃\x81\x83b\x83Z\x81[\x83W\x82p\x82\xB7\x82\xE9 - PostMessage(hDlgWnd, WM_NEXTDLGCTL, 0, 0L); - - // TRUE\x82ɂ\xB7\x82\xE9\x82ƃ{\x83^\x83\x93\x82Ƀt\x83H\x81[\x83J\x83X\x82\xAA\x93\x96\x82\xBD\x82\xE7\x82Ȃ\xA2\x81B - return FALSE; - } - - case WM_COMMAND: - { - WORD wID = GET_WM_COMMAND_ID(wp, lp); - const WORD wCMD = GET_WM_COMMAND_CMD(wp, lp); - if (wCMD == BN_DBLCLK && - (wID == IDC_SCP_RADIO || wID == IDC_SENDFILE_RADIO || wID == IDC_PASTE_RADIO)) - { // radio buttons double click - wID = IDOK; - } - if (wCMD == EN_SETFOCUS && wID == IDC_SCP_PATH) { - CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_SCP_RADIO); - } - if (wID == IDC_BINARY_CHECK) { - CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_SENDFILE_RADIO); - } - if (wID == IDC_ESCAPE_CHECK || - wID == IDC_SPACE_RADIO || wID == IDC_NEWLINE_RADIO) - { - CheckRadioButton(hDlgWnd, IDC_SCP_RADIO, IDC_PASTE_RADIO, IDC_PASTE_RADIO); - } - if (wID == IDOK) { - if (IsDlgButtonChecked(hDlgWnd, IDC_SCP_RADIO) == BST_CHECKED) { - // SCP - DlgData->Param->DropType = DROP_TYPE_SCP; - SendMessage(GetDlgItem(hDlgWnd, IDC_SCP_PATH), WM_GETTEXT, - (WPARAM)DlgData->Param->ScpSendDirSize, - (LPARAM)DlgData->Param->ScpSendDirPtr); - } else if (IsDlgButtonChecked(hDlgWnd, IDC_SENDFILE_RADIO) == BST_CHECKED) { - // Send File - DlgData->Param->DropType = - (IsDlgButtonChecked(hDlgWnd, IDC_BINARY_CHECK) == BST_CHECKED) ? - DROP_TYPE_SEND_FILE_BINARY : DROP_TYPE_SEND_FILE; - } else /* if (IsDlgButtonChecked(hDlgWnd, IDC_PASTE_RADIO) == BST_CHECKED) */ { - // Paste Filename - DlgData->Param->DropType = DROP_TYPE_PASTE_FILENAME; - DlgData->Param->DropTypePaste = 0; - DlgData->Param->DropTypePaste |= - (IsDlgButtonChecked(hDlgWnd, IDC_ESCAPE_CHECK) == BST_CHECKED) ? - DROP_TYPE_PASTE_ESCAPE : 0; - DlgData->Param->DropTypePaste |= - (IsDlgButtonChecked(hDlgWnd, IDC_NEWLINE_RADIO) == BST_CHECKED) ? - DROP_TYPE_PASTE_NEWLINE : 0; - } - DlgData->Param->DoSameProcess = - (IsDlgButtonChecked(hDlgWnd, IDC_SAME_PROCESS_CHECK) == BST_CHECKED) ? - true : false; - DlgData->Param->DoSameProcessNextDrop = - (IsDlgButtonChecked(hDlgWnd, IDC_SAME_PROCESS_NEXTDROP_CHECK) == BST_CHECKED) ? - true : false; - DlgData->Param->DoNotShowDialog = - (IsDlgButtonChecked(hDlgWnd, IDC_DONTSHOW_CHECK) == BST_CHECKED) ? - true : false; - } - if (wID == IDCANCEL) { - DlgData->Param->DropType = DROP_TYPE_CANCEL; - } - if (wID == IDOK || wID == IDCANCEL) { - if (DlgData->DlgDragDropFont != NULL) { - DeleteObject(DlgData->DlgDragDropFont); - } - EndDialog(hDlgWnd, wID); - free(DlgData); - break; - } - return FALSE; - } - - default: - return FALSE; - } - return TRUE; -} - -static enum drop_type ShowDropDialogBox( - HINSTANCE hInstance, HWND hWndParent, - const char *TargetFilename, - enum drop_type DefaultDropType, - int RemaingFileCount, - bool EnableSCP, - bool EnableSendFile, - bool EnableDoNotShowDialog, - unsigned char *DropTypePaste, - bool *DoSameProcess, - bool *DoSameProcessNextDrop, - bool *DoNotShowDialog) -{ - struct DrapDropDlgParam Param; - Param.TargetFilename = TargetFilename; - Param.DropType = DefaultDropType; - Param.DropTypePaste = *DropTypePaste; - Param.ScpEnable = EnableSCP; - Param.ScpSendDirPtr = ts.ScpSendDir; - Param.ScpSendDirSize = sizeof(ts.ScpSendDir); - Param.SendfileEnable = EnableSendFile; - Param.PasteNewlineEnable = true; - Param.RemaingFileCount = RemaingFileCount; - Param.DoNotShowDialog = *DoNotShowDialog; - Param.DoNotShowDialogEnable = EnableDoNotShowDialog; - int ret = DialogBoxParam( - hInstance, MAKEINTRESOURCE(IDD_DAD_DIALOG), - hWndParent, (DLGPROC)OnDragDropDlgProc, - (LPARAM)&Param); - if (ret != IDOK) { - return DROP_TYPE_CANCEL; - } - *DropTypePaste = Param.DropTypePaste; - *DoSameProcess = Param.DoSameProcess; - *DoSameProcessNextDrop = Param.DoSameProcessNextDrop; - *DoNotShowDialog = Param.DoNotShowDialog; - return Param.DropType; -} - static void EscapeFilename(const char *src, char *dest) { #define ESCAPE_CHARS " ;&()$!`'[]{}#^~" Modified: branches/drag_and_drop/teraterm/ttpdlg/ttdlg.c =================================================================== --- branches/drag_and_drop/teraterm/ttpdlg/ttdlg.c 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttpdlg/ttdlg.c 2018-07-12 15:26:23 UTC (rev 7145) @@ -1,6 +1,6 @@ /* * Copyright (C) 1994-1998 T. Teranishi - * (C) 2004-2017 TeraTerm Project + * (C) 2004-2018 TeraTerm Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -72,9 +72,9 @@ char UILanguageFile[MAX_PATH]; -static PCHAR far NLListRcv[] = {"CR","CR+LF", "LF", "AUTO", NULL}; -static PCHAR far NLList[] = {"CR","CR+LF", "LF", NULL}; -static PCHAR far TermList[] = +static PCHAR NLListRcv[] = {"CR","CR+LF", "LF", "AUTO", NULL}; +static PCHAR NLList[] = {"CR","CR+LF", "LF", NULL}; +static PCHAR TermList[] = {"VT100", "VT101", "VT102", "VT282", "VT320", "VT382", "VT420", "VT520", "VT525", NULL}; static WORD Term_TermJ[] = @@ -81,29 +81,34 @@ {IdVT100, IdVT101, IdVT102, IdVT282, IdVT320, IdVT382, IdVT420, IdVT520, IdVT525}; static WORD TermJ_Term[] = {1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 8, 9}; -static PCHAR far TermListJ[] = +static PCHAR TermListJ[] = {"VT100", "VT100J", "VT101", "VT102", "VT102J", "VT220J", "VT282", "VT320", "VT382", "VT420", "VT520", "VT525", NULL}; -static PCHAR far KanjiList[] = {"SJIS","EUC","JIS", "UTF-8", "UTF-8m", NULL}; -static PCHAR far KanjiListSend[] = {"SJIS","EUC","JIS", "UTF-8", NULL}; -static PCHAR far KanjiInList[] = {"^[$@","^[$B",NULL}; -static PCHAR far KanjiOutList[] = {"^[(B","^[(J",NULL}; -static PCHAR far KanjiOutList2[] = {"^[(B","^[(J","^[(H",NULL}; -static PCHAR far RussList[] = {"Windows","KOI8-R","CP 866","ISO 8859-5",NULL}; -static PCHAR far RussList2[] = {"Windows","KOI8-R",NULL}; -static PCHAR far LocaleList[] = {"japanese","chinese", "chinese-simplified", "chinese-traditional", NULL}; -static PCHAR far MetaList[] = {"off", "on", "left", "right", NULL}; -static PCHAR far MetaList2[] = {"off", "on", NULL}; +static PCHAR KanjiList[] = {"SJIS","EUC","JIS", "UTF-8", "UTF-8m", NULL}; +static PCHAR KanjiListSend[] = {"SJIS","EUC","JIS", "UTF-8", NULL}; +static PCHAR KanjiInList[] = {"^[$@","^[$B",NULL}; +static PCHAR KanjiOutList[] = {"^[(B","^[(J",NULL}; +static PCHAR KanjiOutList2[] = {"^[(B","^[(J","^[(H",NULL}; +static PCHAR RussList[] = {"Windows","KOI8-R","CP 866","ISO 8859-5",NULL}; +static PCHAR RussList2[] = {"Windows","KOI8-R",NULL}; +static PCHAR LocaleList[] = {"japanese","chinese", "chinese-simplified", "chinese-traditional", NULL}; +static PCHAR MetaList[] = {"off", "on", "left", "right", NULL}; +static PCHAR MetaList2[] = {"off", "on", NULL}; // HKS -static PCHAR far KoreanList[] = {"KS5601", "UTF-8", "UTF-8m", NULL}; -static PCHAR far KoreanListSend[] = {"KS5601", "UTF-8", NULL}; +static PCHAR KoreanList[] = {"KS5601", "UTF-8", "UTF-8m", NULL}; +static PCHAR KoreanListSend[] = {"KS5601", "UTF-8", NULL}; // UTF-8 -static PCHAR far Utf8List[] = {"UTF-8", "UTF-8m", NULL}; -static PCHAR far Utf8ListSend[] = {"UTF-8", NULL}; +static PCHAR Utf8List[] = {"UTF-8", "UTF-8m", NULL}; +static PCHAR Utf8ListSend[] = {"UTF-8", NULL}; +static PCHAR BaudList[] = + {"110","300","600","1200","2400","4800","9600", + "14400","19200","38400","57600","115200", + "230400", "460800", "921600", NULL}; + BOOL CALLBACK TermDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam) { PTTSet ts; @@ -1359,10 +1364,10 @@ return FALSE; } -static PCHAR far DataList[] = {"7 bit","8 bit",NULL}; -static PCHAR far ParityList[] = {"none", "odd", "even", "mark", "space", NULL}; -static PCHAR far StopList[] = {"1 bit", "1.5 bit", "2 bit", NULL}; -static PCHAR far FlowList[] = {"Xon/Xoff","hardware","none",NULL}; +static PCHAR DataList[] = {"7 bit","8 bit",NULL}; +static PCHAR ParityList[] = {"none", "odd", "even", "mark", "space", NULL}; +static PCHAR StopList[] = {"1 bit", "1.5 bit", "2 bit", NULL}; +static PCHAR FlowList[] = {"Xon/Xoff","hardware","none",NULL}; BOOL CALLBACK SerialDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam) { @@ -3036,7 +3041,7 @@ return FALSE; } -static PCHAR far LangList[] = {"English","Japanese","Russian","Korean","UTF-8",NULL}; +static PCHAR LangList[] = {"English","Japanese","Russian","Korean","UTF-8",NULL}; static char **LangUIList = NULL; #define LANG_PATH "lang" #define LANG_EXT ".lng" @@ -3573,7 +3578,7 @@ switch (ul_reason_for_call) { case DLL_THREAD_ATTACH: /* do thread initialization */ - break; + break; case DLL_THREAD_DETACH: /* do thread cleanup */ break; Modified: branches/drag_and_drop/teraterm/ttpdlg/ttpdlg.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/ttpdlg/ttpdlg.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttpdlg/ttpdlg.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -157,13 +157,11 @@ <None Include="ttpdlg.def" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\svnrev\svnrev.v12.vcxproj"> + <ProjectReference Include="..\svnrev\svnrev.v15.vcxproj"> <Project>{80f1c3f0-a213-4d48-85c8-a265990d19a7}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> - <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> Modified: branches/drag_and_drop/teraterm/ttpfile/ttpfile.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/ttpfile/ttpfile.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttpfile/ttpfile.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -160,7 +160,7 @@ <None Include="ttpfile.def" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> Modified: branches/drag_and_drop/teraterm/ttpmacro/ttpmacro.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/ttpmacro/ttpmacro.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttpmacro/ttpmacro.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -180,7 +180,7 @@ </ResourceCompile> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> Modified: branches/drag_and_drop/teraterm/ttpset/ttpset.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/ttpset/ttpset.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttpset/ttpset.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -147,7 +147,7 @@ <ResourceCompile Include="ttpset.rc" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> Modified: branches/drag_and_drop/teraterm/ttptek/ttptek.v15.vcxproj =================================================================== --- branches/drag_and_drop/teraterm/ttptek/ttptek.v15.vcxproj 2018-06-29 15:54:17 UTC (rev 7144) +++ branches/drag_and_drop/teraterm/ttptek/ttptek.v15.vcxproj 2018-07-12 15:26:23 UTC (rev 7145) @@ -143,7 +143,7 @@ <ResourceCompile Include="ttptek.rc" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\ttpcmn\ttpcmn.v12.vcxproj"> + <ProjectReference Include="..\ttpcmn\ttpcmn.v15.vcxproj"> <Project>{118e0d32-5553-4f73-9927-e873c1c500e4}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference>