diff options
Diffstat (limited to 'src/core/stdfile')
-rw-r--r-- | src/core/stdfile/commonheaders.h | 5 | ||||
-rw-r--r-- | src/core/stdfile/file.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/file.h | 2 | ||||
-rw-r--r-- | src/core/stdfile/fileexistsdlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/fileopts.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/filerecvdlg.cpp | 19 | ||||
-rw-r--r-- | src/core/stdfile/filesenddlg.cpp | 11 | ||||
-rw-r--r-- | src/core/stdfile/filexferdlg.cpp | 51 | ||||
-rw-r--r-- | src/core/stdfile/ftmanager.cpp | 9 | ||||
-rw-r--r-- | src/core/stdfile/main.cpp | 2 |
10 files changed, 53 insertions, 52 deletions
diff --git a/src/core/stdfile/commonheaders.h b/src/core/stdfile/commonheaders.h index 2f6e994b0e..e6f2ff7f7d 100644 --- a/src/core/stdfile/commonheaders.h +++ b/src/core/stdfile/commonheaders.h @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -21,9 +21,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-// to enable all 0.9.0 core functions
-#define MIRANDA_VER 0x0A00
-
#define WINVER 0x0700
#define _WIN32_WINNT 0x0700
#define _WIN32_IE 0x0601
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp index baa7aaeb2f..a29b71bc33 100644 --- a/src/core/stdfile/file.cpp +++ b/src/core/stdfile/file.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdfile/file.h b/src/core/stdfile/file.h index d814e99ab4..95e2eb4818 100644 --- a/src/core/stdfile/file.h +++ b/src/core/stdfile/file.h @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdfile/fileexistsdlg.cpp b/src/core/stdfile/fileexistsdlg.cpp index 5a66611237..4efb73ebfb 100644 --- a/src/core/stdfile/fileexistsdlg.cpp +++ b/src/core/stdfile/fileexistsdlg.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdfile/fileopts.cpp b/src/core/stdfile/fileopts.cpp index 827257215e..5e9a465d63 100644 --- a/src/core/stdfile/fileopts.cpp +++ b/src/core/stdfile/fileopts.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp index 6492530004..ac082ac140 100644 --- a/src/core/stdfile/filerecvdlg.cpp +++ b/src/core/stdfile/filerecvdlg.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "file.h"
@@ -45,13 +46,13 @@ static void GetLowestExistingDirName(const TCHAR *szTestDir, TCHAR *szExistingDi if (szExistingDir[0] == '\0') GetCurrentDirectory(cchExistingDir, szExistingDir);
}
-static const TCHAR InvalidFilenameChars[] = _T("\\/:*?\"<>|");
+static const TCHAR InvalidFilenameChars[] = _T("\\/:*?\"<>|");
void RemoveInvalidFilenameChars(TCHAR *tszString)
{
size_t i;
if (tszString) {
for (i = _tcscspn(tszString, InvalidFilenameChars); tszString[i]; i+=_tcscspn(tszString+i+1, InvalidFilenameChars)+1)
- if (tszString[i] >= 0)
+ if (tszString[i] >= 0)
tszString[i] = _T('_');
}
}
@@ -62,7 +63,7 @@ void RemoveInvalidPathChars(TCHAR *tszString) size_t i;
if (tszString) {
for (i = _tcscspn(tszString, InvalidPathChars); tszString[i]; i+=_tcscspn(tszString+i+1, InvalidPathChars)+1)
- if (tszString[i] >= 0)
+ if (tszString[i] >= 0)
tszString[i] = _T('_');
}
}
@@ -103,11 +104,11 @@ int BrowseForFolder(HWND hwnd, TCHAR *szPath) return pidlResult != NULL;
}
-static REPLACEVARSARRAY sttVarsToReplace[] =
+static REPLACEVARSARRAY sttVarsToReplace[] =
{
- { (TCHAR*)"///", (TCHAR*)"//" },
- { (TCHAR*)"//", (TCHAR*)"/" },
- { (TCHAR*)"()", (TCHAR*)"" },
+ { (TCHAR*)"///", (TCHAR*)"//" },
+ { (TCHAR*)"//", (TCHAR*)"/" },
+ { (TCHAR*)"()", (TCHAR*)"" },
{ NULL, NULL }
};
diff --git a/src/core/stdfile/filesenddlg.cpp b/src/core/stdfile/filesenddlg.cpp index 5c1419c683..4523c63b36 100644 --- a/src/core/stdfile/filesenddlg.cpp +++ b/src/core/stdfile/filesenddlg.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -112,7 +113,7 @@ static void FilenameToFileList(HWND hwndDlg, struct FileDlgData* dat, const TCHA CopyMemory(dat->files[nTemp], buf, (fileOffset-1)*sizeof(TCHAR));
dat->files[nTemp][fileOffset-1] = '\\';
_tcscpy(dat->files[nTemp] + fileOffset - (buf[fileOffset-2] == '\\'?1:0), pBuf);
-
+
// Move pointers to next file...
pBuf += cbFileNameLen + 1;
nTemp++;
@@ -284,7 +285,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l DestroyIcon(hIcon);
} } } }
return CallService(MS_CLIST_MENUDRAWITEM, wParam, lParam);
-
+
case M_FILECHOOSEDONE:
if (lParam != 0) {
FilenameToFileList(hwndDlg, dat, (TCHAR*)lParam);
@@ -347,7 +348,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (dat)
FreeFileDlgData(dat);
-
+
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_MSG), GWLP_WNDPROC, (LONG_PTR)OldSendEditProc);
return TRUE;
}
diff --git a/src/core/stdfile/filexferdlg.cpp b/src/core/stdfile/filexferdlg.cpp index 474c49f7df..bcb51e6a62 100644 --- a/src/core/stdfile/filexferdlg.cpp +++ b/src/core/stdfile/filexferdlg.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2010 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include <io.h>
#include "file.h"
@@ -92,7 +93,7 @@ void FillSendData(FileDlgData* dat, DBEVENTINFO& dbei) lstrcpyA((char*)dbei.pBlob+sizeof(DWORD)+lstrlenA(szFileNames)+1, szMsg);
mir_free(szFileNames), mir_free(szMsg);
-
+
}
static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info)
@@ -102,14 +103,14 @@ static void __cdecl RunVirusScannerThread(struct virusscanthreadstartinfo *info) DBVARIANT dbv;
TCHAR szCmdLine[768];
- if ( !DBGetContactSettingTString(NULL, "SRFile", "ScanCmdLine", &dbv))
+ if ( !DBGetContactSettingTString(NULL, "SRFile", "ScanCmdLine", &dbv))
{
- if (dbv.ptszVal[0])
+ if (dbv.ptszVal[0])
{
TCHAR *pszReplace;
si.cb = sizeof(si);
pszReplace = _tcsstr(dbv.ptszVal, _T("%f"));
- if (pszReplace)
+ if (pszReplace)
{
if (info->szFile[_tcslen(info->szFile) - 1] == '\\')
info->szFile[_tcslen(info->szFile) - 1] = '\0';
@@ -146,19 +147,19 @@ static void SetFilenameControls(HWND hwndDlg, struct FileDlgData *dat, PROTOFILE if (dat->hIcon) DestroyIcon(dat->hIcon); dat->hIcon = NULL;
if (fn && (fts->totalFiles > 1)) {
- mir_sntprintf(msg, SIZEOF(msg), _T("%s: %s (%d %s %d)"),
- pcli->pfnGetContactDisplayName(fts->hContact, 0),
+ mir_sntprintf(msg, SIZEOF(msg), _T("%s: %s (%d %s %d)"),
+ pcli->pfnGetContactDisplayName(fts->hContact, 0),
fn, fts->currentFileNumber+1, TranslateT("of"), fts->totalFiles);
SHGetFileInfo(fn, FILE_ATTRIBUTE_DIRECTORY, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES|SHGFI_ICON|SHGFI_SMALLICON);
dat->hIcon = shfi.hIcon;
- }
+ }
else if (fn) {
mir_sntprintf(msg, SIZEOF(msg), _T("%s: %s"), pcli->pfnGetContactDisplayName(fts->hContact, 0), fn);
SHGetFileInfo(fn, FILE_ATTRIBUTE_NORMAL, &shfi, sizeof(shfi), SHGFI_USEFILEATTRIBUTES|SHGFI_ICON|SHGFI_SMALLICON);
dat->hIcon = shfi.hIcon;
- }
+ }
else {
lstrcpyn(msg, pcli->pfnGetContactDisplayName(fts->hContact, 0), SIZEOF(msg));
HICON hIcon = LoadSkinIcon(SKINICON_OTHER_DOWNARROW);
@@ -167,7 +168,7 @@ static void SetFilenameControls(HWND hwndDlg, struct FileDlgData *dat, PROTOFILE }
mir_free(fnbuf);
-
+
SendDlgItemMessage(hwndDlg, IDC_FILEICON, STM_SETIMAGE, IMAGE_ICON, (LPARAM)dat->hIcon);
SetDlgItemText(hwndDlg, IDC_CONTACTNAME, msg);
}
@@ -281,7 +282,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dat->hIcon = NULL;
- SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON,
+ SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON,
(LPARAM)LoadSkinnedProtoIcon(GetContactProto(dat->hContact), ID_STATUS_ONLINE));
SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Contact menu"), 0);
SendDlgItemMessage(hwndDlg, IDC_CONTACT, BUTTONSETASFLATBTN, TRUE, 0);
@@ -292,7 +293,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)dat->hIconFolder);
SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Open folder"), 0);
SendDlgItemMessage(hwndDlg, IDC_OPENFOLDER, BUTTONSETASFLATBTN, TRUE, 0);
-
+
Button_SetIcon_IcoLib(hwndDlg, IDCANCEL, SKINICON_OTHER_DELETE, LPGEN("Cancel"));
SetDlgItemText(hwndDlg, IDC_CONTACTNAME, pcli->pfnGetContactDisplayName(dat->hContact, 0));
@@ -349,7 +350,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam), MPCF_CONTACTMENU), (LPARAM)dat->hContact))
break;
- switch (LOWORD(wParam))
+ switch (LOWORD(wParam))
{
case IDOK:
case IDCANCEL:
@@ -374,7 +375,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR }
case IDC_OPENFOLDER:
- if (dat)
+ if (dat)
{
TCHAR *path = dat->transferStatus.tszWorkingDir;
if ( !path || !path[0])
@@ -545,7 +546,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case ACKRESULT_FILERESUME:
{
UpdateProtoFileTransferStatus(&dat->transferStatus, (PROTOFILETRANSFERSTATUS*)ack->lParam);
- PROTOFILETRANSFERSTATUS *fts = &dat->transferStatus;
+ PROTOFILETRANSFERSTATUS *fts = &dat->transferStatus;
SetFilenameControls(hwndDlg, dat, fts);
int res = _taccess(fts->tszCurrentFile, 0);
@@ -582,7 +583,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if ( !dat->send) {
if (dat->files == NULL)
dat->files = (TCHAR**)mir_calloc((fts->totalFiles + 1) * sizeof(TCHAR*));
- if (fts->currentFileNumber < fts->totalFiles && dat->files[fts->currentFileNumber] == NULL)
+ if (fts->currentFileNumber < fts->totalFiles && dat->files[fts->currentFileNumber] == NULL)
dat->files[fts->currentFileNumber] = PFTS_StringToTchar(fts->flags, fts->tszCurrentFile);
}
@@ -630,10 +631,10 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if ( !dat->send)
SetOpenFileButtonStyle(GetDlgItem(hwndDlg, IDC_OPENFILE), 1);
SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Close"));
- if (dat->hNotifyEvent)
+ if (dat->hNotifyEvent)
UnhookEvent(dat->hNotifyEvent);
dat->hNotifyEvent = NULL;
-
+
if (ack->result == ACKRESULT_DENIED)
{
dat->fs = NULL; /* protocol will free structure */
@@ -657,12 +658,12 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dbei.pBlob)
mir_free(dbei.pBlob);
dat->files = NULL; //protocol library frees this
-
+
} else {
- SetFtStatus(hwndDlg,
+ SetFtStatus(hwndDlg,
(dat->transferStatus.totalFiles == 1) ?
LPGENT("Transfer completed, open file.") :
- LPGENT("Transfer completed, open folder."),
+ LPGENT("Transfer completed, open folder."),
FTS_OPEN);
int useScanner = DBGetContactSettingByte(NULL, "SRFile", "UseScanner", VIRUSSCAN_DISABLE);
@@ -686,14 +687,14 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetFtStatus(hwndDlg, LPGENT("Scanning for viruses..."), FTS_TEXT);
if (vstsi)
forkthread((void (*)(void*))RunVirusScannerThread, 0, vstsi);
- }
+ }
else dat->fs = NULL; /* protocol will free structure */
dat->transferStatus.currentFileNumber = dat->transferStatus.totalFiles;
} // else dat->send
-
+
} // else ack->result
-
+
PostMessage(GetParent(hwndDlg), WM_FT_COMPLETED, ack->result, (LPARAM)hwndDlg);
break;
}
diff --git a/src/core/stdfile/ftmanager.cpp b/src/core/stdfile/ftmanager.cpp index 216798ded7..deb1bd3ef7 100644 --- a/src/core/stdfile/ftmanager.cpp +++ b/src/core/stdfile/ftmanager.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-12 Miranda IM, 2012-13 Miranda NG project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "file.h"
@@ -455,7 +456,7 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if ( !prg.run)
pTaskbarInterface->SetProgressValue(hwnd, 1, 1);
}
- else if (prg.run)
+ else if (prg.run)
pTaskbarInterface->SetProgressState(hwnd, TBPF_NORMAL);
else if (prg.init || prg.scan)
pTaskbarInterface->SetProgressState(hwnd, TBPF_INDETERMINATE);
@@ -465,7 +466,7 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }
if (prg.run)
- pTaskbarInterface->SetProgressValue(hwnd, prg.totalProgress, prg.totalBytes);
+ pTaskbarInterface->SetProgressValue(hwnd, prg.totalProgress, prg.totalBytes);
}
break;
}
diff --git a/src/core/stdfile/main.cpp b/src/core/stdfile/main.cpp index 84d93121c1..842dc93577 100644 --- a/src/core/stdfile/main.cpp +++ b/src/core/stdfile/main.cpp @@ -2,7 +2,7 @@ Standard file transfers' plugin for Myranda IM
-Copyright (C) 2012 George Hazan
+Copyright (C) 2012-13 George Hazan
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
|