summaryrefslogtreecommitdiff
path: root/plugins/IEView
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/IEView')
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp2
-rw-r--r--plugins/IEView/src/Options.cpp24
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp30
-rw-r--r--plugins/IEView/src/external_funcs.cpp14
-rw-r--r--plugins/IEView/src/ieview_main.cpp2
5 files changed, 36 insertions, 36 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index 24d39ed408..c43c1dc415 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -193,7 +193,7 @@ void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut)
wchar_t* HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
{
- TCHAR *str = Contact_GetInfo(CNF_DISPLAY, hContact, szProto);
+ wchar_t *str = Contact_GetInfo(CNF_DISPLAY, hContact, szProto);
if (str != NULL)
return str;
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp
index 94495a434c..f99da29479 100644
--- a/plugins/IEView/src/Options.cpp
+++ b/plugins/IEView/src/Options.cpp
@@ -38,14 +38,14 @@ struct
{
DLGPROC dlgProc;
DWORD dlgId;
- TCHAR *tabName;
+ wchar_t *tabName;
}
static tabPages[] =
{
- { IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, LPGENT("General") },
- { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Message Log") },
- { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("Group chats") },
- { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENT("History") }
+ { IEViewGeneralOptDlgProc, IDD_GENERAL_OPTIONS, LPGENW("General") },
+ { IEViewSRMMOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Message Log") },
+ { IEViewGroupChatsOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("Group chats") },
+ { IEViewHistoryOptDlgProc, IDD_SRMM_OPTIONS, LPGENW("History") }
};
static LPARAM GetItemParam(HWND hwndTreeView, HTREEITEM hItem)
@@ -437,20 +437,20 @@ int IEViewOptInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInstance;
- odp.ptszGroup = LPGENT("Message sessions");
- odp.ptszTitle = LPGENT("IEView");
+ odp.pwszGroup = LPGENW("Message sessions");
+ odp.pwszTitle = LPGENW("IEView");
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[0].dlgId);
odp.pfnDlgProc = tabPages[0].dlgProc;
- odp.ptszTab = tabPages[0].tabName;
+ odp.pwszTab = tabPages[0].tabName;
Options_AddPage(wParam, &odp);
- odp.ptszGroup = LPGENT("Skins");
- odp.ptszTitle = LPGENT("IEView");
+ odp.pwszGroup = LPGENW("Skins");
+ odp.pwszTitle = LPGENW("IEView");
for (size_t i = 1; i < _countof(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
- odp.ptszTab = tabPages[i].tabName;
+ odp.pwszTab = tabPages[i].tabName;
Options_AddPage(wParam, &odp);
}
return 0;
@@ -509,7 +509,7 @@ static INT_PTR CALLBACK IEViewGeneralOptDlgProc(HWND hwndDlg, UINT msg, WPARAM w
EnableWindow(GetDlgItem(hwndDlg, IDC_SMILEYS_IN_NAMES), Options::isSmileyAdd());
EnableWindow(GetDlgItem(hwndDlg, IDC_EMBED_SIZE), IsDlgButtonChecked(hwndDlg, IDC_ENABLE_EMBED));
{
- TCHAR* size[] = { L"320 x 205", L"480 x 385", L"560 x 349", L"640 x 390" };
+ wchar_t* size[] = { L"320 x 205", L"480 x 385", L"560 x 349", L"640 x 390" };
for (int i = 0; i < _countof(size); ++i) {
int item = SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_ADDSTRING, 0, (LPARAM)TranslateTS(size[i]));
SendDlgItemMessage(hwndDlg, IDC_EMBED_SIZE, CB_SETITEMDATA, item, 0);
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 49ee57bc83..c0712adff6 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -35,8 +35,8 @@ TemplateHTMLBuilder::~TemplateHTMLBuilder()
char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
{
DBVARIANT dbv;
- TCHAR tmpPath[MAX_PATH];
- TCHAR *result = NULL;
+ wchar_t tmpPath[MAX_PATH];
+ wchar_t *result = NULL;
if (Options::getAvatarServiceFlags() == Options::AVATARSERVICE_PRESENT) {
avatarCacheEntry *ace;
@@ -54,11 +54,11 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto)
}
if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
if (mir_tstrlen(dbv.ptszVal) > 0) {
- //TCHAR *ext = _tcsrchr(dbv.ptszVal, '.');
+ //wchar_t *ext = wcsrchr(dbv.ptszVal, '.');
if (result == NULL) {
/* relative -> absolute */
mir_tstrcpy(tmpPath, dbv.ptszVal);
- if (_tcsncmp(tmpPath, L"http://", 7))
+ if (wcsncmp(tmpPath, L"http://", 7))
PathToAbsoluteT(dbv.ptszVal, tmpPath);
result = tmpPath;
}
@@ -83,7 +83,7 @@ int TemplateHTMLBuilder::getFlags(ProtocolSettings * protoSettings)
char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mode)
{
static char szResult[512]; szResult[0] = '\0';
- TCHAR str[300];
+ wchar_t str[300];
if (mode) // time
TimeZone_ToStringT(check, (dwFlags & Options::LOG_SHOW_SECONDS) ? L"s" : L"t", str, _countof(str));
@@ -96,9 +96,9 @@ char *TemplateHTMLBuilder::timestampToString(DWORD dwFlags, time_t check, int mo
tm_today.tm_hour = tm_today.tm_min = tm_today.tm_sec = 0;
today = mktime(&tm_today);
if (dwFlags & Options::LOG_RELATIVE_DATE && check >= today)
- _tcsncpy(str, TranslateT("Today"), _countof(str));
+ wcsncpy(str, TranslateT("Today"), _countof(str));
else if (dwFlags & Options::LOG_RELATIVE_DATE && check > (today - 86400))
- _tcsncpy(str, TranslateT("Yesterday"), _countof(str));
+ wcsncpy(str, TranslateT("Yesterday"), _countof(str));
else
TimeZone_ToStringT(check, (dwFlags & Options::LOG_LONG_DATE) ? L"D" : L"d", str, _countof(str));
}
@@ -152,13 +152,13 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
szNameIn = mir_strdup("&nbsp;");
}
mir_snprintf(tempStr, "%snoavatar.png", tempBase);
- TCHAR szNoAvatarPath[MAX_PATH];
- _tcsncpy_s(szNoAvatarPath, _A2T(protoSettings->getSRMMTemplateFilename()), _TRUNCATE);
- TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
+ wchar_t szNoAvatarPath[MAX_PATH];
+ wcsncpy_s(szNoAvatarPath, _A2T(protoSettings->getSRMMTemplateFilename()), _TRUNCATE);
+ wchar_t *szNoAvatarPathTmp = wcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
- if (_taccess(szNoAvatarPath, 0) == -1)
+ if (_waccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
mir_snprintf(tempStr, "%snoavatar.png", tempBase);
@@ -321,13 +321,13 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
szNameIn = mir_strdup("&nbsp;");
}
- TCHAR szNoAvatarPath[MAX_PATH];
- _tcsncpy_s(szNoAvatarPath, _A2T(protoSettings->getSRMMTemplateFilename()), _TRUNCATE);
- TCHAR *szNoAvatarPathTmp = _tcsrchr(szNoAvatarPath, '\\');
+ wchar_t szNoAvatarPath[MAX_PATH];
+ wcsncpy_s(szNoAvatarPath, _A2T(protoSettings->getSRMMTemplateFilename()), _TRUNCATE);
+ wchar_t *szNoAvatarPathTmp = wcsrchr(szNoAvatarPath, '\\');
if (szNoAvatarPathTmp != NULL)
*szNoAvatarPathTmp = 0;
mir_tstrcat(szNoAvatarPath, L"\\noavatar.png");
- if (_taccess(szNoAvatarPath, 0) == -1)
+ if (_waccess(szNoAvatarPath, 0) == -1)
mir_snprintf(tempStr, "%snoavatar.jpg", tempBase);
else
mir_snprintf(tempStr, "%snoavatar.png", tempBase);
diff --git a/plugins/IEView/src/external_funcs.cpp b/plugins/IEView/src/external_funcs.cpp
index d5c75e5e89..3ca5d06151 100644
--- a/plugins/IEView/src/external_funcs.cpp
+++ b/plugins/IEView/src/external_funcs.cpp
@@ -40,7 +40,7 @@ namespace External
WPARAM wParam = Var_To<WPARAM>(pDispParams->rgvarg[1], wType);
LPARAM lParam = Var_To<LPARAM>(pDispParams->rgvarg[0], lType);
- INT_PTR res = CallService(_T2A((TCHAR*)szName), wParam, lParam);
+ INT_PTR res = CallService(_T2A((wchar_t*)szName), wParam, lParam);
if (wType == 'A' || wType == 'U') mir_free((void*)wParam);
if (lType == 'A' || lType == 'U') mir_free((void*)lParam);
@@ -67,7 +67,7 @@ namespace External
WPARAM wParam = Var_To<WPARAM>(pDispParams->rgvarg[1], wType);
LPARAM lParam = Var_To<LPARAM>(pDispParams->rgvarg[0], lType);
- INT_PTR res = ProtoChainSend(hContact, _T2A((TCHAR*)szName), wParam, lParam);
+ INT_PTR res = ProtoChainSend(hContact, _T2A((wchar_t*)szName), wParam, lParam);
if (wType == 'A' || wType == 'U') mir_free((void*)wParam);
if (lType == 'A' || lType == 'U') mir_free((void*)lParam);
@@ -101,7 +101,7 @@ namespace External
DBVARIANT dbv = { 0 };
- if (db_get(hContact, _T2A((TCHAR*)szModule), _T2A((TCHAR*)szSetting), &dbv))
+ if (db_get(hContact, _T2A((wchar_t*)szModule), _T2A((wchar_t*)szSetting), &dbv))
return S_OK;
if (pVarResult != nullptr)
@@ -175,7 +175,7 @@ namespace External
return E_INVALIDARG;
}
- INT_PTR res = ::db_set(hContact, _T2A((TCHAR*)szModule), _T2A((TCHAR*)szSetting), &dbv);
+ INT_PTR res = ::db_set(hContact, _T2A((wchar_t*)szModule), _T2A((wchar_t*)szSetting), &dbv);
if (pVarResult != nullptr)
{
@@ -210,14 +210,14 @@ namespace External
if (OpenClipboard(NULL))
{
EmptyClipboard();
- size_t size = sizeof(TCHAR)* (mir_wstrlen(data) + 1);
+ size_t size = sizeof(wchar_t)* (mir_wstrlen(data) + 1);
HGLOBAL hClipboardData = GlobalAlloc(0, size);
if (hClipboardData)
{
- TCHAR *pchData = (TCHAR*)GlobalLock(hClipboardData);
+ wchar_t *pchData = (wchar_t*)GlobalLock(hClipboardData);
if (pchData)
{
- memcpy(pchData, (TCHAR*)data, size);
+ memcpy(pchData, (wchar_t*)data, size);
GlobalUnlock(hClipboardData);
SetClipboardData(CF_UNICODETEXT, hClipboardData);
}
diff --git a/plugins/IEView/src/ieview_main.cpp b/plugins/IEView/src/ieview_main.cpp
index 852bc3ccaf..ecf69d2561 100644
--- a/plugins/IEView/src/ieview_main.cpp
+++ b/plugins/IEView/src/ieview_main.cpp
@@ -60,7 +60,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load(void)
{
int wdsize = GetCurrentDirectory(0, NULL);
- TCHAR *workingDir = new TCHAR[wdsize];
+ wchar_t *workingDir = new wchar_t[wdsize];
GetCurrentDirectory(wdsize, workingDir);
Utils::convertPath(workingDir);
workingDirUtf8 = mir_utf8encodeT(workingDir);