summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-29 12:36:34 +0000
commit428bf0cbd77813a43094cb5c984436deff251936 (patch)
treed7dfa8971153d53a849e45c942be97fe5b90b7ec /plugins/NewsAggregator
parent82ef17ca5286f58ae7af604fb9518e8dc496b7c3 (diff)
no more TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17143 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r--plugins/NewsAggregator/Src/Authentication.cpp10
-rw-r--r--plugins/NewsAggregator/Src/CheckFeed.cpp76
-rw-r--r--plugins/NewsAggregator/Src/ExportImport.cpp24
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp2
-rw-r--r--plugins/NewsAggregator/Src/NewsAggregator.cpp6
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp44
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp4
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp8
-rw-r--r--plugins/NewsAggregator/Src/stdafx.h2
9 files changed, 88 insertions, 88 deletions
diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp
index 8b587f8779..62cd91361f 100644
--- a/plugins/NewsAggregator/Src/Authentication.cpp
+++ b/plugins/NewsAggregator/Src/Authentication.cpp
@@ -23,8 +23,8 @@ void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg)
{
wchar_t *tlogin = NULL, *tpass = NULL;
if (hContact && db_get_b(hContact, MODULE, "UseAuth", 0)) {
- tlogin = db_get_tsa(hContact, MODULE, "Login");
- tpass = db_get_tsa(hContact, MODULE, "Password");
+ tlogin = db_get_wsa(hContact, MODULE, "Login");
+ tpass = db_get_wsa(hContact, MODULE, "Password");
}
else if (hwndDlg && IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
wchar_t buf[MAX_PATH] = {0};
@@ -64,13 +64,13 @@ INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
}
else if (SelItem.hContact) {
- wchar_t *ptszNick = db_get_tsa(SelItem.hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(SelItem.hContact, MODULE, "Nick");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDNAME, ptszNick);
mir_free(ptszNick);
}
else {
- wchar_t *ptszURL = db_get_tsa(SelItem.hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(SelItem.hContact, MODULE, "URL");
if (ptszURL) {
SetDlgItemText(hwndDlg, IDC_FEEDNAME, ptszURL);
mir_free(ptszURL);
@@ -104,7 +104,7 @@ INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
}
else if (SelItem.hContact) {
db_set_b(SelItem.hContact, MODULE, "UseAuth", 1);
- db_set_ts(SelItem.hContact, MODULE, "Login", username);
+ db_set_ws(SelItem.hContact, MODULE, "Login", username);
db_set_s(SelItem.hContact, MODULE, "Password", passw);
}
EndDialog(hwndDlg, IDOK);
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp
index 8586d20477..96d80c6298 100644
--- a/plugins/NewsAggregator/Src/CheckFeed.cpp
+++ b/plugins/NewsAggregator/Src/CheckFeed.cpp
@@ -98,9 +98,9 @@ LPCTSTR CheckFeed(wchar_t *tszURL, HWND hwndDlg)
return NULL;
}
-static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMString &descr, CMString &author, CMString &comments, CMString &guid, CMString &category, time_t stamp)
+static void XmlToMsg(MCONTACT hContact, CMStringW &title, CMStringW &link, CMStringW &descr, CMStringW &author, CMStringW &comments, CMStringW &guid, CMStringW &category, time_t stamp)
{
- CMString message = db_get_tsa(hContact, MODULE, "MsgFormat");
+ CMStringW message = db_get_wsa(hContact, MODULE, "MsgFormat");
if (!message)
message = TAGSDEFAULT;
@@ -183,7 +183,7 @@ void CheckCurrentFeed(MCONTACT hContact)
if (!db_get_b(hContact, MODULE, "CheckState", 1) != 0)
return;
- wchar_t *szURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *szURL = db_get_wsa(hContact, MODULE, "URL");
if (szURL == NULL)
return;
@@ -202,7 +202,7 @@ void CheckCurrentFeed(MCONTACT hContact)
mir_free(tszData);
mir_free(szData);
- CMString szValue;
+ CMStringW szValue;
if (hXml != NULL) {
LPCTSTR codepage = NULL;
int childcount = 0;
@@ -230,13 +230,13 @@ void CheckCurrentFeed(MCONTACT hContact)
if (!mir_wstrcmpi(szAttrName, L"version")) {
wchar_t ver[MAX_PATH];
mir_snwprintf(ver, L"RSS %s", xmlGetAttrValue(node, szAttrName));
- db_set_ts(hContact, MODULE, "MirVer", ver);
+ db_set_ws(hContact, MODULE, "MirVer", ver);
break;
}
}
}
else if (isAtom)
- db_set_ts(hContact, MODULE, "MirVer", L"RSS 1.0");
+ db_set_ws(hContact, MODULE, "MirVer", L"RSS 1.0");
HXML chan = xmlGetChild(node, 0);
for (int j = 0; j < xmlGetChildCount(chan); j++) {
@@ -252,7 +252,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"link")) {
LPCTSTR szChildText = NULL;
@@ -264,7 +264,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Homepage", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"description")) {
LPCTSTR szChildText = NULL;
@@ -277,8 +277,8 @@ void CheckCurrentFeed(MCONTACT hContact)
szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
- db_set_ts(hContact, MODULE, "About", szValue);
- db_set_ts(hContact, "CList", "StatusMsg", szValue);
+ db_set_ws(hContact, MODULE, "About", szValue);
+ db_set_ws(hContact, "CList", "StatusMsg", szValue);
}
}
else if (!mir_wstrcmpi(childName, L"language")) {
@@ -291,7 +291,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"managingEditor")) {
LPCTSTR szChildText = NULL;
@@ -303,7 +303,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "e-mail", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"category")) {
LPCTSTR szChildText = NULL;
@@ -315,7 +315,7 @@ void CheckCurrentFeed(MCONTACT hContact)
else
szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(childName, L"copyright")) {
LPCTSTR szChildText = NULL;
@@ -334,22 +334,22 @@ void CheckCurrentFeed(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
- wchar_t *szNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *szNick = db_get_wsa(hContact, MODULE, "Nick");
if (szNick) {
wchar_t *ext = wcsrchr((wchar_t *)url, '.') + 1;
ai.format = ProtoGetAvatarFormat(url);
- CMString filename = szNick;
+ CMStringW filename = szNick;
filename.Replace(L"/", L"_");
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename.c_str(), ext);
- CreateDirectoryTreeT(tszRoot);
+ CreateDirectoryTreeW(tszRoot);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -380,7 +380,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(childName, L"item")) {
- CMString title, link, descr, author, comments, guid, category;
+ CMStringW title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
@@ -426,14 +426,14 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(szNodeName, L"feed")) {
- db_set_ts(hContact, MODULE, "MirVer", L"Atom 3");
+ db_set_ws(hContact, MODULE, "MirVer", L"Atom 3");
for (int j = 0; j < xmlGetChildCount(node); j++) {
HXML child = xmlGetChild(node, j);
LPCTSTR szChildName = xmlGetName(child);
if (!mir_wstrcmpi(szChildName, L"title")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "FirstName", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"link")) {
for (int x = 0; x < xmlGetAttrCount(child); x++) {
@@ -442,27 +442,27 @@ void CheckCurrentFeed(MCONTACT hContact)
break;
if (!mir_wstrcmpi(xmlGetAttrName(child, x), L"href"))
- db_set_ts(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
+ db_set_ws(hContact, MODULE, "Homepage", xmlGetAttrValue(child, xmlGetAttrName(child, x)));
}
}
else if (!mir_wstrcmpi(szChildName, L"subtitle")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText) {
ClearText(szValue, szChildText);
- db_set_ts(hContact, MODULE, "About", szValue);
- db_set_ts(hContact, "CList", "StatusMsg", szValue);
+ db_set_ws(hContact, MODULE, "About", szValue);
+ db_set_ws(hContact, "CList", "StatusMsg", szValue);
}
}
else if (!mir_wstrcmpi(szChildName, L"language")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Language1", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"author")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML authorval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(authorval), L"email")) {
- db_set_ts(hContact, MODULE, "e-mail", xmlGetText(authorval));
+ db_set_ws(hContact, MODULE, "e-mail", xmlGetText(authorval));
break;
}
}
@@ -470,16 +470,16 @@ void CheckCurrentFeed(MCONTACT hContact)
else if (!mir_wstrcmpi(szChildName, L"category")) {
LPCTSTR szChildText = xmlGetText(child);
if (szChildText)
- db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
+ db_set_ws(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText));
}
else if (!mir_wstrcmpi(szChildName, L"icon")) {
for (int x = 0; x < xmlGetChildCount(child); x++) {
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
- ptrW szNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW szNick(db_get_wsa(hContact, MODULE, "Nick"));
if (szNick) {
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
@@ -489,7 +489,7 @@ void CheckCurrentFeed(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -513,7 +513,7 @@ void CheckCurrentFeed(MCONTACT hContact)
}
}
else if (!mir_wstrcmpi(szChildName, L"entry")) {
- CMString title, link, descr, author, comments, guid, category;
+ CMStringW title, link, descr, author, comments, guid, category;
time_t stamp = 0;
for (int z = 0; z < xmlGetChildCount(child); z++) {
HXML itemval = xmlGetChild(child, z);
@@ -587,7 +587,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
if (!db_get_b(hContact, MODULE, "CheckState", 1))
return;
- wchar_t *szURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *szURL = db_get_wsa(hContact, MODULE, "URL");
if (szURL == NULL)
return;
@@ -621,12 +621,12 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
- wchar_t *szNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *szNick = db_get_wsa(hContact, MODULE, "Nick");
if (szNick) {
wchar_t *ext = wcsrchr((wchar_t *)url, '.') + 1;
ai.format = ProtoGetAvatarFormat(ext);
@@ -634,7 +634,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
@@ -654,9 +654,9 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
HXML imageval = xmlGetChild(child, x);
if (!mir_wstrcmpi(xmlGetName(imageval), L"url")) {
LPCTSTR url = xmlGetText(imageval);
- db_set_ts(hContact, MODULE, "ImageURL", url);
+ db_set_ws(hContact, MODULE, "ImageURL", url);
- ptrW szNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW szNick(db_get_wsa(hContact, MODULE, "Nick"));
if (szNick) {
PROTO_AVATAR_INFORMATION ai = { 0 };
ai.hContact = hContact;
@@ -667,7 +667,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact)
wchar_t *filename = szNick;
mir_snwprintf(ai.filename, L"%s\\%s.%s", tszRoot, filename, ext);
if (DownloadFile(url, ai.filename)) {
- db_set_ts(hContact, MODULE, "ImagePath", ai.filename);
+ db_set_ws(hContact, MODULE, "ImagePath", ai.filename);
ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, (HANDLE)&ai, NULL);
}
else ProtoBroadcastAck(MODULE, hContact, ACKTYPE_AVATAR, ACKRESULT_FAILED, (HANDLE)&ai, NULL);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp
index e1a5b18e85..03a553b9d9 100644
--- a/plugins/NewsAggregator/Src/ExportImport.cpp
+++ b/plugins/NewsAggregator/Src/ExportImport.cpp
@@ -151,15 +151,15 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
Proto_AddToContact(hContact, MODULE);
- db_set_ts(hContact, MODULE, "Nick", text);
- db_set_ts(hContact, MODULE, "URL", url);
- db_set_ts(hContact, MODULE, "Homepage", siteurl);
+ db_set_ws(hContact, MODULE, "Nick", text);
+ db_set_ws(hContact, MODULE, "URL", url);
+ db_set_ws(hContact, MODULE, "Homepage", siteurl);
db_set_b(hContact, MODULE, "CheckState", 1);
db_set_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME);
- db_set_ts(hContact, MODULE, "MsgFormat", TAGSDEFAULT);
+ db_set_ws(hContact, MODULE, "MsgFormat", TAGSDEFAULT);
db_set_w(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0));
if (ptszGroup) {
- db_set_ts(hContact, "CList", "Group", ptszGroup);
+ db_set_ws(hContact, "CList", "Group", ptszGroup);
Clist_GroupCreate(0, ptszGroup);
}
if (isGroupUTF)
@@ -209,7 +209,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDC_BROWSEIMPORTFILE:
{
wchar_t FileName[MAX_PATH];
- VARST tszMirDir(L"%miranda_path%");
+ VARSW tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
@@ -452,7 +452,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TranslateDialogDefault(hwndDlg);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ExportDlg");
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- wchar_t *message = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *message = db_get_wsa(hContact, MODULE, "Nick");
if (message != NULL) {
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)message);
mir_free(message);
@@ -472,7 +472,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case IDOK:
{
wchar_t FileName[MAX_PATH];
- VARST tszMirDir(L"%miranda_path%");
+ VARSW tszMirDir(L"%miranda_path%");
OPENFILENAME ofn = {0};
ofn.lStructSize = sizeof(ofn);
@@ -501,10 +501,10 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage(FeedsExportList, LB_GETTEXT, (WPARAM)i, (LPARAM)item);
MCONTACT hContact = GetContactByNick(item);
wchar_t
- *title = db_get_tsa(hContact, MODULE, "Nick"),
- *url = db_get_tsa(hContact, MODULE, "URL"),
- *siteurl = db_get_tsa(hContact, MODULE, "Homepage"),
- *group = db_get_tsa(hContact, "CList", "Group");
+ *title = db_get_wsa(hContact, MODULE, "Nick"),
+ *url = db_get_wsa(hContact, MODULE, "URL"),
+ *siteurl = db_get_wsa(hContact, MODULE, "Homepage"),
+ *group = db_get_wsa(hContact, "CList", "Group");
HXML elem = header;
if (group)
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index 44aaf21532..76cb73248a 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -24,7 +24,7 @@ HGENMENU hService2[7];
void InitMenu()
{
CMenuItem mi;
- mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
+ mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("News Aggregator"), 500099000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D9733E4F-1946-4390-8EB3-591E8687222E");
diff --git a/plugins/NewsAggregator/Src/NewsAggregator.cpp b/plugins/NewsAggregator/Src/NewsAggregator.cpp
index 8d040fdcc0..329b921a95 100644
--- a/plugins/NewsAggregator/Src/NewsAggregator.cpp
+++ b/plugins/NewsAggregator/Src/NewsAggregator.cpp
@@ -90,10 +90,10 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_NEWSAGGREGATOR_ENABLED, EnableDisable);
HOTKEYDESC hkd = { sizeof(hkd) };
- hkd.dwFlags = HKD_TCHAR;
+ hkd.dwFlags = HKD_UNICODE;
hkd.pszName = "NewsAggregator/CheckAllFeeds";
- hkd.ptszDescription = LPGENW("Check All Feeds");
- hkd.ptszSection = LPGENW("News Aggregator");
+ hkd.pwszDescription = LPGENW("Check All Feeds");
+ hkd.pwszSection = LPGENW("News Aggregator");
hkd.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL+HKCOMB_A, 'O') | HKF_MIRANDA_LOCAL;
Hotkey_Register(&hkd);
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index fb3deb5320..5079444792 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -56,20 +56,20 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
Proto_AddToContact(hContact, MODULE);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(hContact, MODULE, "Nick", str);
+ db_set_ws(hContact, MODULE, "Nick", str);
HWND hwndList = (HWND)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(hContact, MODULE, "URL", str);
+ db_set_ws(hContact, MODULE, "URL", str);
db_set_b(hContact, MODULE, "CheckState", 1);
db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(hContact, MODULE, "MsgFormat", str);
+ db_set_ws(hContact, MODULE, "MsgFormat", str);
db_set_w(hContact, MODULE, "Status", CallProtoService(MODULE, PS_GETSTATUS, 0, 0));
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(hContact, MODULE, "Login", str);
+ db_set_ws(hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(hContact, MODULE, "Password", passw);
}
@@ -152,11 +152,11 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- ptrW dbNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if ((dbNick == NULL) || (mir_wstrcmp(dbNick, SelItem.nick) != 0))
continue;
- ptrW dbURL(db_get_tsa(hContact, MODULE, "URL"));
+ ptrW dbURL(db_get_wsa(hContact, MODULE, "URL"));
if ((dbURL == NULL) || (mir_wstrcmp(dbURL, SelItem.url) != 0))
continue;
@@ -167,7 +167,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, SelItem.nick);
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME), TRUE);
- wchar_t *szMsgFormat = db_get_tsa(hContact, MODULE, "MsgFormat");
+ wchar_t *szMsgFormat = db_get_wsa(hContact, MODULE, "MsgFormat");
if (szMsgFormat) {
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, szMsgFormat);
mir_free(szMsgFormat);
@@ -177,7 +177,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE);
- wchar_t *szLogin = db_get_tsa(hContact, MODULE, "Login");
+ wchar_t *szLogin = db_get_wsa(hContact, MODULE, "Login");
if (szLogin) {
SetDlgItemText(hwndDlg, IDC_LOGIN, szLogin);
mir_free(szLogin);
@@ -213,17 +213,17 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "URL", str);
+ db_set_ws(SelItem->hContact, MODULE, "URL", str);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "Nick", str);
+ db_set_ws(SelItem->hContact, MODULE, "Nick", str);
db_set_dw(SelItem->hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "MsgFormat", str);
+ db_set_ws(SelItem->hContact, MODULE, "MsgFormat", str);
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(SelItem->hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(SelItem->hContact, MODULE, "Login", str);
+ db_set_ws(SelItem->hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(SelItem->hContact, MODULE, "Password", passw);
@@ -314,13 +314,13 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
- wchar_t *ptszNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDTITLE, ptszNick);
mir_free(ptszNick);
}
- wchar_t *ptszURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(hContact, MODULE, "URL");
if (ptszNick) {
SetDlgItemText(hwndDlg, IDC_FEEDURL, ptszURL);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
@@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
SetDlgItemInt(hwndDlg, IDC_CHECKTIME, db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME), TRUE);
- wchar_t *ptszMsgFormat = db_get_tsa(hContact, MODULE, "MsgFormat");
+ wchar_t *ptszMsgFormat = db_get_wsa(hContact, MODULE, "MsgFormat");
if (ptszMsgFormat) {
SetDlgItemText(hwndDlg, IDC_TAGSEDIT, ptszMsgFormat);
mir_free(ptszMsgFormat);
@@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
CheckDlgButton(hwndDlg, IDC_USEAUTH, BST_CHECKED);
EnableWindow(GetDlgItem(hwndDlg, IDC_LOGIN), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_PASSWORD), TRUE);
- wchar_t *ptszLogin = db_get_tsa(hContact, MODULE, "Login");
+ wchar_t *ptszLogin = db_get_wsa(hContact, MODULE, "Login");
if (ptszLogin) {
SetDlgItemText(hwndDlg, IDC_LOGIN, ptszLogin);
mir_free(ptszLogin);
@@ -371,17 +371,17 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
GetDlgItemText(hwndDlg, IDC_FEEDURL, str, _countof(str));
- db_set_ts(hContact, MODULE, "URL", str);
+ db_set_ws(hContact, MODULE, "URL", str);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, _countof(str));
- db_set_ts(hContact, MODULE, "Nick", str);
+ db_set_ws(hContact, MODULE, "Nick", str);
db_set_dw(hContact, MODULE, "UpdateTime", (DWORD)GetDlgItemInt(hwndDlg, IDC_CHECKTIME, NULL, false));
GetDlgItemText(hwndDlg, IDC_TAGSEDIT, str, _countof(str));
- db_set_ts(hContact, MODULE, "MsgFormat", str);
+ db_set_ws(hContact, MODULE, "MsgFormat", str);
if (IsDlgButtonChecked(hwndDlg, IDC_USEAUTH)) {
db_set_b(hContact, MODULE, "UseAuth", 1);
GetDlgItemText(hwndDlg, IDC_LOGIN, str, _countof(str));
- db_set_ts(hContact, MODULE, "Login", str);
+ db_set_ws(hContact, MODULE, "Login", str);
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, passw, _countof(passw));
db_set_s(hContact, MODULE, "Password", passw);
@@ -498,13 +498,13 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ListView_GetItemText(hwndList, sel, 1, url, _countof(url));
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
- ptrW dbNick(db_get_tsa(hContact, MODULE, "Nick"));
+ ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
if (mir_wstrcmp(dbNick, nick))
continue;
- ptrW dbURL(db_get_tsa(hContact, MODULE, "URL"));
+ ptrW dbURL(db_get_wsa(hContact, MODULE, "URL"));
if (dbURL == NULL)
break;
if (mir_wstrcmp(dbURL, url))
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 6b613a231d..2ca891def2 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -40,7 +40,7 @@ int NewsAggrInit(WPARAM, LPARAM)
if (hNewsAggregatorFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("News Aggregator"), MIRANDA_USERDATAT L"\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)))
FoldersGetCustomPathT(hNewsAggregatorFolder, tszRoot, MAX_PATH, L"");
else
- mir_wstrncpy(tszRoot, VARST(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
+ mir_wstrncpy(tszRoot, VARSW(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
@@ -211,7 +211,7 @@ INT_PTR NewsAggrGetAvatarInfo(WPARAM wParam, LPARAM lParam)
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && !ThreadRunning)
mir_forkthread(UpdateThreadProc, (void *)TRUE);
- wchar_t *ptszImageURL = db_get_tsa(pai->hContact, MODULE, "ImageURL");
+ wchar_t *ptszImageURL = db_get_wsa(pai->hContact, MODULE, "ImageURL");
if(ptszImageURL == NULL)
return GAIR_NOAVATAR;
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 8c6ba7e73b..dc7302c2e3 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -31,7 +31,7 @@ bool IsMyContact(MCONTACT hContact)
void NetlibInit()
{
NETLIBUSER nlu = { sizeof(nlu) };
- nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE; // | NUF_HTTPGATEWAY;
nlu.ptszDescriptiveName = TranslateT("NewsAggregator HTTP connection");
nlu.szSettingsModule = MODULE;
hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
@@ -142,14 +142,14 @@ void UpdateList(HWND hwndList)
UpdateListFlag = TRUE;
lvI.mask = LVIF_TEXT;
lvI.iSubItem = 0;
- wchar_t *ptszNick = db_get_tsa(hContact, MODULE, "Nick");
+ wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
lvI.pszText = ptszNick;
lvI.iItem = i;
ListView_InsertItem(hwndList, &lvI);
lvI.iSubItem = 1;
- wchar_t *ptszURL = db_get_tsa(hContact, MODULE, "URL");
+ wchar_t *ptszURL = db_get_wsa(hContact, MODULE, "URL");
if (ptszURL) {
lvI.pszText = ptszURL;
ListView_SetItem(hwndList, &lvI);
@@ -451,7 +451,7 @@ HRESULT TestDocumentText(IHTMLDocument3 *pHtmlDoc, BSTR &message)
return hr;
}
-LPCTSTR ClearText(CMString &result, const wchar_t *message)
+LPCTSTR ClearText(CMStringW &result, const wchar_t *message)
{
BSTR bstrHtml = SysAllocString(message), bstrRes = SysAllocString(L"");
HRESULT hr = TestMarkupServices(bstrHtml, &TestDocumentText, bstrRes);
diff --git a/plugins/NewsAggregator/Src/stdafx.h b/plugins/NewsAggregator/Src/stdafx.h
index 6640bcb4ca..2636e380b0 100644
--- a/plugins/NewsAggregator/Src/stdafx.h
+++ b/plugins/NewsAggregator/Src/stdafx.h
@@ -135,7 +135,7 @@ void CheckCurrentFeedAvatar(MCONTACT hContact);
LPCTSTR CheckFeed(wchar_t* tszURL, HWND hwndDlg);
void UpdateMenu(bool State);
int ImportFeedsDialog();
-LPCTSTR ClearText(CMString &value, const wchar_t *message);
+LPCTSTR ClearText(CMStringW &value, const wchar_t *message);
bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg);
INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);