From: s_kawamoto Date: Mon, 2 Apr 2012 11:48:43 +0000 (+0900) Subject: Fix bugs of behavior of drag and drop file transferring. X-Git-Url: http://git.osdn.net/view?p=ffftp%2Fffftp.git;a=commitdiff_plain;h=89eda7650eea755d6005aaafe2dfff232e76d9bc Fix bugs of behavior of drag and drop file transferring. --- diff --git a/FFFTP_Eng_Release/FFFTP.exe b/FFFTP_Eng_Release/FFFTP.exe index 5262120..f104c6e 100644 Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ diff --git a/Release/FFFTP.exe b/Release/FFFTP.exe index 199625e..c5c5246 100644 Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ diff --git a/filelist.c b/filelist.c index 0760c53..60f8ba2 100644 --- a/filelist.c +++ b/filelist.c @@ -124,6 +124,8 @@ extern int RemoteWidth; extern int ListHeight; extern char FilterStr[FILTER_EXT_LEN+1]; extern HWND hHelpWin; +// 外部アプリケーションへドロップ後にローカル側のファイル一覧に作業フォルダが表示されるバグ対策 +extern int SuppressRefresh; /* 設定値 */ extern int LocalWidth; @@ -498,6 +500,11 @@ static void doTransferRemoteFile(void) remove(fn); } + // 同時接続対応 + DisableUserOpe(); + // 外部アプリケーションへドロップ後にローカル側のファイル一覧に作業フォルダが表示されるバグ対策 + SuppressRefresh = 1; + // ダウンロード先をテンポラリに設定 SetLocalDirHist(TmpDir); @@ -529,6 +536,12 @@ static void doTransferRemoteFile(void) SetLocalDirHist(LocDir); SetCurrentDirAsDirHist(); + // 外部アプリケーションへドロップ後にローカル側のファイル一覧に作業フォルダが表示されるバグ対策 + SuppressRefresh = 0; + GetLocalDirForWnd(); + // 同時接続対応 + EnableUserOpe(); + remoteFileListBase = FileListBase; // あとでフリーすること remoteFileListBaseNoExpand = FileListBaseNoExpand; // あとでフリーすること strncpy_s(remoteFileDir, sizeof(remoteFileDir), TmpDir, _TRUNCATE); diff --git a/main.c b/main.c index af2dd2f..0377eab 100644 --- a/main.c +++ b/main.c @@ -128,7 +128,9 @@ char FilterStr[FILTER_EXT_LEN+1] = { "*" }; int CancelFlg; -static int SuppressRefresh = 0; +// 外部アプリケーションへドロップ後にローカル側のファイル一覧に作業フォルダが表示されるバグ対策 +//static int SuppressRefresh = 0; +int SuppressRefresh = 0; static DWORD dwCookie; @@ -1705,7 +1707,10 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA break; case WM_REFRESH_LOCAL_FLG : - PostMessage(hWnd, WM_COMMAND, MAKEWPARAM(REFRESH_LOCAL, 0), 0); + // 外部アプリケーションへドロップ後にローカル側のファイル一覧に作業フォルダが表示されるバグ対策 +// PostMessage(hWnd, WM_COMMAND, MAKEWPARAM(REFRESH_LOCAL, 0), 0); + if(SuppressRefresh == 0) + PostMessage(hWnd, WM_COMMAND, MAKEWPARAM(REFRESH_LOCAL, 0), 0); break; case WM_REFRESH_REMOTE_FLG :