From 8ae3679aa1339ce9abee53adb69902bd6b7513dc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jul 2016 10:31:04 +0000 Subject: hello, Unix. phase 1: removing _T() git-svn-id: http://svn.miranda-ng.org/main/trunk@17127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/PasteIt/src/Options.cpp | 6 +++--- plugins/PasteIt/src/PasteIt.cpp | 2 +- plugins/PasteIt/src/PasteToWeb.cpp | 2 +- plugins/PasteIt/src/PasteToWeb1.cpp | 20 ++++++++++---------- plugins/PasteIt/src/PasteToWeb1.h | 2 +- plugins/PasteIt/src/PasteToWeb2.cpp | 36 ++++++++++++++++++------------------ plugins/PasteIt/src/PasteToWeb2.h | 2 +- 7 files changed, 35 insertions(+), 35 deletions(-) (limited to 'plugins/PasteIt/src') diff --git a/plugins/PasteIt/src/Options.cpp b/plugins/PasteIt/src/Options.cpp index 24405b97de..61d4c27130 100644 --- a/plugins/PasteIt/src/Options.cpp +++ b/plugins/PasteIt/src/Options.cpp @@ -206,7 +206,7 @@ void GetPagesSettings(HWND hwndDlg, OptsPagesData* optsPagesData) } if (optsPagesData->webOptions[selected]->isPublicPaste) { if (IsDlgButtonChecked(hwndDlg, IDC_GUEST)) { - optsPagesData->webOptions[selected]->pastebinUserKey = _T(""); + optsPagesData->webOptions[selected]->pastebinUserKey = L""; } else { TCHAR buf[100]; @@ -646,7 +646,7 @@ void Options::InitCodepageCB(HWND hwndCB, unsigned int codepage) if (selCpIdx == -1) { TCHAR buf[10]; - mir_sntprintf(buf, _T("%d"), codepage); + mir_sntprintf(buf, L"%d", codepage); ComboBox_SetText(hwndCB, buf); } else { @@ -667,7 +667,7 @@ void Options::SetCodepageCB(HWND hwndCB, unsigned int codepage) if (selCpIdx == -1) { TCHAR buf[10]; - mir_sntprintf(buf, _T("%d"), codepage); + mir_sntprintf(buf, L"%d", codepage); ComboBox_SetText(hwndCB, buf); } else { diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index a9f1a47ece..d852b79f42 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -72,7 +72,7 @@ std::wstring GetFile() { TCHAR filter[512]; mir_tstrncpy(filter, TranslateT("All Files (*.*)"), _countof(filter)); - memcpy(filter + mir_tstrlen(filter), _T("\0*.*\0"), 6 * sizeof(TCHAR)); + memcpy(filter + mir_tstrlen(filter), L"\0*.*\0", 6 * sizeof(TCHAR)); TCHAR stzFilePath[1024]; stzFilePath[0] = 0; stzFilePath[1] = 0; diff --git a/plugins/PasteIt/src/PasteToWeb.cpp b/plugins/PasteIt/src/PasteToWeb.cpp index 6c5ad07296..8e0cecb447 100644 --- a/plugins/PasteIt/src/PasteToWeb.cpp +++ b/plugins/PasteIt/src/PasteToWeb.cpp @@ -148,7 +148,7 @@ void RecodeDlg(HWND hwndDlg) } else { - SetDlgItemText(hwndDlg, IDC_FILE_DATA, _T("")); + SetDlgItemText(hwndDlg, IDC_FILE_DATA, L""); } fromFileData->codepage = cp; diff --git a/plugins/PasteIt/src/PasteToWeb1.cpp b/plugins/PasteIt/src/PasteToWeb1.cpp index c301b00b6e..73b4b77667 100644 --- a/plugins/PasteIt/src/PasteToWeb1.cpp +++ b/plugins/PasteIt/src/PasteToWeb1.cpp @@ -267,18 +267,18 @@ void PasteToWeb1::SendToServer(std::wstring str, std::wstring fileName, std::wst { std::map headers; headers["Content-Type"] = "application/x-www-form-urlencoded"; - std::wstring content = _T("api_option=paste&api_paste_private="); - content += Options::instance->webOptions[pageIndex]->publicPaste ? _T("0") : _T("1"); - content += _T("&api_paste_expire_date="); - content += Options::instance->webOptions[pageIndex]->combo1.empty() ? _T("1M") : Options::instance->webOptions[pageIndex]->combo1; - content += _T("&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd&api_paste_format="); + std::wstring content = L"api_option=paste&api_paste_private="; + content += Options::instance->webOptions[pageIndex]->publicPaste ? L"0" : L"1"; + content += L"&api_paste_expire_date="; + content += Options::instance->webOptions[pageIndex]->combo1.empty() ? L"1M" : Options::instance->webOptions[pageIndex]->combo1; + content += L"&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd&api_paste_format="; content += format; if (!Options::instance->webOptions[pageIndex]->pastebinUserKey.empty()) { - content += _T("&api_user_key="); + content += L"&api_user_key="; content += Options::instance->webOptions[pageIndex]->pastebinUserKey; } - content += _T("&api_paste_code="); + content += L"&api_paste_code="; for (std::wstring::iterator it = str.begin(); it != str.end(); ++it) { if (*it == L'%') @@ -325,11 +325,11 @@ std::wstring PasteToWeb1::GetUserKey(std::wstring& user, std::wstring& password) { std::map headers; headers["Content-Type"] = "application/x-www-form-urlencoded"; - std::wstring content = _T("api_user_name="); + std::wstring content = L"api_user_name="; content += user; - content += _T("&api_user_password="); + content += L"&api_user_password="; content += password; - content += _T("&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd"); + content += L"&api_dev_key=dcba056bf9cc71729fdad76dddcb0dcd"; wchar_t* resCont = SendToWeb("http://pastebin.com/api/api_login.php", headers, content); std::wstring toRet; if (resCont != NULL) diff --git a/plugins/PasteIt/src/PasteToWeb1.h b/plugins/PasteIt/src/PasteToWeb1.h index b1611855d6..79c9f7dc06 100644 --- a/plugins/PasteIt/src/PasteToWeb1.h +++ b/plugins/PasteIt/src/PasteToWeb1.h @@ -30,7 +30,7 @@ public: virtual ~PasteToWeb1(); virtual TCHAR* GetName() { - return _T("pastebin.com"); + return L"pastebin.com"; } virtual void ConfigureSettings(); virtual std::list GetFormats(); diff --git a/plugins/PasteIt/src/PasteToWeb2.cpp b/plugins/PasteIt/src/PasteToWeb2.cpp index 36e168a922..f9645ee447 100644 --- a/plugins/PasteIt/src/PasteToWeb2.cpp +++ b/plugins/PasteIt/src/PasteToWeb2.cpp @@ -54,15 +54,15 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst { std::map headers; headers["Content-Type"] = "text/xml"; - std::wstring content = _T("\r\ncreate_paste"); + std::wstring content = L"\r\ncreate_paste"; if (fileName == L"") { content += format; - content += _T(""); + content += L""; } else { - content += _T(""); + content += L""; } for (std::wstring::iterator it = str.begin(); it != str.end(); ++it) { @@ -80,7 +80,7 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst } } - content += _T(""); + content += L""; if (fileName != L"") { for (std::wstring::iterator it = fileName.begin(); it != fileName.end(); ++it) @@ -99,25 +99,25 @@ void PasteToWeb2::SendToServer(std::wstring str, std::wstring fileName, std::wst } } } - content += _T("1.5"); + content += L"1.5"; wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content); error = TranslateT("Error during sending text to web page"); if (resCont != NULL) { - HXML hXml = xmlParseString(resCont, NULL, _T("methodResponse")); + HXML hXml = xmlParseString(resCont, NULL, L"methodResponse"); if (hXml != NULL) { - HXML node = xmlGetChildByPath(hXml, _T("params/param/value/array/data/value/int"), 0); - if (node != NULL && !mir_tstrcmp(xmlGetText(node), _T("1"))) + HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0); + if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1")) { - node = xmlGetChildByPath(hXml, _T("params/param/value/array/data"), 0); + node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0); if (node != NULL) { - node = xmlGetNthChild(node, _T("value"), 1); + node = xmlGetNthChild(node, L"value", 1); if (node != NULL) { - node = xmlGetChildByPath(node, _T("string"), 0); + node = xmlGetChildByPath(node, L"string", 0); if (node != NULL) { char* s = mir_t2a_cp(xmlGetText(node), CP_ACP); @@ -140,24 +140,24 @@ std::list PasteToWeb2::GetFormats() std::map headers; headers["Content-Type"] = "text/xml"; - std::wstring content = _T("\r\ntypes"); + std::wstring content = L"\r\ntypes"; wchar_t* resCont = SendToWeb("http://wklej.to/api/", headers, content); if (resCont != NULL) { - HXML hXml = xmlParseString(resCont, NULL, _T("methodResponse")); + HXML hXml = xmlParseString(resCont, NULL, L"methodResponse"); if (hXml != NULL) { - HXML node = xmlGetChildByPath(hXml, _T("params/param/value/array/data/value/int"), 0); - if (node != NULL && !mir_tstrcmp(xmlGetText(node), _T("1"))) + HXML node = xmlGetChildByPath(hXml, L"params/param/value/array/data/value/int", 0); + if (node != NULL && !mir_tstrcmp(xmlGetText(node), L"1")) { - node = xmlGetChildByPath(hXml, _T("params/param/value/array/data"), 0); + node = xmlGetChildByPath(hXml, L"params/param/value/array/data", 0); if (node != NULL) { - node = xmlGetNthChild(node, _T("value"), 1); + node = xmlGetNthChild(node, L"value", 1); if (node != NULL) { - node = xmlGetChildByPath(node, _T("string"), 0); + node = xmlGetChildByPath(node, L"string", 0); if (node != NULL) { std::wstring str = xmlGetText(node); diff --git a/plugins/PasteIt/src/PasteToWeb2.h b/plugins/PasteIt/src/PasteToWeb2.h index 364c6eb4e4..6bbee7b455 100644 --- a/plugins/PasteIt/src/PasteToWeb2.h +++ b/plugins/PasteIt/src/PasteToWeb2.h @@ -29,7 +29,7 @@ public: virtual ~PasteToWeb2(); virtual TCHAR* GetName() { - return _T("wklej.to"); + return L"wklej.to"; } virtual void ConfigureSettings(); virtual std::list GetFormats(); -- cgit v1.2.3