From 18d6359313f9e9199eeb06f1d973d027ab784f43 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sun, 20 Jan 2013 18:21:35 +0000 Subject: - Another portion of _T replacement (patch from person) git-svn-id: http://svn.miranda-ng.org/main/trunk@3195 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Alarms/src/alarms.cpp | 2 +- plugins/AutoShutdown/src/settingsdlg.cpp | 4 +-- plugins/AutoShutdown/src/shutdownsvc.cpp | 46 +++++++++++++------------- plugins/AvatarHistory/src/AvatarHistory.cpp | 28 ++++++++-------- plugins/Clist_modern/src/modern_clcopts.cpp | 2 +- plugins/Clist_modern/src/modern_clistmenus.cpp | 2 +- plugins/Clist_modern/src/modern_clistopts.cpp | 2 +- plugins/Clist_nicer/skineditor/src/main.cpp | 2 +- plugins/Clist_nicer/src/clui.cpp | 6 ++-- plugins/Clist_nicer/src/init.cpp | 2 +- 10 files changed, 48 insertions(+), 48 deletions(-) (limited to 'plugins') diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index c608b35f56..b5f60c0098 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -119,7 +119,7 @@ static int PluginMessageReceived(WPARAM wParam,LPARAM lParam) hWnd = FindWindow(0, _T("Windows Media Player")); PostMessage(hWnd, WM_COMMAND, WMP_NEXT, 0); } - else mir_sntprintf(buff, SIZEOF(buff), _T("Unknown command issued: \"%s\""), msg); + else mir_sntprintf(buff, SIZEOF(buff), TranslateT("Unknown command issued: \"%s\""), msg); ShowPopup(pccsd->hContact, buff); diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp index 723909da7e..7d7ace9cff 100644 --- a/plugins/AutoShutdown/src/settingsdlg.cpp +++ b/plugins/AutoShutdown/src/settingsdlg.cpp @@ -111,8 +111,8 @@ static INT_PTR CALLBACK SettingsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR DWORD lastUnit; int i,index; const DWORD unitValues[]={1,60,60*60,60*60*24,60*60*24*7,60*60*24*31}; - const TCHAR *unitNames[]={_T("Second(s)"),_T("Minute(s)"),_T("Hour(s)"), - _T("Day(s)"),_T("Week(s)"),_T("Month(s)")}; + const TCHAR *unitNames[]={TranslateT("Second(s)"), TranslateT("Minute(s)"), TranslateT("Hour(s)"), + TranslateT("Day(s)"), TranslateT("Week(s)"), TranslateT("Month(s)")}; hwndCombo=GetDlgItem(hwndDlg,IDC_COMBO_COUNTDOWNUNIT); lastUnit=DBGetContactSettingDword(NULL,"AutoShutdown","CountdownUnit",SETTING_COUNTDOWNUNIT_DEFAULT); SendMessage(hwndCombo,CB_SETLOCALE,(WPARAM)locale,0); /* sort order */ diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index 5361f636f2..ac3efef3d7 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -440,15 +440,15 @@ static INT_PTR CALLBACK ShutdownDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR return TRUE; case M_UPDATE_COUNTDOWN: /* lParam=(WORD)countdown */ { TCHAR szText[256]; - TCHAR *desc[]={_T("Miranda NG is going to be automatically closed in %u second(s)."), - _T("All Miranda NG protocols are going to be set to offline in %u second(s)."), - _T("You will be logged off automatically in %u second(s)."), - _T("The computer will automatically be restarted in %u second(s)."), - _T("The computer will automatically be set to standby mode in %u second(s)."), - _T("The computer will automatically be set to hibernate mode in %u second(s)."), - _T("The workstation will automatically get locked in %u second(s)."), - _T("All dialup connections will be closed in %u second(s)."), - _T("The computer will automatically be shut down in %u second(s).")}; + TCHAR *desc[]={TranslateT("Miranda NG is going to be automatically closed in %u second(s)."), + TranslateT("All Miranda NG protocols are going to be set to offline in %u second(s)."), + TranslateT("You will be logged off automatically in %u second(s)."), + TranslateT("The computer will automatically be restarted in %u second(s)."), + TranslateT("The computer will automatically be set to standby mode in %u second(s)."), + TranslateT("The computer will automatically be set to hibernate mode in %u second(s)."), + TranslateT("The workstation will automatically get locked in %u second(s)."), + TranslateT("All dialup connections will be closed in %u second(s)."), + TranslateT("The computer will automatically be shut down in %u second(s).")}; mir_sntprintf(szText,SIZEOF(szText),TranslateTS(desc[shutdownType-1]),lParam); SetDlgItemText(hwndDlg,IDC_TEXT_HEADER,szText); /* countdown finished */ @@ -517,20 +517,20 @@ INT_PTR ServiceIsTypeEnabled(WPARAM wParam,LPARAM lParam) INT_PTR ServiceGetTypeDescription(WPARAM wParam,LPARAM lParam) { TCHAR *pszDesc; - const TCHAR *apszShort[]={_T("Close Miranda NG"),_T("Set Miranda NG offline"),_T("Log off user"), - _T("Restart computer"),_T("Shutdown computer"),_T("Standby mode"),_T("Hibernate mode"), - _T("Lock workstation"),_T("Hang up dialup connections"),_T("Close Miranda NG"), - _T("Set Miranda NG offline"),_T("Log off user"),_T("Restart computer"),_T("Shutdown computer"), - _T("Standby mode"),_T("Hibernate mode"),_T("Lock workstation"),_T("Hang up dialup connections")}; - const TCHAR *apszLong[]={_T("Sets all Miranda NG protocols to offline and closes Miranda NG."), - _T("Sets all Miranda NG protocols to offline."), - _T("Logs the current Windows user off so that another user can log in."), - _T("Shuts down Windows and then restarts Windows."), - _T("Closes all running programs and shuts down Windows to a point at which it is safe to turn off the power."), - _T("Saves the current Windows session in memory and sets the system to suspend mode."), - _T("Saves the current Windows session on harddisc, so that the power can be turned off."), - _T("Locks the computer. To unlock the computer, you must log in."), - _T("Sets all protocols to offline and closes all RAS connections.")}; + const TCHAR *apszShort[]={TranslateT("Close Miranda NG"),TranslateT("Set Miranda NG offline"),TranslateT("Log off user"), + TranslateT("Restart computer"),TranslateT("Shutdown computer"),TranslateT("Standby mode"),TranslateT("Hibernate mode"), + TranslateT("Lock workstation"),TranslateT("Hang up dialup connections"),TranslateT("Close Miranda NG"), + TranslateT("Set Miranda NG offline"),TranslateT("Log off user"),TranslateT("Restart computer"),TranslateT("Shutdown computer"), + TranslateT("Standby mode"),TranslateT("Hibernate mode"),TranslateT("Lock workstation"),TranslateT("Hang up dialup connections")}; + const TCHAR *apszLong[]={TranslateT("Sets all Miranda NG protocols to offline and closes Miranda NG."), + TranslateT("Sets all Miranda NG protocols to offline."), + TranslateT("Logs the current Windows user off so that another user can log in."), + TranslateT("Shuts down Windows and then restarts Windows."), + TranslateT("Closes all running programs and shuts down Windows to a point at which it is safe to turn off the power."), + TranslateT("Saves the current Windows session in memory and sets the system to suspend mode."), + TranslateT("Saves the current Windows session on harddisc, so that the power can be turned off."), + TranslateT("Locks the computer. To unlock the computer, you must log in."), + TranslateT("Sets all protocols to offline and closes all RAS connections.")}; /* shutdownType range check */ if(!wParam || (BYTE)wParam>SDSDT_MAX) return (int)NULL; /* select description */ diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index fe493bddd5..070281ce30 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -350,11 +350,11 @@ void CreateOldStyleShortcut(HANDLE hContact, TCHAR *history_filename) if (!CreateShortcut(history_filename, shortcut)) { - ShowPopup(hContact, _T("Avatar History: Unable to create shortcut"), shortcut); + ShowPopup(hContact, TranslateT("Avatar History: Unable to create shortcut"), shortcut); } else { - ShowDebugPopup(hContact, _T("AVH Debug: Shortcut created successfully"), shortcut); + ShowDebugPopup(hContact, TranslateT("AVH Debug: Shortcut created successfully"), shortcut); } } @@ -386,19 +386,19 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if (hContact == NULL) { - ShowDebugPopup(NULL, _T("AVH Debug"), _T("Invalid contact/avatar... skipping")); + ShowDebugPopup(NULL, TranslateT("AVH Debug"), TranslateT("Invalid contact/avatar... skipping")); return 0; } char *proto = GetContactProto((HANDLE)wParam); if (proto == NULL) { - ShowDebugPopup(hContact, _T("AVH Debug"), _T("Invalid protocol... skipping")); + ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Invalid protocol... skipping")); return 0; } else if (metacontacts_proto != NULL && strcmp(metacontacts_proto, proto) == 0) { - ShowDebugPopup(hContact, _T("AVH Debug"), _T("Ignoring metacontacts notification")); + ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Ignoring metacontacts notification")); return 0; } @@ -411,7 +411,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) { //avoid duplicate "removed avatar" notifications //do not notify on an empty profile - ShowDebugPopup(hContact, _T("AVH Debug"), _T("Removed avatar, no avatar before...skipping")); + ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Removed avatar, no avatar before...skipping")); DBFreeVariant(&dbvOldHash); return 0; } @@ -431,7 +431,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if(ret && !_tcscmp(dbvOldHash.ptszVal, avatar->hash)) { // same avatar hash, skipping - ShowDebugPopup(hContact, _T("AVH Debug"), _T("Hashes are the same... skipping")); + ShowDebugPopup(hContact, TranslateT("AVH Debug"), TranslateT("Hashes are the same... skipping")); DBFreeVariant(&dbvOldHash); return 0; } @@ -448,9 +448,9 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) { GetOldStyleAvatarName(history_filename, hContact); if (CopyImageFile(avatar->filename, history_filename)) - ShowPopup(hContact, _T("Avatar History: Unable to save avatar"), history_filename); + ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), history_filename); else - ShowDebugPopup(hContact, _T("AVH Debug: File copied successfully"), history_filename); + ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename); if (ServiceExists(MS_MC_GETMETACONTACT)) { @@ -462,9 +462,9 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) GetOldStyleAvatarName(filename, hMetaContact); if (CopyImageFile(avatar->filename, filename)) - ShowPopup(hContact, _T("Avatar History: Unable to save avatar"), filename); + ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), filename); else - ShowDebugPopup(hContact, _T("AVH Debug: File copied successfully"), filename); + ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), filename); } } } @@ -494,9 +494,9 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) _T("%s\\%s"), history_filename, hash); if (CopyImageFile(avatar->filename, history_filename)) - ShowPopup(hContact, _T("Avatar History: Unable to save avatar"), history_filename); + ShowPopup(hContact, TranslateT("Avatar History: Unable to save avatar"), history_filename); else - ShowDebugPopup(hContact, _T("AVH Debug: File copied successfully"), history_filename); + ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename); } if (opts.log_per_contact_folders) @@ -713,7 +713,7 @@ TCHAR * GetOldStyleAvatarName(TCHAR *fn, HANDLE hContact) _T("%s\\%04d-%02d-%02d %02dh%02dm%02ds"), fn, curtime.wYear, curtime.wMonth, curtime.wDay, curtime.wHour, curtime.wMinute, curtime.wSecond); - ShowDebugPopup(hContact,_T("AVH Debug: GetOldStyleAvatarName"),fn); + ShowDebugPopup(hContact,TranslateT("AVH Debug: GetOldStyleAvatarName"),fn); return fn; } diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index aafc3579d4..a43322a6e0 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -731,7 +731,7 @@ static int _GetNetVisibleProtoCount() return netProtoCount; } -TCHAR *sortby[] = {_T("Name"), _T("Name (use locale settings)") , _T("Status"), _T("Last message time"), _T("Account Name"), _T("Rate"), _T("-Nothing-")}; +TCHAR *sortby[] = {LPGENT("Name"), LPGENT("Name (use locale settings)") , LPGENT("Status"), LPGENT("Last message time"), LPGENT("Account Name"), LPGENT("Rate"), LPGENT("-Nothing-")}; int sortbyValue[] = { SORTBY_NAME, SORTBY_NAME_LOCALE, SORTBY_STATUS, SORTBY_LASTMSG, SORTBY_PROTO ,SORTBY_RATE , SORTBY_NOTHING }; static INT_PTR CALLBACK DlgProcClistOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 12de0bd957..cf0d402bc5 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -159,7 +159,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) } mi.hIcon = NULL; - mi.ptszName = _T("Show even if offline"); + mi.ptszName = LPGENT("Show even if offline"); mi.flags = CMIF_CHILDPOPUP|CMIF_TCHAR|(db_get_b((HANDLE)wParam,"CList","noOffline",0)?CMIF_CHECKED:0); mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE; mi.popupPosition = i+100000000; diff --git a/plugins/Clist_modern/src/modern_clistopts.cpp b/plugins/Clist_modern/src/modern_clistopts.cpp index 0a86c8b4d4..bca8ad5a03 100644 --- a/plugins/Clist_modern/src/modern_clistopts.cpp +++ b/plugins/Clist_modern/src/modern_clistopts.cpp @@ -532,7 +532,7 @@ static INT_PTR CALLBACK DlgProcItemTextOpts(HWND hwndDlg, UINT msg, WPARAM wPara //TODO: init IDC_ALIGNGROUPCOMBO from DBGetContactSettingByte(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT); { int item; - TCHAR *align[] = {_T("Left align group names"), _T("Center group names"), _T("Right align group names")}; + TCHAR *align[] = {LPGENT("Left align group names"), LPGENT("Center group names"), LPGENT("Right align group names")}; for (int i=0; i < sizeof(align)/sizeof(char*); i++) item = SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_ADDSTRING,0,(LPARAM)TranslateTS(align[i])); SendDlgItemMessage(hwndDlg,IDC_ALIGNGROUPCOMBO,CB_SETCURSEL,db_get_b(NULL,"CList","AlignGroupCaptions",SETTING_ALIGNGROPCAPTION_DEFAULT),0); diff --git a/plugins/Clist_nicer/skineditor/src/main.cpp b/plugins/Clist_nicer/skineditor/src/main.cpp index 6f95e8d4e5..917597642a 100644 --- a/plugins/Clist_nicer/skineditor/src/main.cpp +++ b/plugins/Clist_nicer/skineditor/src/main.cpp @@ -662,7 +662,7 @@ static INT_PTR CALLBACK SkinEdit_ExtBkDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa SendMessage(hwndDlg, WM_USER + 101, 0, 0); psd->hMenuItems = CreatePopupMenu(); - AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, _T("Copy from")); + AppendMenu(psd->hMenuItems, MF_STRING | MF_DISABLED, (UINT_PTR)0, LPGENT("Copy from")); AppendMenuA(psd->hMenuItems, MF_SEPARATOR, (UINT_PTR)0, NULL); { diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 3caf5de735..4209cde5ea 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1473,12 +1473,12 @@ skipbg: SendMessage(item->hWnd, BM_SETCHECK, 0, 0); } if ( !contactOK) - MessageBox(0, _T("The requested action requires a valid contact selection. Please select a contact from the contact list and repeat"), _T("Parameter mismatch"), MB_OK); + MessageBox(0, TranslateT("The requested action requires a valid contact selection. Please select a contact from the contact list and repeat"), TranslateT("Parameter mismatch"), MB_OK); if (serviceFailure) { char szError[512]; - mir_snprintf(szError, 512, "The service %s specified by the %s button definition was not found. You may need to install additional plugins", item->szService, item->szName); - MessageBoxA(0, szError, "Service failure", MB_OK); + mir_snprintf(szError, 512, Translate("The service %s specified by the %s button definition was not found. You may need to install additional plugins"), item->szService, item->szName); + MessageBoxA(0, szError, Translate("Service failure"), MB_OK); } break; } diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 455ca38bfb..9283d85c17 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -38,7 +38,7 @@ CLIST_INTERFACE* pcli = NULL; int hLangpack; #define DEFAULT_TB_VISIBILITY (1 | 2 | 4 | 8 | 16 | 32 | 64 | 8192) -TCHAR *szNoevents = _T("No events..."); +TCHAR *szNoevents = LPGENT("No events..."); //extern HICON im_clienthIcons[NR_CLIENTS]; extern HICON overlayicons[10]; -- cgit v1.2.3