From b8f2c313e8a97116e3ef1b17ddb09ac543fa016f Mon Sep 17 00:00:00 2001 From: "wishmaster51@gmail.com" Date: Wed, 21 Mar 2012 11:19:07 +0000 Subject: . 0.0.3.0 THIS REQUIRES MIRANDA IM 0.10 ALPHA #3 OR ABOVE!! + added x64 version + improved unicode support + added sounds + added more debug information * save position of avatar history dialog ! fixed crash with empty avatar history * BMP files are not converted to PNG any more * fixed Updater support git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@234 c086bb3d-8645-0410-b8da-73a8550f86e7 --- Plugins/utils/mir_options.cpp | 41 ++++++++++++----------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) (limited to 'Plugins/utils/mir_options.cpp') diff --git a/Plugins/utils/mir_options.cpp b/Plugins/utils/mir_options.cpp index 11af0c6..154bf7a 100644 --- a/Plugins/utils/mir_options.cpp +++ b/Plugins/utils/mir_options.cpp @@ -50,15 +50,15 @@ static TCHAR* MyDBGetContactSettingTString(HANDLE hContact, char* module, char* #ifdef UNICODE if (dbv.type == DBVT_ASCIIZ) { - MultiByteToWideChar(CP_ACP, 0, dbv.pszVal, -1, out, len); + MultiByteToWideChar(CP_ACP, 0, dbv.pszVal, -1, out, (int)len); } else if (dbv.type == DBVT_UTF8) { - MultiByteToWideChar(CP_UTF8, 0, dbv.pszVal, -1, out, len); + MultiByteToWideChar(CP_UTF8, 0, dbv.pszVal, -1, out, (int)len); } else if (dbv.type == DBVT_WCHAR) { - lstrcpyn(out, dbv.pwszVal, len); + lstrcpyn(out, dbv.pwszVal, (int)len); } #else if (dbv.type == DBVT_ASCIIZ) @@ -69,7 +69,7 @@ static TCHAR* MyDBGetContactSettingTString(HANDLE hContact, char* module, char* else { if (def != NULL) - lstrcpyn(out, def, len); + lstrcpyn(out, def, (int)len); } DBFreeVariant(&dbv); @@ -77,7 +77,7 @@ static TCHAR* MyDBGetContactSettingTString(HANDLE hContact, char* module, char* else { if (def != NULL) - lstrcpyn(out, def, len); + lstrcpyn(out, def, (int)len); } return out; @@ -100,7 +100,7 @@ static void PathToRelative(TCHAR *pOut, size_t outSize, const TCHAR *pSrc) { if (!PathIsAbsolute(pSrc)) { - lstrcpyn(pOut, pSrc, outSize); + lstrcpyn(pOut, pSrc, (int)outSize); } else { @@ -118,7 +118,7 @@ static void PathToRelative(TCHAR *pOut, size_t outSize, const TCHAR *pSrc) } else { - lstrcpyn(pOut, pSrc, outSize); + lstrcpyn(pOut, pSrc, (int)outSize); } } } @@ -127,7 +127,7 @@ static void PathToAbsolute(TCHAR *pOut, size_t outSize, const TCHAR *pSrc) { if (PathIsAbsolute(pSrc) || !isalnum(pSrc[0])) { - lstrcpyn(pOut, pSrc, outSize); + lstrcpyn(pOut, pSrc, (int)outSize); } else { @@ -237,7 +237,7 @@ void LoadOpts(OptPageControl *controls, int controlsSize, char *module) -BOOL CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, char *module, HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) +INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, char *module, HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { @@ -301,14 +301,8 @@ BOOL CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, char * lvi.iItem = 1000; PROTOACCOUNT **protos; - int count; - - BOOL hasAccounts = ServiceExists(MS_PROTO_ENUMACCOUNTS); - - if (hasAccounts) - CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&count, (LPARAM)&protos); - else - CallService(MS_PROTO_ENUMPROTOCOLS, (WPARAM)&count, (LPARAM)&protos); + int count = 0; + ProtoEnumAccounts(&count,&protos); for (int i = 0; i < count; i++) { @@ -321,18 +315,7 @@ BOOL CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, char * if (ctrl->allowProtocol != NULL && !ctrl->allowProtocol(protos[i]->szModuleName)) continue; - TCHAR *name; - if (hasAccounts) - { - name = mir_tstrdup(protos[i]->tszAccountName); - } - else - { - char szName[128]; - CallProtoService(protos[i]->szModuleName, PS_GETNAME, sizeof(szName), (LPARAM)szName); - name = mir_a2t(szName); - } - + TCHAR *name = mir_tstrdup(protos[i]->tszAccountName); char *setting = (char *) mir_alloc(128 * sizeof(char)); mir_snprintf(setting, 128, ctrl->setting, protos[i]->szModuleName); -- cgit v1.2.3