diff options
author | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-07-25 10:31:04 +0000 |
commit | 8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch) | |
tree | 94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/ContextHelp | |
parent | 1e273e28d89b5838e3d0f0cafac9676577cb71ce (diff) |
hello, Unix.
phase 1: removing _T()
git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ContextHelp')
-rw-r--r-- | plugins/ContextHelp/src/datastore.cpp | 6 | ||||
-rw-r--r-- | plugins/ContextHelp/src/dlgboxsubclass.cpp | 6 | ||||
-rw-r--r-- | plugins/ContextHelp/src/helpdlg.cpp | 2 | ||||
-rw-r--r-- | plugins/ContextHelp/src/helppack.cpp | 8 | ||||
-rw-r--r-- | plugins/ContextHelp/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/ContextHelp/src/options.cpp | 20 | ||||
-rw-r--r-- | plugins/ContextHelp/src/utils.cpp | 42 |
7 files changed, 43 insertions, 43 deletions
diff --git a/plugins/ContextHelp/src/datastore.cpp b/plugins/ContextHelp/src/datastore.cpp index 40df51eb08..a35ec9b9b3 100644 --- a/plugins/ContextHelp/src/datastore.cpp +++ b/plugins/ContextHelp/src/datastore.cpp @@ -139,7 +139,7 @@ static void LoaderThread(void *arg) p = _tcsrchr(szDir, _T('\\'));
if (p)
*p = _T('\0');
- mir_sntprintf(szSearch, _T("%s\\helppack_*.txt"), szDir);
+ mir_sntprintf(szSearch, L"%s\\helppack_*.txt", szDir);
hFind = FindFirstFile(szSearch, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -148,7 +148,7 @@ static void LoaderThread(void *arg) continue;
if (lstrlen(wfd.cFileName) < 4 || wfd.cFileName[lstrlen(wfd.cFileName) - 4] != _T('.'))
continue;
- mir_sntprintf(szSearch, _T("%s\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szSearch, L"%s\\%s", szDir, wfd.cFileName);
success = 1;
break;
} while (FindNextFile(hFind, &wfd));
@@ -161,7 +161,7 @@ static void LoaderThread(void *arg) return;
}
- fp = _tfopen(szSearch, _T("rt"));
+ fp = _tfopen(szSearch, L"rt");
if (fp == NULL) {
if (!Miranda_Terminated() && IsWindow(hwndHelpDlg))
PostMessage(hwndHelpDlg, M_HELPLOADFAILED, 0, (LPARAM)dtsp->hwndCtl);
diff --git a/plugins/ContextHelp/src/dlgboxsubclass.cpp b/plugins/ContextHelp/src/dlgboxsubclass.cpp index 32d9c2f3cd..310170e989 100644 --- a/plugins/ContextHelp/src/dlgboxsubclass.cpp +++ b/plugins/ContextHelp/src/dlgboxsubclass.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SC_CONTEXTHELP_SEPARATOR SC_SEPARATOR+1
#define SC_CONTEXTHELP_DIALOG SC_CONTEXTHELP+1
-#define PROP_CONTEXTSTATE _T("HelpPlugin_ContextState")
+#define PROP_CONTEXTSTATE L"HelpPlugin_ContextState"
#define PROPF_MENUFORCED 0x01 // always show help context menu for ctl (override default)
#define PROPF_MENUDISABLED 0x02 // never show help context menu for ctl
#define PROPF_AUTOTIPFORCED 0x04 // always show autotip for ctl (override default)
@@ -345,7 +345,7 @@ static LRESULT CALLBACK DialogBoxSubclassProc(HWND hwndDlg, UINT msg, WPARAM wPa EnumChildWindows(hwndDlg, RemovePropForAllChildsEnumProc, (LPARAM)PROP_CONTEXTSTATE);
{
TCHAR text[64];
- mir_sntprintf(text, _countof(text), _T("unhooked window 0x%X for context help\n"), hwndDlg);
+ mir_sntprintf(text, _countof(text), L"unhooked window 0x%X for context help\n", hwndDlg);
OutputDebugString(text);
}
SetWindowLongPtr(hwndDlg, GWLP_WNDPROC, (LONG_PTR)pfnWndProc);
@@ -410,7 +410,7 @@ static LRESULT CALLBACK HelpSendMessageHookProc(int code, WPARAM wParam, LPARAM }
{
TCHAR text[64];
- mir_sntprintf(text, _countof(text), _T("hooked window 0x%X for context help\n"), msg->hwnd);
+ mir_sntprintf(text, _countof(text), L"hooked window 0x%X for context help\n", msg->hwnd);
OutputDebugString(text);
}
break;
diff --git a/plugins/ContextHelp/src/helpdlg.cpp b/plugins/ContextHelp/src/helpdlg.cpp index 38ee716452..2eb698f28a 100644 --- a/plugins/ContextHelp/src/helpdlg.cpp +++ b/plugins/ContextHelp/src/helpdlg.cpp @@ -445,7 +445,7 @@ INT_PTR CALLBACK HelpDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else
exStyle &= ~(WS_EX_RTLREADING | WS_EX_RIGHT);
}
- mir_sntprintf(buf, sizeof(buf) - 4, _T("%s"), szTitle);
+ mir_sntprintf(buf, sizeof(buf) - 4, L"%s", szTitle);
if (hdc != NULL && hwndCtlText != NULL) {
SendMessage(hwndCtlText, EM_GETRECT, 0, (LPARAM)&rc);
hFontPrev = (HFONT)SelectObject(hdc, (HFONT)SendMessage(hwndCtlText, WM_GETFONT, 0, 0)); // look at !!
diff --git a/plugins/ContextHelp/src/helppack.cpp b/plugins/ContextHelp/src/helppack.cpp index 71f6e50de0..0c1e97e8b2 100644 --- a/plugins/ContextHelp/src/helppack.cpp +++ b/plugins/ContextHelp/src/helppack.cpp @@ -174,7 +174,7 @@ static BOOL LoadPackData(HELPPACK_INFO *pack, BOOL fEnabledPacks, const char *ps */
if (!GetPackPath(szFileName, _countof(szFileName), fEnabledPacks, pack->szFileName))
return FALSE;
- FILE *fp = _tfopen(szFileName, _T("rt"));
+ FILE *fp = _tfopen(szFileName, L"rt");
if (fp == NULL)
return FALSE;
fgets(line, sizeof(line), fp);
@@ -269,7 +269,7 @@ BOOL GetPackPath(TCHAR *pszPath, int nSize, BOOL fEnabledPacks, const TCHAR *psz if (!fEnabledPacks) {
if (nSize<(lstrlen(pszPath) + 10))
return FALSE;
- lstrcat(pszPath, _T("Languages\\"));
+ lstrcat(pszPath, L"Languages\\");
}
/* file name */
if (pszFile != NULL) {
@@ -430,7 +430,7 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL *pszFile = _T('\0');
/* move wrongly placed packs from 'Plugins' to 'Language' */
- mir_sntprintf(szFrom, _T("%s\\Plugins\\%s"), szDir, pszFilePattern);
+ mir_sntprintf(szFrom, L"%s\\Plugins\\%s", szDir, pszFilePattern);
WIN32_FIND_DATA wfd;
HANDLE hFind = FindFirstFile(szFrom, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -446,7 +446,7 @@ void CorrectPacks(const TCHAR *pszFilePattern, const TCHAR *pszDefaultFile, BOOL /* move file */
if (GetPackPath(szDest, _countof(szDest), FALSE, wfd.cFileName)) {
- mir_sntprintf(szFrom, _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szFrom, L"%s\\Plugins\\%s", szDir, wfd.cFileName);
if (!MoveFile(szFrom, szDest) && GetLastError() == ERROR_ALREADY_EXISTS) {
DeleteFile(szDest);
MoveFile(szFrom, szDest);
diff --git a/plugins/ContextHelp/src/main.cpp b/plugins/ContextHelp/src/main.cpp index 28887b15e0..a5bd86455e 100644 --- a/plugins/ContextHelp/src/main.cpp +++ b/plugins/ContextHelp/src/main.cpp @@ -96,7 +96,7 @@ extern "C" __declspec(dllexport) int Load(void) if (!InitCommonControlsEx(&icc))
return 1;
- hMsftEdit = LoadLibrary(_T("riched20.dll"));
+ hMsftEdit = LoadLibrary(L"riched20.dll");
if (hMsftEdit == NULL) {
if (IDYES != MessageBoxEx(NULL,
TranslateT("The Context help plugin can not be loaded, Msftedit.dll is missing. If you are using WINE, please make sure you have Msftedit.dll installed. Press 'Yes' to continue loading Miranda."),
diff --git a/plugins/ContextHelp/src/options.cpp b/plugins/ContextHelp/src/options.cpp index 507dcabf01..c1aabb64aa 100644 --- a/plugins/ContextHelp/src/options.cpp +++ b/plugins/ContextHelp/src/options.cpp @@ -174,7 +174,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac if (p != NULL)
*p = _T('\0');
TCHAR szSearch[MAX_PATH];
- mir_sntprintf(szSearch, _T("%s\\Plugins\\*.dll"), szDir);
+ mir_sntprintf(szSearch, L"%s\\Plugins\\*.dll", szDir);
WIN32_FIND_DATA wfd;
HANDLE hFind = FindFirstFile(szSearch, &wfd);
if (hFind != INVALID_HANDLE_VALUE) {
@@ -198,7 +198,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac continue;
/* friendly name of the plugin */
- mir_sntprintf(szSearch, _T("%s\\Plugins\\%s"), szDir, wfd.cFileName);
+ mir_sntprintf(szSearch, L"%s\\Plugins\\%s", szDir, wfd.cFileName);
HMODULE hModule = GetModuleHandle(szSearch);
BOOL fNeedsFree = (hModule == NULL);
if (hModule == NULL) {
@@ -217,7 +217,7 @@ static void DisplayNotIncludedPlugins(HWND hwndListBox, const HELPPACK_INFO *pac CleanupPluginName(buf);
TCHAR buf2[128];
- mir_sntprintf(buf2, _T("%hs (%s)"), buf, CharLower(wfd.cFileName));
+ mir_sntprintf(buf2, L"%hs (%s)", buf, CharLower(wfd.cFileName));
SendMessage(hwndListBox, LB_ADDSTRING, 0, (LPARAM)buf2);
}
}
@@ -271,7 +271,7 @@ static void DisplayPackInfo(HWND hwndDlg, const HELPPACK_INFO *pack) TCHAR *pszIncompat;
pszIncompat = TranslateT("(incompatible)");
szLocaleName[_countof(szLocaleName) - lstrlen(pszIncompat) - 1] = 0;
- lstrcat(lstrcat(szLocaleName, _T(" ")), pszIncompat); /* buffer safe */
+ lstrcat(lstrcat(szLocaleName, L" "), pszIncompat); /* buffer safe */
}
SetDlgItemText(hwndDlg, IDC_LANGLOCALE, szLocaleName);
}
@@ -343,7 +343,7 @@ static void DeletePackFile(HWND hwndDlg, HWND hwndList, int iItem, HELPPACK_INFO lvi.mask = LVIF_PARAM;
lvi.iSubItem = 0;
if (ListView_GetItem(hwndList, &lvi))
- EnablePack((HELPPACK_INFO*)lvi.lParam, _T("helppack_*.txt"));
+ EnablePack((HELPPACK_INFO*)lvi.lParam, L"helppack_*.txt");
}
else
DisplayPackInfo(hwndDlg, NULL);
@@ -429,7 +429,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
if (ServiceExists(MS_FLAGS_LOADFLAGICON))
ListView_SetImageList(hwndList, ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR24, 8, 8), LVSIL_SMALL);
- CorrectPacks(_T("helppack_*.txt"), _T("helppack_english.txt"), FALSE);
+ CorrectPacks(L"helppack_*.txt", L"helppack_english.txt", FALSE);
SendMessage(hwndDlg, M_RELOADLIST, 0, 0);
SendMessage(hwndDlg, M_SHOWFILECOL, 0, 1);
return TRUE;
@@ -443,7 +443,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP HIMAGELIST himl = ListView_GetImageList(hwndList, LVSIL_SMALL);
ImageList_RemoveAll(himl);
/* enum all packs */
- EnumPacks(InsertPackItemEnumProc, _T("helppack_*.txt"), "Miranda Help Pack Version 1", (WPARAM)hwndList, (LPARAM)himl);
+ EnumPacks(InsertPackItemEnumProc, L"helppack_*.txt", "Miranda Help Pack Version 1", (WPARAM)hwndList, (LPARAM)himl);
/* nothing installed */
if (!ListView_GetItemCount(hwndList))
DisplayPackInfo(hwndDlg, NULL);
@@ -636,7 +636,7 @@ static INT_PTR CALLBACK LangOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (lvi.iItem = 0; ListView_GetItem(hwndList, &lvi); ++lvi.iItem) {
HELPPACK_INFO *pack = (HELPPACK_INFO*)lvi.lParam;
if (lvi.state&INDEXTOSTATEIMAGEMASK(2)) {
- EnablePack(pack, _T("helppack_*.txt"));
+ EnablePack(pack, L"helppack_*.txt");
pack->flags |= HPF_ENABLED;
}
else
@@ -757,7 +757,7 @@ static int HelpOptInit(WPARAM wParam, LPARAM) Options_AddPage(wParam, &odp);
#ifdef EDITOR
- odp.ptszTab = _T("Help editor"); /* autotranslated */
+ odp.ptszTab = L"Help editor"; /* autotranslated */
#else
odp.ptszTab = LPGENT("Advanced"); /* autotranslated */
#endif
@@ -776,7 +776,7 @@ void InitOptions(void) hwndLangOpt = NULL;
hHookOptInit = HookEvent(ME_OPT_INITIALISE, HelpOptInit);
- CorrectPacks(_T("helppack_*.txt"), _T("helppack_english.txt"), FALSE);
+ CorrectPacks(L"helppack_*.txt", L"helppack_english.txt", FALSE);
}
void UninitOptions(void)
diff --git a/plugins/ContextHelp/src/utils.cpp b/plugins/ContextHelp/src/utils.cpp index aac6e70a22..5532d39db5 100644 --- a/plugins/ContextHelp/src/utils.cpp +++ b/plugins/ContextHelp/src/utils.cpp @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef EDITOR
extern const TCHAR *szControlTypeNames[] = {
- _T("Unknown"), _T("Dialog Box"), _T("Button"), _T("Check Box"), _T("Radio Button"),
- _T("Text"), _T("Image"), _T("Edit Box"), _T("Group Box"), _T("Combo Box"),
- _T("List Box"), _T("Spin Edit Box"), _T("Progress Bar"), _T("Slider"), _T("List View"),
- _T("Tree View"), _T("Date/Time Picker"), _T("IP Address"), _T("Status Bar"), _T("Hyperlink"),
- _T("Contact List"), _T("Scroll Bar"), _T("Animation"), _T("Hotkey"), _T("Tabs"),
- _T("Colour Picker"), _T("Tool Bar"), _T("Combo Edit Box"), _T("Size Grip") };
+ L"Unknown", L"Dialog Box", L"Button", L"Check Box", L"Radio Button",
+ L"Text", L"Image", L"Edit Box", L"Group Box", L"Combo Box",
+ L"List Box", L"Spin Edit Box", L"Progress Bar", L"Slider", L"List View",
+ L"Tree View", L"Date/Time Picker", L"IP Address", L"Status Bar", L"Hyperlink",
+ L"Contact List", L"Scroll Bar", L"Animation", L"Hotkey", L"Tabs",
+ L"Colour Picker", L"Tool Bar", L"Combo Edit Box", L"Size Grip" };
#endif
int GetControlType(HWND hwndCtl)
@@ -41,10 +41,10 @@ int GetControlType(HWND hwndCtl) return CTLTYPE_DIALOG;
if (!GetClassName(hwndCtl, szClassName, _countof(szClassName)))
return CTLTYPE_UNKNOWN;
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return CTLTYPE_DIALOG;
- else if (!lstrcmpi(szClassName, _T("Static"))) {
- if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("ComboBox")) || !lstrcmpi(szClassName, WC_COMBOBOXEX))
+ else if (!lstrcmpi(szClassName, L"Static")) {
+ if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"ComboBox") || !lstrcmpi(szClassName, WC_COMBOBOXEX))
return CTLTYPE_COMBO;
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
switch (style&SS_TYPEMASK) {
@@ -67,7 +67,7 @@ int GetControlType(HWND hwndCtl) }
else if (GetClassLong(hwndCtl, GCW_ATOM) == 32772) // WinNT/2000/XP: icon titles
return CTLTYPE_IMAGE; // class="#32772"
- else if (!lstrcmpi(szClassName, _T("Button"))) {
+ else if (!lstrcmpi(szClassName, L"Button")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
switch (style & 0x24) {
case BS_CHECKBOX:
@@ -89,25 +89,25 @@ int GetControlType(HWND hwndCtl) }
else if (!lstrcmpi(szClassName, MIRANDABUTTONCLASS))
return CTLTYPE_BUTTON;
- else if (!lstrcmpi(szClassName, _T("Edit"))) {
- if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("ComboBox")))
+ else if (!lstrcmpi(szClassName, L"Edit")) {
+ if (GetClassName(GetParent(hwndCtl), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"ComboBox"))
return CTLTYPE_COMBO;
if (GetClassName(GetWindow(hwndCtl, GW_HWNDNEXT), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, UPDOWN_CLASS))
if ((HWND)SendMessage(GetWindow(hwndCtl, GW_HWNDNEXT), UDM_GETBUDDY, 0, 0) == hwndCtl)
return CTLTYPE_SPINEDIT;
return CTLTYPE_EDIT;
}
- else if (!_tcsnicmp(szClassName, _T("RichEdit"), 8))
+ else if (!_tcsnicmp(szClassName, L"RichEdit", 8))
return CTLTYPE_EDIT; // RICHEDIT,RichEdit20A,RichEdit20W,RichEdit50W and future versions
- else if (!lstrcmpi(szClassName, _T("ListBox"))) {
+ else if (!lstrcmpi(szClassName, L"ListBox")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
if (style&LBS_COMBOBOX)
return CTLTYPE_COMBO;
return CTLTYPE_LIST;
}
- else if (!lstrcmpi(szClassName, _T("ComboLBox")) || !lstrcmpi(szClassName, _T("ComboBox")) || !lstrcmpi(szClassName, WC_COMBOBOXEX))
+ else if (!lstrcmpi(szClassName, L"ComboLBox") || !lstrcmpi(szClassName, L"ComboBox") || !lstrcmpi(szClassName, WC_COMBOBOXEX))
return CTLTYPE_COMBO;
- else if (!lstrcmpi(szClassName, _T("ScrollBar"))) {
+ else if (!lstrcmpi(szClassName, L"ScrollBar")) {
style = GetWindowLongPtr(hwndCtl, GWL_STYLE);
if (style&SBS_SIZEBOX)
return CTLTYPE_SIZEGRIP;
@@ -116,7 +116,7 @@ int GetControlType(HWND hwndCtl) else if (!lstrcmpi(szClassName, WC_PAGESCROLLER))
return CTLTYPE_SCROLL;
else if (!lstrcmpi(szClassName, UPDOWN_CLASS)) {
- if (GetClassName((HWND)SendMessage(hwndCtl, UDM_GETBUDDY, 0, 0), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, _T("Edit")))
+ if (GetClassName((HWND)SendMessage(hwndCtl, UDM_GETBUDDY, 0, 0), szClassName, _countof(szClassName)) && !lstrcmpi(szClassName, L"Edit"))
return CTLTYPE_SPINEDIT;
return CTLTYPE_SCROLL;
}
@@ -136,7 +136,7 @@ int GetControlType(HWND hwndCtl) return CTLTYPE_STATUSBAR;
else if (!lstrcmpi(szClassName, (LPCWSTR)CLISTCONTROL_CLASS))
return CTLTYPE_CLC; // look at !! casting
- else if (!lstrcmpi(szClassName, WNDCLASS_HYPERLINK) || !lstrcmpi(szClassName, _T("SysLink")))
+ else if (!lstrcmpi(szClassName, WNDCLASS_HYPERLINK) || !lstrcmpi(szClassName, L"SysLink"))
return CTLTYPE_HYPERLINK;
else if (!lstrcmpi(szClassName, ANIMATE_CLASS))
return CTLTYPE_ANIMATION;
@@ -170,7 +170,7 @@ HWND GetControlDialog(HWND hwndCtl) if (GetClassLong(hwndCtl, GCW_ATOM) == 32770)
return hwndCtl;
if (GetClassName(hwndCtl, szClassName, _countof(szClassName)))
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return hwndCtl;
hwndCtl = GetParent(hwndCtl);
}
@@ -273,7 +273,7 @@ static BOOL CALLBACK CreateCtlIdEnumProc(HWND hwnd, LPARAM lParam) if (GetClassLong(hwnd, GCW_ATOM) == 32770) // class="#32770"
return TRUE;
if (GetClassName(hwnd, szClassName, _countof(szClassName)))
- if (!lstrcmpi(szClassName, _T("MDIClient")))
+ if (!lstrcmpi(szClassName, L"MDIClient"))
return TRUE;
if (GetWindowLongPtr(hwnd, GWL_ID) <= 0 || GetWindowLongPtr(hwnd, GWL_ID) == 0xFFFF)
ccid->id--;
@@ -304,7 +304,7 @@ int GetControlID(HWND hwndCtl) hwndCtl = hwndBuddy;
}
}
- else if (GetClassLong(hwndCtl, GCW_ATOM) == 32770 || !lstrcmpi(szClassName, _T("MDIClient")))
+ else if (GetClassLong(hwndCtl, GCW_ATOM) == 32770 || !lstrcmpi(szClassName, L"MDIClient"))
return 0; // ensure this is always unset
}
ccid.id = GetWindowLongPtr(hwndCtl, GWL_ID);
|