diff options
Diffstat (limited to 'src/modules/srfile')
-rw-r--r-- | src/modules/srfile/file.cpp | 14 | ||||
-rw-r--r-- | src/modules/srfile/fileexistsdlg.cpp | 2 | ||||
-rw-r--r-- | src/modules/srfile/fileopts.cpp | 2 | ||||
-rw-r--r-- | src/modules/srfile/filerecvdlg.cpp | 2 | ||||
-rw-r--r-- | src/modules/srfile/filesenddlg.cpp | 2 | ||||
-rw-r--r-- | src/modules/srfile/filexferdlg.cpp | 16 | ||||
-rw-r--r-- | src/modules/srfile/ftmanager.cpp | 8 |
7 files changed, 23 insertions, 23 deletions
diff --git a/src/modules/srfile/file.cpp b/src/modules/srfile/file.cpp index 6f3b3e0ddf..b398294c8d 100644 --- a/src/modules/srfile/file.cpp +++ b/src/modules/srfile/file.cpp @@ -33,7 +33,7 @@ static INT_PTR SendFileCommand(WPARAM wParam, LPARAM) struct FileSendData fsd;
fsd.hContact=(HANDLE)wParam;
fsd.ppFiles=NULL;
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
}
@@ -52,7 +52,7 @@ static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam) fsd.ppFiles[i] = (const TCHAR*)mir_a2t(ppFiles[i]);
fsd.ppFiles[ count ] = NULL;
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
for (int j=0; j < count; j++)
mir_free((void*)fsd.ppFiles[j]);
return 0;
@@ -63,7 +63,7 @@ static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam) FileSendData fsd;
fsd.hContact=(HANDLE)wParam;
fsd.ppFiles=(const TCHAR**)lParam;
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
}
@@ -79,7 +79,7 @@ static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam) static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam)
{
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, lParam);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, lParam);
return 0;
}
@@ -91,7 +91,7 @@ void PushFileEvent(HANDLE hContact, HANDLE hdbe, LPARAM lParam) cle.hDbEvent = hdbe;
cle.lParam = lParam;
if (DBGetContactSettingByte(NULL, "SRFile", "AutoAccept", 0) && !DBGetContactSettingByte(hContact, "CList", "NotOnList", 0)) {
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, (LPARAM)&cle);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILERECV), NULL, DlgProcRecvFile, (LPARAM)&cle);
}
else {
SkinPlaySound("RecvFile");
@@ -284,8 +284,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM) char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
if (szProto != NULL) {
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
+ if (CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
+ if (CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
mi.flags = CMIM_FLAGS;
else if (DBGetContactSettingWord((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
mi.flags = CMIM_FLAGS;
diff --git a/src/modules/srfile/fileexistsdlg.cpp b/src/modules/srfile/fileexistsdlg.cpp index d98ce59f78..1975226b90 100644 --- a/src/modules/srfile/fileexistsdlg.cpp +++ b/src/modules/srfile/fileexistsdlg.cpp @@ -189,7 +189,7 @@ void __cdecl LoadIconsAndTypesThread(void* param) else {
iconIndex = _ttoi(pszComma+1); *pszComma='\0';
}
- hIcon = ExtractIcon(hMirandaInst, szIconFile, iconIndex);
+ hIcon = ExtractIcon(hInst, szIconFile, iconIndex);
if (hIcon)
fileInfo.hIcon = hIcon;
}
diff --git a/src/modules/srfile/fileopts.cpp b/src/modules/srfile/fileopts.cpp index e68781da7c..b8c8c0133a 100644 --- a/src/modules/srfile/fileopts.cpp +++ b/src/modules/srfile/fileopts.cpp @@ -234,7 +234,7 @@ int FileOptInitialise(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = {0};
odp.cbSize = sizeof(odp);
odp.position = 900000000;
- odp.hInstance = hMirandaInst;
+ odp.hInstance = hInst;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_FILETRANSFER);
odp.pszTitle = LPGEN("File Transfers");
odp.pszGroup = LPGEN("Events");
diff --git a/src/modules/srfile/filerecvdlg.cpp b/src/modules/srfile/filerecvdlg.cpp index 61f2c29153..7249291b6d 100644 --- a/src/modules/srfile/filerecvdlg.cpp +++ b/src/modules/srfile/filerecvdlg.cpp @@ -330,7 +330,7 @@ INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (szProto) {
HICON hIcon;
- hIcon=(HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
+ hIcon=(HICON)CallProtoServiceInt(NULL,szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
if (hIcon) {
DrawIconEx(dis->hDC, dis->rcItem.left, dis->rcItem.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
DestroyIcon(hIcon);
diff --git a/src/modules/srfile/filesenddlg.cpp b/src/modules/srfile/filesenddlg.cpp index d1d0f26c16..92875ddbdb 100644 --- a/src/modules/srfile/filesenddlg.cpp +++ b/src/modules/srfile/filesenddlg.cpp @@ -281,7 +281,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0);
if (szProto) {
- HICON hIcon = (HICON)CallProtoService(szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
+ HICON hIcon = (HICON)CallProtoServiceInt(NULL,szProto, PS_LOADICON, PLI_PROTOCOL|PLIF_SMALL, 0);
if (hIcon) {
DrawIconEx(dis->hDC, dis->rcItem.left, dis->rcItem.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
DestroyIcon(hIcon);
diff --git a/src/modules/srfile/filexferdlg.cpp b/src/modules/srfile/filexferdlg.cpp index 743e220051..3dc4e27bd5 100644 --- a/src/modules/srfile/filexferdlg.cpp +++ b/src/modules/srfile/filexferdlg.cpp @@ -45,7 +45,7 @@ struct virusscanthreadstartinfo { TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s)
{
if (flags & PFTS_UTF)
- return Utf8DecodeUcs2((char*)s);
+ return Utf8DecodeW((char*)s);
else if (flags & PFTS_UNICODE)
return mir_tstrdup(s);
else
@@ -55,7 +55,7 @@ TCHAR* PFTS_StringToTchar(int flags, const PROTOCHAR* s) int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR* r)
{
if (ft->flags & PFTS_UTF) {
- TCHAR* ts = Utf8DecodeUcs2((char*)s);
+ TCHAR* ts = Utf8DecodeW((char*)s);
int res = _tcscmp(ts, r);
mir_free(ts);
return res;
@@ -314,14 +314,14 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dat->bytesRecvedHistory[0] == dat->bytesRecvedHistory[dat->bytesRecvedHistorySize-1])
lstrcpy(szTime, _T("??:??:??"));
else {
- li.QuadPart=BIGI(10000000)*(dat->transferStatus.currentFileSize-dat->transferStatus.currentFileProgress)*dat->bytesRecvedHistorySize/(dat->bytesRecvedHistory[0]-dat->bytesRecvedHistory[dat->bytesRecvedHistorySize-1]);
- ft.dwHighDateTime=li.HighPart; ft.dwLowDateTime=li.LowPart;
+ li.QuadPart = BIGI(10000000)*(dat->transferStatus.currentFileSize-dat->transferStatus.currentFileProgress)*dat->bytesRecvedHistorySize/(dat->bytesRecvedHistory[0]-dat->bytesRecvedHistory[dat->bytesRecvedHistorySize-1]);
+ ft.dwHighDateTime = li.HighPart; ft.dwLowDateTime = li.LowPart;
FileTimeToSystemTime(&ft, &st);
GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT|TIME_NOTIMEMARKER, &st, NULL, szTime, SIZEOF(szTime));
}
if (dat->bytesRecvedHistory[0] != dat->bytesRecvedHistory[dat->bytesRecvedHistorySize-1]) {
li.QuadPart=BIGI(10000000)*(dat->transferStatus.totalBytes-dat->transferStatus.totalProgress)*dat->bytesRecvedHistorySize/(dat->bytesRecvedHistory[0]-dat->bytesRecvedHistory[dat->bytesRecvedHistorySize-1]);
- ft.dwHighDateTime=li.HighPart; ft.dwLowDateTime=li.LowPart;
+ ft.dwHighDateTime = li.HighPart; ft.dwLowDateTime = li.LowPart;
FileTimeToSystemTime(&ft, &st);
GetTimeFormat(LOCALE_USER_DEFAULT, TIME_FORCE24HOURFORMAT|TIME_NOTIMEMARKER, &st, NULL, szTime, SIZEOF(szTime));
}
@@ -502,7 +502,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR break;
}
mir_free(szOriginalFilename);
- CallProtoService(szProto, PS_FILERESUMET, (WPARAM)dat->fs, (LPARAM)pfr);
+ CallProtoServiceInt(NULL,szProto, PS_FILERESUMET, (WPARAM)dat->fs, (LPARAM)pfr);
if (pfr->szFilename) mir_free((char*)pfr->szFilename);
mir_free(pfr);
break;
@@ -556,7 +556,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dat->resumeBehaviour == FILERESUME_ASK) {
TDlgProcFileExistsParam param = { hwndDlg, fts };
ShowWindow(hwndDlg, SW_SHOWNORMAL);
- CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILEEXISTS), hwndDlg, DlgProcFileExists, (LPARAM)¶m);
+ CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILEEXISTS), hwndDlg, DlgProcFileExists, (LPARAM)¶m);
EnableWindow(hwndDlg, FALSE);
}
else {
@@ -720,7 +720,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR UTILRESIZEDIALOG urd={0};
urd.cbSize=sizeof(urd);
urd.hwndDlg=hwndDlg;
- urd.hInstance=hMirandaInst;
+ urd.hInstance=hInst;
urd.lpTemplate=MAKEINTRESOURCEA(IDD_FILETRANSFERINFO);
urd.pfnResizer=FileTransferDlgResizer;
CallService(MS_UTILS_RESIZEDIALOG, 0, (LPARAM)&urd);
diff --git a/src/modules/srfile/ftmanager.cpp b/src/modules/srfile/ftmanager.cpp index 08b4a9e59c..7e0dcfc9cc 100644 --- a/src/modules/srfile/ftmanager.cpp +++ b/src/modules/srfile/ftmanager.cpp @@ -313,8 +313,8 @@ static INT_PTR CALLBACK FtMgrDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM dat->hhkPreshutdown = HookEventMessage(ME_SYSTEM_PRESHUTDOWN, hwnd, M_PRESHUTDOWN);
- dat->hwndIncoming = CreateDialog(hMirandaInst, MAKEINTRESOURCE(IDD_FTPAGE), hwnd, FtMgrPageDlgProc);
- dat->hwndOutgoing = CreateDialog(hMirandaInst, MAKEINTRESOURCE(IDD_FTPAGE), hwnd, FtMgrPageDlgProc);
+ dat->hwndIncoming = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FTPAGE), hwnd, FtMgrPageDlgProc);
+ dat->hwndOutgoing = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FTPAGE), hwnd, FtMgrPageDlgProc);
ShowWindow(dat->hwndIncoming, SW_SHOW);
tci.mask = TCIF_PARAM|TCIF_TEXT;
@@ -537,7 +537,7 @@ HWND FtMgr_Show(bool bForceActivate, bool bFromMenu) bool bJustCreated = (hwndFtMgr == NULL);
if (bJustCreated)
{
- hwndFtMgr = CreateDialog(hMirandaInst, MAKEINTRESOURCE(IDD_FTMGR), NULL, FtMgrDlgProc);
+ hwndFtMgr = CreateDialog(hInst, MAKEINTRESOURCE(IDD_FTMGR), NULL, FtMgrDlgProc);
}
if (bFromMenu) /* lqbe */
{
@@ -584,7 +584,7 @@ HWND FtMgr_AddTransfer(FileDlgData *fdd) TFtMgrData *dat = (TFtMgrData*)GetWindowLongPtr(FtMgr_Show(bForceActivate, false), GWLP_USERDATA);
if (dat == NULL) return NULL;
HWND hwndBox = fdd->send ? dat->hwndOutgoing : dat->hwndIncoming;
- HWND hwndFt = CreateDialogParam(hMirandaInst, MAKEINTRESOURCE(IDD_FILETRANSFERINFO), hwndBox, DlgProcFileTransfer, (LPARAM)fdd);
+ HWND hwndFt = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILETRANSFERINFO), hwndBox, DlgProcFileTransfer, (LPARAM)fdd);
ShowWindow(hwndFt, SW_SHOWNA);
SendMessage(hwndBox, WM_FT_ADD, 0, (LPARAM)hwndFt);
FtMgr_ShowPage(fdd->send ? 1 : 0);
|