From 7c731e1baf773d47941b6717757b844425db8e67 Mon Sep 17 00:00:00 2001 From: zmatsuo <6488847+zmatsuo@users.noreply.github.com> Date: Fri, 29 Nov 2024 01:28:34 +0900 Subject: [PATCH] =?UTF-8?q?Send=20file=20=E6=99=82=20local=20echo=20?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E5=8F=8D=E6=98=A0=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3=20#393?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - "Tera Term 4 と同じ方法で送信"=OFF 時 - Terminal tab - Local echo の設定 - file - send file... はローカルエコー設定を反映するようにした - "Tera Term 4 と同じ方法で送信" は反映するようになっていた - 次のファイル送信も local echo 設定を反映するようにした - sendfile マクロコマンド - Drag and Drop でのファイルの内容送信 --- doc/en/html/about/history.html | 7 +++++++ doc/en/html/usage/mouse.html | 2 +- doc/ja/html/about/history.html | 7 +++++++ doc/ja/html/usage/mouse.html | 2 +- teraterm/teraterm/sendmem.cpp | 12 +++++++----- teraterm/teraterm/sendmem.h | 4 ++-- teraterm/teraterm/ttdde.c | 2 +- teraterm/teraterm/vtwin.cpp | 10 +++------- 8 files changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/en/html/about/history.html b/doc/en/html/about/history.html index 3b2998ae7..fa3d487dd 100644 --- a/doc/en/html/about/history.html +++ b/doc/en/html/about/history.html @@ -73,6 +73,13 @@

