From 6b27aa506d7b45ce503d0a546cbe9d13746c2be3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 15 Oct 2012 21:31:54 +0000 Subject: Unicode translation for Import git-svn-id: http://svn.miranda-ng.org/main/trunk@1952 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/progress.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/Import/src/progress.cpp') diff --git a/plugins/Import/src/progress.cpp b/plugins/Import/src/progress.cpp index 2328ce1222..8856fa837e 100644 --- a/plugins/Import/src/progress.cpp +++ b/plugins/Import/src/progress.cpp @@ -76,25 +76,22 @@ INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lP return FALSE; } -void AddMessage( const char* fmt, ... ) +void AddMessage( const TCHAR* fmt, ... ) { va_list args; - char msgBuf[ 4096 ]; + TCHAR msgBuf[ 4096 ]; va_start( args, fmt ); - mir_vsnprintf( msgBuf, sizeof(msgBuf), Translate(fmt), args ); + mir_vsntprintf( msgBuf, SIZEOF(msgBuf), TranslateTS(fmt), args ); #ifdef _LOGGING { FILE *stream; stream = fopen("Import Debug.log", "a"); - fprintf(stream, "%s\n", msgBuf); + fprintf(stream, "%S\n", msgBuf); fclose(stream); } #endif - { TCHAR* str = mir_a2t( msgBuf ); - SendMessage( hdlgProgress, PROGM_ADDMESSAGE, 0, ( LPARAM )str ); - mir_free( str ); - } + SendMessage(hdlgProgress, PROGM_ADDMESSAGE, 0, (LPARAM)msgBuf); } -- cgit v1.2.3