diff options
Diffstat (limited to 'plugins/Clist_modern/src/modern_viewmodebar.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_viewmodebar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index 9c50528e0d..3c9ea70dc1 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -174,7 +174,7 @@ static DWORD GetMaskForItem(HANDLE hItem) static void UpdateStickies()
{
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, (BYTE)db_get_dw(hContact, CLVM_MODULE, g_szModename, 0) ? 1 : 0);
@@ -432,7 +432,7 @@ void SaveState() T2Utf szModeName(szTempModeName);
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem == nullptr)
continue;
@@ -624,7 +624,7 @@ void DeleteViewMode(char * szName) SetWindowText(hwndSelector, TranslateT("All contacts"));
}
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (auto &hContact : contact_iter())
if (db_get_dw(hContact, CLVM_MODULE, szName, -1) != -1)
db_set_dw(hContact, CLVM_MODULE, szName, 0);
}
@@ -793,7 +793,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case IDC_CLEARALL:
{
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (auto &hContact : contact_iter()) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
|