diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-09 21:40:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-09 21:40:22 +0000 |
commit | 3dc0d9b0b7c30ea2f77d74c4ce5b6ccd67bd525c (patch) | |
tree | efee912ee654baafeb98efcd117921db6b7489bc /plugins/NewsAggregator/Src/Utils.cpp | |
parent | bcb27264ba737778e5d3edad36088bacf74f0236 (diff) |
- the kernel filters out contacts by proto names much faster than a plugin;
- database cycles simplified
git-svn-id: http://svn.miranda-ng.org/main/trunk@4404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewsAggregator/Src/Utils.cpp')
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 745869e27d..5658a25c5f 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -240,27 +240,25 @@ VOID UpdateList(HWND hwndList) // Initialize LVITEM members that are common to all
// items.
int i = 0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- if (IsMyContact(hContact)) {
- UpdateListFlag = TRUE;
- lvI.mask = LVIF_TEXT;
- lvI.iSubItem = 0;
- DBVARIANT dbNick = {0};
- if (!db_get_ts(hContact, MODULE, "Nick", &dbNick)) {
- lvI.pszText = dbNick.ptszVal;
- lvI.iItem = i;
- ListView_InsertItem(hwndList, &lvI);
- lvI.iSubItem = 1;
- DBVARIANT dbURL = {0};
- if (!db_get_ts(hContact, MODULE, "URL", &dbURL)) {
- lvI.pszText = dbURL.ptszVal;
- ListView_SetItem(hwndList, &lvI);
- i += 1;
- ListView_SetCheckState(hwndList, lvI.iItem, db_get_b(hContact, MODULE, "CheckState", 1));
- db_free(&dbURL);
- }
- db_free(&dbNick);
+ for (HANDLE hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ UpdateListFlag = TRUE;
+ lvI.mask = LVIF_TEXT;
+ lvI.iSubItem = 0;
+ DBVARIANT dbNick = {0};
+ if (!db_get_ts(hContact, MODULE, "Nick", &dbNick)) {
+ lvI.pszText = dbNick.ptszVal;
+ lvI.iItem = i;
+ ListView_InsertItem(hwndList, &lvI);
+ lvI.iSubItem = 1;
+ DBVARIANT dbURL = {0};
+ if (!db_get_ts(hContact, MODULE, "URL", &dbURL)) {
+ lvI.pszText = dbURL.ptszVal;
+ ListView_SetItem(hwndList, &lvI);
+ i += 1;
+ ListView_SetCheckState(hwndList, lvI.iItem, db_get_b(hContact, MODULE, "CheckState", 1));
+ db_free(&dbURL);
}
+ db_free(&dbNick);
}
}
UpdateListFlag = FALSE;
|