summaryrefslogtreecommitdiff
path: root/plugins/NewsAggregator
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-03-16 21:05:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-03-16 21:05:31 +0300
commit12225716d38830a23477b97a6979b6414faeec7b (patch)
treebaa3169833239de523eef0c7cf1c1c1fe0731c35 /plugins/NewsAggregator
parent39390b02dbd5aa7eb21a83773fa561b39f8828bc (diff)
entities' names to be started with capital letters
Diffstat (limited to 'plugins/NewsAggregator')
-rw-r--r--plugins/NewsAggregator/Src/Options.cpp10
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp6
-rw-r--r--plugins/NewsAggregator/Src/Update.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp4
4 files changed, 11 insertions, 11 deletions
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp
index 4d43ddcbc4..bf3b9f77fc 100644
--- a/plugins/NewsAggregator/Src/Options.cpp
+++ b/plugins/NewsAggregator/Src/Options.cpp
@@ -39,7 +39,7 @@ CExportFeed::CExportFeed()
void CExportFeed::OnInitDialog()
{
Utils_RestoreWindowPositionNoSize(m_hwnd, NULL, MODULE, "ExportDlg");
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
wchar_t *message = db_get_wsa(hContact, MODULE, "Nick");
if (message != nullptr) {
m_feedslist.AddString(message);
@@ -692,7 +692,7 @@ void CFeedEditor::OnInitDialog()
m_list->GetItemText(m_iItem, 0, SelNick, _countof(SelNick));
m_list->GetItemText(m_iItem, 1, SelUrl, _countof(SelNick));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if ((dbNick == NULL) || (mir_wstrcmp(dbNick, SelNick) != 0))
continue;
@@ -874,7 +874,7 @@ void CFeedEditor::OnUseAuth(CCtrlBase*)
void COptionsMain::UpdateList()
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
UpdateListFlag = TRUE;
wchar_t *ptszNick = db_get_wsa(hContact, MODULE, "Nick");
if (ptszNick) {
@@ -928,7 +928,7 @@ void COptionsMain::OnInitDialog()
void COptionsMain::OnApply()
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
for (int i = 0; i < m_feeds.GetItemCount(); i++) {
wchar_t nick[MAX_PATH];
@@ -998,7 +998,7 @@ void COptionsMain::OnDeleteButtonClick(CCtrlBase*)
m_feeds.GetItemText(isel, 0, nick, _countof(nick));
m_feeds.GetItemText(isel, 1, url, _countof(url));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW dbNick(db_get_wsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 8be70f3541..36e25ba073 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -36,7 +36,7 @@ int NewsAggrInit(WPARAM, LPARAM)
else
mir_wstrncpy(tszRoot, VARSW(L"%miranda_userdata%\\Avatars\\" _A2W(DEFAULT_AVATARS_FOLDER)), _countof(tszRoot));
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
db_set_dw(hContact, MODULE, "LastCheck", time(nullptr));
db_set_w(hContact, MODULE, "Status", ID_STATUS_ONLINE);
@@ -98,7 +98,7 @@ INT_PTR NewsAggrSetStatus(WPARAM wp, LPARAM)
if(nStatus != g_nStatus) {
g_nStatus = nStatus;
- for (auto &hContact : contact_iter(MODULE))
+ for (auto &hContact : Contacts(MODULE))
db_set_w(hContact, MODULE, "Status", nStatus);
ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)nOldStatus, g_nStatus);
@@ -133,7 +133,7 @@ INT_PTR NewsAggrGetInfo(WPARAM, LPARAM lParam)
INT_PTR CheckAllFeeds(WPARAM, LPARAM lParam)
{
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (lParam && db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME))
UpdateListAdd(hContact);
else if (!lParam)
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp
index feaaf9840d..893a00239b 100644
--- a/plugins/NewsAggregator/Src/Update.cpp
+++ b/plugins/NewsAggregator/Src/Update.cpp
@@ -30,7 +30,7 @@ void CALLBACK timerProc(HWND, UINT, UINT_PTR, DWORD)
// only run if it is not current updating and the auto update option is enabled
if (!ThreadRunning && !Miranda_IsTerminated()) {
bool HaveUpdates = FALSE;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
double diff = difftime(time(nullptr), (time_t)db_get_dw(hContact, MODULE, "LastCheck", 0));
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index d2e646c5e8..4eff01b870 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -431,7 +431,7 @@ MCONTACT GetContactByNick(const wchar_t *nick)
{
MCONTACT hContact = NULL;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
if (!mir_wstrcmpi(contactNick, nick))
break;
@@ -443,7 +443,7 @@ MCONTACT GetContactByURL(const wchar_t *url)
{
MCONTACT hContact = NULL;
- for (auto &hContact : contact_iter(MODULE)) {
+ for (auto &hContact : Contacts(MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
if (!mir_wstrcmpi(contactURL, url))
break;