summaryrefslogtreecommitdiff
path: root/plugins/PasteIt
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-25 10:31:04 +0000
commit8ae3679aa1339ce9abee53adb69902bd6b7513dc (patch)
tree94ef8927e12043ed6dcc15e1e640d68a8add520e /plugins/PasteIt
parent1e273e28d89b5838e3d0f0cafac9676577cb71ce (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/PasteIt')
-rw-r--r--plugins/PasteIt/src/Options.cpp6
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp2
-rw-r--r--plugins/PasteIt/src/PasteToWeb.cpp2
-rw-r--r--plugins/PasteIt/src/PasteToWeb1.cpp20
-rw-r--r--plugins/PasteIt/src/PasteToWeb1.h2
-rw-r--r--plugins/PasteIt/src/PasteToWeb2.cpp36
-rw-r--r--plugins/PasteIt/src/PasteToWeb2.h2
7 files changed, 35 insertions, 35 deletions
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<std::string, std::string> 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<std::string, std::string> 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<PasteFormat> 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<std::string, std::string> headers;
headers["Content-Type"] = "text/xml";
- std::wstring content = _T("<?xml version=\"1.0\"?>\r\n<methodCall><methodName>create_paste</methodName><params><param><value>");
+ std::wstring content = L"<?xml version=\"1.0\"?>\r\n<methodCall><methodName>create_paste</methodName><params><param><value>";
if (fileName == L"")
{
content += format;
- content += _T("</value></param><param><value>");
+ content += L"</value></param><param><value>";
}
else
{
- content += _T("</value></param><param><value>");
+ content += L"</value></param><param><value>";
}
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("</value></param><param><value></value></param><param><value>");
+ content += L"</value></param><param><value></value></param><param><value>";
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("</value></param><param><value></value></param><param><value><double>1.5</double></value></param></params></methodCall>");
+ content += L"</value></param><param><value></value></param><param><value><double>1.5</double></value></param></params></methodCall>";
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<PasteFormat> PasteToWeb2::GetFormats()
std::map<std::string, std::string> headers;
headers["Content-Type"] = "text/xml";
- std::wstring content = _T("<?xml version=\"1.0\"?>\r\n<methodCall><methodName>types</methodName></methodCall>");
+ std::wstring content = L"<?xml version=\"1.0\"?>\r\n<methodCall><methodName>types</methodName></methodCall>";
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<PasteFormat> GetFormats();