summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-19 18:42:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-19 18:42:19 +0000
commit3d3a8bb209b190732f8530f3dc5b2baa46d3078e (patch)
tree28afcae563cff29fdd686e1a4874bda0f6aee801 /plugins/Clist_modern/src/modern_clc.cpp
parentd67f238b33aa9fae3e877dc579ac9260323219fe (diff)
fix against recursions in clists
git-svn-id: http://svn.miranda-ng.org/main/trunk@8664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clc.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clc.cpp22
1 files changed, 9 insertions, 13 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp
index 9f4bf199dd..efc8646734 100644
--- a/plugins/Clist_modern/src/modern_clc.cpp
+++ b/plugins/Clist_modern/src/modern_clc.cpp
@@ -439,22 +439,18 @@ static LRESULT clcOnCommand(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LP
pcli->pfnBeginRenameSelection(hwnd, dat);
return 0;
case POPUP_DELETEGROUP:
- if (contact->type != CLCIT_GROUP)
- return 0;
- CallService(MS_CLIST_GROUPDELETE, contact->groupId, 0);
+ if (contact->type == CLCIT_GROUP)
+ CallService(MS_CLIST_GROUPDELETE, contact->groupId, 0);
return 0;
case POPUP_GROUPSHOWOFFLINE:
- if (contact->type != CLCIT_GROUP)
- return 0;
- CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId,
- MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE));
- pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
+ if (contact->type == CLCIT_GROUP) {
+ CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId, MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE));
+ pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
+ }
return 0;
case POPUP_GROUPHIDEOFFLINE:
- if (contact->type != CLCIT_GROUP)
- return 0;
- CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId,
- MAKELPARAM(contact->group->hideOffline ? 0 : GROUPF_HIDEOFFLINE, GROUPF_HIDEOFFLINE));
+ if (contact->type == CLCIT_GROUP)
+ CallService(MS_CLIST_GROUPSETFLAGS, contact->groupId, MAKELPARAM(contact->group->hideOffline ? 0 : GROUPF_HIDEOFFLINE, GROUPF_HIDEOFFLINE));
return 0;
}
@@ -1687,7 +1683,7 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM
}
if (db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOOFLINETOROOT_DEFAULT))
- SendMessage(hwnd, CLM_AUTOREBUILD, 0, 0);
+ pcli->pfnInitAutoRebuild(hwnd);
else {
pcli->pfnSortContacts();
PostMessage(hwnd, INTM_INVALIDATE, 0, 0);