From ec0e34b4f88ebe03ff12f559e40dda52c51549b7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Jun 2015 21:20:39 +0000 Subject: langpack services module destroyed from mir_app the only survived service moved to mir_core git-svn-id: http://svn.miranda-ng.org/main/trunk@14250 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/svc_constants.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/UserInfoEx/src') diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 3f76ed0d40..12cd47c49d 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -270,15 +270,13 @@ static int __cdecl ListSortProc(const LPIDSTRLIST p1, const LPIDSTRLIST p2) static void SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount/*, SortedList *pSorted*/) { - if (!pList[0].ptszTranslated) - { + if (!pList[0].ptszTranslated) { for (UINT i = 0; i < nListCount; i++) - { - pList[i].ptszTranslated = (LPTSTR)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)pList[i].pszText); - } + pList[i].ptszTranslated = Langpack_PcharToTchar(pList[i].pszText); + // Ignore last item, if it is a "Other" item. if (!mir_strcmp(pList[nListCount-1].pszText, LPGEN("Other"))) nListCount--; - + // Sort list according translated text and ignore first item. qsort(pList+1, nListCount-1, sizeof(pList[0]), (int (*)(const void*, const void*))ListSortProc); @@ -309,7 +307,7 @@ INT_PTR GetCountryList(LPUINT pnListSize, LPIDSTRLIST *pList) for (UINT i = 0; i < MyCountriesCount; i++) { MyCountries[i].nID = country[i].id; MyCountries[i].pszText = country[i].szName; - MyCountries[i].ptszTranslated = (LPTSTR)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)country[i].szName); + MyCountries[i].ptszTranslated = Langpack_PcharToTchar(country[i].szName); } // Sort list according translated text and ignore first item. qsort(MyCountries+1, MyCountriesCount-1, sizeof(MyCountries[0]), -- cgit v1.2.3