YYYY.MM.DD (Ver 5.4 not released yet)

  • Fixed display characters containing surrogate pair character when "Drawing resized font to fit cell width"
  • MACRO: Fixed getenv, expandenv and setenv macro commands were not Unicode-compatible.
  • Fixed B-plus send is not working
  • +
  • Fixed local echo setting was not used: + +
  • diff --git a/doc/en/html/usage/mouse.html b/doc/en/html/usage/mouse.html index c338c7afd..b89454af8 100644 --- a/doc/en/html/usage/mouse.html +++ b/doc/en/html/usage/mouse.html @@ -115,7 +115,7 @@

    -
    Send File (Paste content of file)
    +
    Send File (Paste content of file)
    The file content is sent(pasted) into the terminal.
    When the file is dropped, this menu can be selected with the file.
    diff --git a/doc/ja/html/about/history.html b/doc/ja/html/about/history.html index bf7b64a20..2c67aa964 100644 --- a/doc/ja/html/about/history.html +++ b/doc/ja/html/about/history.html @@ -73,6 +73,13 @@

    YYYY.MM.DD (Ver 5.4 not released yet)

  • "Drawing resized font to fit cell width" on ̂ƂATQ[gyA݂̕Ƃ\悤CB
  • MACRO: getenv, expandenv, setenv }NR}h Unicode ɑΉĂȂ̂ŏCB
  • B-Plus̑MłȂȂĂ̂ŏCB
  • +
  • ̎ local echo ݒ𔽉fĂȂ̂ŏCB + +
  • diff --git a/doc/ja/html/usage/mouse.html b/doc/ja/html/usage/mouse.html index a977a272c..9a6035d80 100644 --- a/doc/ja/html/usage/mouse.html +++ b/doc/ja/html/usage/mouse.html @@ -117,7 +117,7 @@

    -
    Send File (Paste content of file)
    +
    Send File (Paste content of file)
    t@C̓e[ɑM(y[Xg)܂B
    hbvet@ĈƂIł܂B
    diff --git a/teraterm/teraterm/sendmem.cpp b/teraterm/teraterm/sendmem.cpp index 862839ab6..33788658e 100644 --- a/teraterm/teraterm/sendmem.cpp +++ b/teraterm/teraterm/sendmem.cpp @@ -712,7 +712,7 @@ BOOL SendMemSendFile(const wchar_t *filename, BOOL binary, SendMemDelayType dela return r; } #else -SendMem *SendMemSendFileCom(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max) +SendMem *SendMemSendFileCom(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, BOOL local_echo) { SendMem *sm; if (!binary) { @@ -743,20 +743,22 @@ SendMem *SendMemSendFileCom(const wchar_t *filename, BOOL binary, SendMemDelayTy SendMemInitDialogCaption(sm, L"send file"); // title SendMemInitDialogFilename(sm, filename); SendMemInitDelay(sm, delay_type, delay_tick, send_max); + SendMemInitEcho(sm, local_echo); + SendMemStart(sm); return sm; } #endif -BOOL SendMemSendFile(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max) +BOOL SendMemSendFile(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, BOOL local_echo) { - SendMem *sm = SendMemSendFileCom(filename, binary, delay_type, delay_tick, send_max); + SendMem *sm = SendMemSendFileCom(filename, binary, delay_type, delay_tick, send_max, local_echo); return (sm != NULL) ? TRUE : FALSE; } -BOOL SendMemSendFile2(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, void (*callback)(void *data), void *callback_data) +BOOL SendMemSendFile2(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, BOOL local_echo, void (*callback)(void *data), void *callback_data) { - SendMem *sm = SendMemSendFileCom(filename, binary, delay_type, delay_tick, send_max); + SendMem *sm = SendMemSendFileCom(filename, binary, delay_type, delay_tick, send_max, local_echo); if (sm == NULL) { return FALSE; } diff --git a/teraterm/teraterm/sendmem.h b/teraterm/teraterm/sendmem.h index 5a1e24e39..9deb1fdff 100644 --- a/teraterm/teraterm/sendmem.h +++ b/teraterm/teraterm/sendmem.h @@ -59,8 +59,8 @@ void SendMemContinuously(void); // convenient function BOOL SendMemPasteString(wchar_t *str); -BOOL SendMemSendFile(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max); -BOOL SendMemSendFile2(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, void (*callback)(void *data), void *callback_data); +BOOL SendMemSendFile(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, BOOL local_echo); +BOOL SendMemSendFile2(const wchar_t *filename, BOOL binary, SendMemDelayType delay_type, DWORD delay_tick, size_t send_max, BOOL local_echo, void (*callback)(void *data), void *callback_data); #ifdef __cplusplus } diff --git a/teraterm/teraterm/ttdde.c b/teraterm/teraterm/ttdde.c index eafc83ff3..b5b784ff4 100644 --- a/teraterm/teraterm/ttdde.c +++ b/teraterm/teraterm/ttdde.c @@ -796,7 +796,7 @@ static HDDEDATA AcceptExecute(HSZ TopicHSz, HDDEDATA Data) BOOL r = FileSendStart(ParamFileNameW, ParamBinaryFlag); #else // 5 Œlj@őM - BOOL r = SendMemSendFile2(ParamFileNameW, ParamBinaryFlag, 0, 0, 0, SendCallback, NULL); + BOOL r = SendMemSendFile2(ParamFileNameW, ParamBinaryFlag, SENDMEM_DELAYTYPE_NO_DELAY, 0, 0, ts.LocalEcho, SendCallback, NULL); #endif free(ParamFileNameW); if (r) { diff --git a/teraterm/teraterm/vtwin.cpp b/teraterm/teraterm/vtwin.cpp index 1ced1df21..f8a2c7e2b 100644 --- a/teraterm/teraterm/vtwin.cpp +++ b/teraterm/teraterm/vtwin.cpp @@ -1770,12 +1770,8 @@ LRESULT CVTWindow::OnDropNotify(WPARAM ShowDialog, LPARAM lparam) // cancel break; case DROP_TYPE_SEND_FILE: { - if (!data->TransBin) { - SendMemSendFile2(FileName, FALSE, SENDMEM_DELAYTYPE_NO_DELAY, 0, 0, DropSendCallback, data); - } - else { - SendMemSendFile2(FileName, TRUE, SENDMEM_DELAYTYPE_NO_DELAY, 0, 0, DropSendCallback, data); - } + const BOOL binary = data->TransBin ? TRUE : FALSE; + SendMemSendFile2(FileName, binary, SENDMEM_DELAYTYPE_NO_DELAY, 0, 0, ts.LocalEcho, DropSendCallback, data); break; } case DROP_TYPE_PASTE_FILENAME: @@ -3996,7 +3992,7 @@ void CVTWindow::OnFileSend() wchar_t *filename = data.filename; if (!data.method_4) { // new file send - SendMemSendFile(filename, data.binary, data.delay_type, data.delay_tick, data.send_size); + SendMemSendFile(filename, data.binary, data.delay_type, data.delay_tick, data.send_size, ts.LocalEcho); } else { // file send same as teraterm 4