From 400d2e50f52fe113f2130db6062fef4a970a1042 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 Feb 2013 04:56:32 +0000 Subject: hooking loading/unloading events git-svn-id: http://svn.miranda-ng.org/main/trunk@3676 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SecureIM/src/commonheaders.cpp | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'plugins/SecureIM/src/commonheaders.cpp') diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index fa384b3492..75749b083f 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -17,7 +17,7 @@ HICON g_hICO[ICO_CNT], g_hPOP[POP_CNT], g_hIEC[1+IEC_CNT*MODE_CNT] = {0}; HANDLE g_IEC[1+IEC_CNT*MODE_CNT]; int iBmpDepth; -BOOL bCoreUnicode = false, bMetaContacts = false, bPopupExists = false, bPopupUnicode = false; +BOOL bMetaContacts = false, bPopupExists = false; BOOL bPGPloaded = false, bPGPkeyrings = false, bUseKeyrings = false, bPGPprivkey = false; BOOL bGPGloaded = false, bGPGkeyrings = false, bSavePass = false; BOOL bSFT, bSOM, bASI, bMCD, bSCM, bDGP, bAIP, bNOL, bAAK, bMCM; @@ -122,33 +122,21 @@ LPSTR TranslateU( LPCSTR lpText ) ca2u++; pa2u = (pA2U) mir_realloc(pa2u,sizeof(A2U)*ca2u); pa2u[i].a = (LPSTR) lpText; - if ( bCoreUnicode ) { - LPWSTR lpwText = mir_a2u(lpText); - LPWSTR lpwTran = TranslateW(lpwText); - mir_free(lpwText); - pa2u[i].u = mir_strdup(exp->utf8encode(lpwTran)); - } - else { - LPSTR lpTran = Translate(lpText); - LPWSTR lpwTran = mir_a2u(lpTran); - lpTran = exp->utf8encode(lpwTran); - mir_free(lpwTran); - pa2u[i].u = mir_strdup(lpTran); - } + LPWSTR lpwText = mir_a2u(lpText); + LPWSTR lpwTran = TranslateW(lpwText); + mir_free(lpwText); + pa2u[i].u = mir_strdup(exp->utf8encode(lpwTran)); return pa2u[i].u; } int msgbox( HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType) { - if ( bCoreUnicode ) { - LPWSTR lpwText = mir_a2u(lpText); - LPWSTR lpwCaption = mir_a2u(lpCaption); - int r = MessageBoxW(hWnd,TranslateW(lpwText),TranslateW(lpwCaption),uType); - mir_free(lpwCaption); - mir_free(lpwText); - return r; - } - return MessageBoxA(hWnd,Translate(lpText),Translate(lpCaption),uType); + LPWSTR lpwText = mir_a2u(lpText); + LPWSTR lpwCaption = mir_a2u(lpCaption); + int r = MessageBoxW(hWnd,TranslateW(lpwText),TranslateW(lpwCaption),uType); + mir_free(lpwCaption); + mir_free(lpwText); + return r; } void CopyToClipboard(HWND hwnd,LPSTR msg) -- cgit v1.2.3