summaryrefslogtreecommitdiff
path: root/plugins/IEHistory
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /plugins/IEHistory
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEHistory')
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp4
-rw-r--r--plugins/IEHistory/src/dlgHandlers.cpp12
-rw-r--r--plugins/IEHistory/src/events.cpp2
-rw-r--r--plugins/IEHistory/src/utils.cpp12
-rw-r--r--plugins/IEHistory/src/utils.h2
5 files changed, 16 insertions, 16 deletions
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 6f0e9667ea..5a0460db92 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -77,7 +77,7 @@ extern "C" int __declspec(dllexport) Load(void)
/// menu items
CMenuItem mi;
SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
- mi.name.t = LPGENT("View &history");
+ mi.name.w = LPGENW("View &history");
mi.flags = CMIF_TCHAR;
mi.position = 1000090000;
mi.hIcolibItem = hIcon;
@@ -86,7 +86,7 @@ extern "C" int __declspec(dllexport) Load(void)
/// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^
SET_UID(mi, 0xfcb4bb2a, 0xd4d8, 0x48ab, 0x94, 0xcc, 0x5b, 0xe9, 0x8d, 0x53, 0x3e, 0xf1);
- mi.name.t = LPGENT("&System History");
+ mi.name.w = LPGENW("&System History");
Menu_AddMainMenuItem(&mi);
HookEvents();
diff --git a/plugins/IEHistory/src/dlgHandlers.cpp b/plugins/IEHistory/src/dlgHandlers.cpp
index 836599dd8e..a56e975015 100644
--- a/plugins/IEHistory/src/dlgHandlers.cpp
+++ b/plugins/IEHistory/src/dlgHandlers.cpp
@@ -69,8 +69,8 @@ void LoadName(HWND hWnd)
SetWindowText(hWnd, TranslateT("System History"));
return;
}
- TCHAR *szOther = GetContactName(data->contact);
- TCHAR buffer[1024];
+ wchar_t *szOther = GetContactName(data->contact);
+ wchar_t buffer[1024];
sntprintf(buffer, 1024, L"'%s' - IEHistory", szOther);
SetWindowText(hWnd, buffer);
mir_free(szOther);
@@ -227,7 +227,7 @@ int DoLoadEvents(HWND hWnd, HistoryWindowData *data, IEVIEWEVENT ieEvent)
CallService(MS_IEVIEW_EVENT, 0, (LPARAM)&ieEvent);
ScrollToBottom(hWnd);
- TCHAR buffer[256];
+ wchar_t buffer[256];
itot(data->index + 1, buffer, 10);
SendDlgItemMessage(hWnd, IDC_STATUSBAR, SB_SETTEXT, 0 | SBT_POPOUT, (LPARAM)buffer);
itot(data->index + ieEvent.count, buffer, 10);
@@ -501,7 +501,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
CheckDlgButton(hWnd, IDC_SHOW_LAST_FIRST, db_get_b(NULL, ModuleName, "ShowLastPageFirst", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hWnd, IDC_LOAD_BACKGROUND, db_get_b(NULL, ModuleName, "UseWorkerThread", 0) ? BST_CHECKED : BST_UNCHECKED);
- TCHAR buffer[40];
+ wchar_t buffer[40];
_itot_s(count, buffer, 10);
SetDlgItemText(hWnd, IDC_EVENTS_COUNT, buffer);
}
@@ -539,7 +539,7 @@ INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
if (IsDlgButtonChecked(hWnd, IDC_LOAD_ALL))
count = 0;
else {
- TCHAR buffer[1024];
+ wchar_t buffer[1024];
GetDlgItemText(hWnd, IDC_EVENTS_COUNT, buffer, _countof(buffer));
count = _tstol(buffer);
count = (count < 0) ? 0 : count;
@@ -636,7 +636,7 @@ INT_PTR CALLBACK SearchDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
data->hLastFoundEvent = GetNeededEvent(data->hLastFoundEvent, 1, direction);
if (type == SEARCH_TEXT) { //text search
- TCHAR text[2048]; //TODO buffer overrun
+ wchar_t text[2048]; //TODO buffer overrun
GetDlgItemText(hWnd, IDC_SEARCH_TEXT, text, _countof(text));
searchResult = SearchHistory(data->contact, data->hLastFoundEvent, text, direction, type);
}
diff --git a/plugins/IEHistory/src/events.cpp b/plugins/IEHistory/src/events.cpp
index f9cc9c4c56..67edd36a56 100644
--- a/plugins/IEHistory/src/events.cpp
+++ b/plugins/IEHistory/src/events.cpp
@@ -39,7 +39,7 @@ int OnOptionsInitialize(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.position = 100000000;
- odp.ptszTitle = LPGENT("History");
+ odp.pwszTitle = LPGENW("History");
odp.pfnDlgProc = OptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_HISTORY);
odp.hInstance = hInstance;
diff --git a/plugins/IEHistory/src/utils.cpp b/plugins/IEHistory/src/utils.cpp
index d34557b094..090033c533 100644
--- a/plugins/IEHistory/src/utils.cpp
+++ b/plugins/IEHistory/src/utils.cpp
@@ -78,10 +78,10 @@ int Info(char *title, char *format, ...)
returns the name of a contact
*/
-TCHAR* GetContactName(MCONTACT contact)
+wchar_t* GetContactName(MCONTACT contact)
{
ptrT name(Contact_GetInfo(CNF_DISPLAY, contact));
- return (name) ? _tcsdup(name) : NULL;
+ return (name) ? wcsdup(name) : NULL;
}
/*
@@ -211,7 +211,7 @@ SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchDat
int index = 0;
MEVENT hEvent = hFirstEvent;
void *buffer = NULL;
- TCHAR *search;
+ wchar_t *search;
bool found = false;
int oldSize, newSize;
oldSize = newSize = 0;
@@ -223,7 +223,7 @@ SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchDat
newSize = db_event_getBlobSize(hEvent);
if (newSize > oldSize)
{
- buffer = (TCHAR *)realloc(buffer, newSize);
+ buffer = (wchar_t *)realloc(buffer, newSize);
oldSize = newSize;
}
dbEvent.pBlob = (PBYTE)buffer;
@@ -247,8 +247,8 @@ SearchResult SearchHistory(MCONTACT contact, MEVENT hFirstEvent, void *searchDat
#else
search = (char *) buffer;
#endif
- TCHAR *data = (TCHAR *)searchData;
- TCHAR *tmp = _tcsstr(search, data);
+ wchar_t *data = (wchar_t *)searchData;
+ wchar_t *tmp = wcsstr(search, data);
if (tmp)
{
found = true;
diff --git a/plugins/IEHistory/src/utils.h b/plugins/IEHistory/src/utils.h
index 7cdf8186f6..6cb2b71370 100644
--- a/plugins/IEHistory/src/utils.h
+++ b/plugins/IEHistory/src/utils.h
@@ -68,7 +68,7 @@ int Log(char *format, ...);
void ScreenToClient(HWND hWnd, LPRECT rect);
int Info(char *title, char *format, ...);
-TCHAR *GetContactName(MCONTACT contact);
+wchar_t *GetContactName(MCONTACT contact);
void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);