diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-24 12:27:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-24 12:27:21 +0000 |
commit | 9c8e399b431a9b0995efd24752a47efbe6e84ade (patch) | |
tree | 9ee230f9d7cd19b1ff0c6f67a9e754454a059f8c /src/core/stdfile/filexferdlg.cpp | |
parent | afe5082c1a5126f5ba2973afaeaf16846302a295 (diff) |
- added ME_FILEDLG_CANCELED & ME_FILEDLG_SUCCEEDED events to support async file selection dialog;
- return value of MS_FILE_SENDFILE* services changed: now it returns a dialog handle;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8253 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdfile/filexferdlg.cpp')
-rw-r--r-- | src/core/stdfile/filexferdlg.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/core/stdfile/filexferdlg.cpp b/src/core/stdfile/filexferdlg.cpp index e6e303871c..349301b1cb 100644 --- a/src/core/stdfile/filexferdlg.cpp +++ b/src/core/stdfile/filexferdlg.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define HM_RECVEVENT (WM_USER+10)
-static int CheckVirusScanned(HWND hwnd, struct FileDlgData *dat, int i)
+static int CheckVirusScanned(HWND hwnd, FileDlgData *dat, int i)
{
if (dat->send) return 1;
if (dat->fileVirusScanned == NULL) return 0;
@@ -48,10 +48,9 @@ TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s) {
if (flags & PFTS_UTF)
return Utf8DecodeW((char*)s);
- else if (flags & PFTS_UNICODE)
+ if (flags & PFTS_UNICODE)
return mir_tstrdup(s);
- else
- return mir_a2t((char*)s);
+ return mir_a2t((char*)s);
}
int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR *r)
@@ -62,14 +61,13 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR mir_free(ts);
return res;
}
- else if (ft->flags & PFTS_UNICODE)
+ if (ft->flags & PFTS_UNICODE)
return _tcscmp(s, r);
- else {
- TCHAR *ts = mir_a2t((char*)s);
- int res = _tcscmp(ts, r);
- mir_free(ts);
- return res;
- }
+
+ TCHAR *ts = mir_a2t((char*)s);
+ int res = _tcscmp(ts, r);
+ mir_free(ts);
+ return res;
}
static void SetOpenFileButtonStyle(HWND hwndButton, int enabled)
@@ -131,7 +129,7 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info) mir_free(info);
}
-static void SetFilenameControls(HWND hwndDlg, struct FileDlgData *dat, PROTOFILETRANSFERSTATUS *fts)
+static void SetFilenameControls(HWND hwndDlg, FileDlgData *dat, PROTOFILETRANSFERSTATUS *fts)
{
TCHAR msg[MAX_PATH];
TCHAR *fnbuf = NULL, *fn = NULL;
|