summaryrefslogtreecommitdiff
path: root/plugins/AssocMgr
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-18 21:20:39 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-18 21:20:39 +0000
commitec0e34b4f88ebe03ff12f559e40dda52c51549b7 (patch)
tree42e8a56fe17d9736527fe79a6345e857842fbf40 /plugins/AssocMgr
parentca702593c60aa89c06633777feb7cf79ad8e751f (diff)
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
Diffstat (limited to 'plugins/AssocMgr')
-rw-r--r--plugins/AssocMgr/src/assoclist.cpp2
-rw-r--r--plugins/AssocMgr/src/test.cpp10
-rw-r--r--plugins/AssocMgr/src/utils.cpp24
3 files changed, 14 insertions, 22 deletions
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp
index 2e7dcffe9c..a86a3542c1 100644
--- a/plugins/AssocMgr/src/assoclist.cpp
+++ b/plugins/AssocMgr/src/assoclist.cpp
@@ -696,7 +696,7 @@ static INT_PTR CALLBACK AssocListOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara
}
}
/* sort items (before moving to groups) */
- ListView_SortItems(hwndList, ListViewSortDesc, (LPARAM)CallService(MS_LANGPACK_GETLOCALE, 0, 0));
+ ListView_SortItems(hwndList, ListViewSortDesc, Langpack_GetDefaultLocale());
/* groups */
if(ListView_EnableGroupView(hwndList, TRUE) == 1) { /* returns 0 on pre WinXP or if commctls6 are disabled */
LVGROUP lvg;
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp
index 8b3593e89d..11f10513fe 100644
--- a/plugins/AssocMgr/src/test.cpp
+++ b/plugins/AssocMgr/src/test.cpp
@@ -803,16 +803,6 @@ int JabberLinksUninit()
// -----------------------------------------
-/*
-static HANDLE hServiceTest;
-static int TestingService(WPARAM wParam, LPARAM lParam)
-{
- UNREFERENCED_PARAMETER(wParam);
- MessageBoxEx(NULL, (TCHAR*)lParam, TranslateT("Testing Service"), MB_OK | MB_SETFOREGROUND | MB_TOPMOST | MB_TASKMODAL, LANGIDFROMLCID((LCID)CallService(MS_LANGPACK_GETLOCALE, 0, 0)));
- return 0;
-}
-*/
-
void InitTest(void)
{
#ifdef AIM_SUPPORT_TEST
diff --git a/plugins/AssocMgr/src/utils.cpp b/plugins/AssocMgr/src/utils.cpp
index 993f0bbaa9..0c76880e29 100644
--- a/plugins/AssocMgr/src/utils.cpp
+++ b/plugins/AssocMgr/src/utils.cpp
@@ -30,7 +30,7 @@ WCHAR* a2u(const char *pszAnsi,BOOL fMirCp)
WCHAR *psz;
if(pszAnsi==NULL) return NULL;
- codepage=fMirCp?CallService(MS_LANGPACK_GETCODEPAGE,0,0):CP_ACP;
+ codepage = fMirCp ? Langpack_GetDefaultCodePage() : CP_ACP;
cch=MultiByteToWideChar(codepage,0,pszAnsi,-1,NULL,0);
if (!cch) return NULL;
@@ -50,7 +50,7 @@ char* u2a(const WCHAR *pszUnicode,BOOL fMirCp)
DWORD flags;
if(pszUnicode==NULL) return NULL;
- codepage=fMirCp?CallService(MS_LANGPACK_GETCODEPAGE,0,0):CP_ACP;
+ codepage = fMirCp ? Langpack_GetDefaultCodePage() : CP_ACP;
/* without WC_COMPOSITECHECK some characters might get out strange (see MS blog) */
cch=WideCharToMultiByte(codepage,flags=WC_COMPOSITECHECK,pszUnicode,-1,NULL,0,NULL,NULL);
if (!cch) cch=WideCharToMultiByte(codepage,flags=0,pszUnicode,-1,NULL,0,NULL,NULL);
@@ -158,13 +158,15 @@ void ShowInfoMessage(BYTE flags,const char *pszTitle,const char *pszTextFmt,...)
return; /* success */
}
- mbp=(MSGBOXPARAMSA*)mir_calloc(sizeof(*mbp));
- if(mbp==NULL) return;
- mbp->cbSize=sizeof(*mbp);
- mbp->lpszCaption=mir_strdup(pszTitle);
- mbp->lpszText=mir_strdup(szText);
- mbp->dwStyle=MB_OK|MB_SETFOREGROUND|MB_TASKMODAL;
- mbp->dwLanguageId=LANGIDFROMLCID((LCID)CallService(MS_LANGPACK_GETLOCALE,0,0));
+ mbp = (MSGBOXPARAMSA*)mir_calloc(sizeof(*mbp));
+ if(mbp == NULL)
+ return;
+
+ mbp->cbSize = sizeof(*mbp);
+ mbp->lpszCaption = mir_strdup(pszTitle);
+ mbp->lpszText = mir_strdup(szText);
+ mbp->dwStyle = MB_OK | MB_SETFOREGROUND | MB_TASKMODAL;
+ mbp->dwLanguageId = LANGIDFROMLCID(Langpack_GetDefaultLocale());
switch(flags&NIIF_ICON_MASK) {
case NIIF_INFO: mbp->dwStyle|=MB_ICONINFORMATION; break;
case NIIF_WARNING: mbp->dwStyle|=MB_ICONWARNING; break;
@@ -177,8 +179,8 @@ void ShowInfoMessage(BYTE flags,const char *pszTitle,const char *pszTextFmt,...)
char* GetWinErrorDescription(DWORD dwLastError)
{
char *buf=NULL;
- DWORD flags=FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM;
- if (!FormatMessageA(flags,NULL,dwLastError,LANGIDFROMLCID((LCID)CallService(MS_LANGPACK_GETLOCALE,0,0)),(char*)&buf,0,NULL))
+ DWORD flags = FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM;
+ if (!FormatMessageA(flags,NULL,dwLastError, LANGIDFROMLCID(Langpack_GetDefaultLocale()),(char*)&buf,0,NULL))
if(GetLastError()==ERROR_RESOURCE_LANG_NOT_FOUND)
FormatMessageA(flags,NULL,dwLastError,0,(char*)&buf,0,NULL);
return buf;