summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_clistint.h13
-rw-r--r--plugins/Clist_modern/src/modern_clc.h5
-rw-r--r--src/mir_app/src/clcmsgs.cpp6
-rw-r--r--src/mir_app/src/clcutils.cpp10
4 files changed, 19 insertions, 15 deletions
diff --git a/include/m_clistint.h b/include/m_clistint.h
index 48745779c6..886ca00211 100644
--- a/include/m_clistint.h
+++ b/include/m_clistint.h
@@ -204,12 +204,13 @@ struct MenuProto
#define DRAGSTAGEF_MAYBERENAME 0x8000
#define DRAGSTAGEF_OUTSIDE 0x4000
-#define CONTACTF_ONLINE 1
-#define CONTACTF_INVISTO 2
-#define CONTACTF_VISTO 4
-#define CONTACTF_NOTONLIST 8
-#define CONTACTF_CHECKED 16
-#define CONTACTF_IDLE 32
+#define CONTACTF_ONLINE 0x01
+#define CONTACTF_INVISTO 0x02
+#define CONTACTF_VISTO 0x04
+#define CONTACTF_NOTONLIST 0x08
+#define CONTACTF_CHECKED 0x10
+#define CONTACTF_IDLE 0x20
+#define CONTACTF_HASMEMBERS 0x40
#define DROPTARGET_OUTSIDE 0
#define DROPTARGET_ONSELF 1
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h
index 270294e2ae..d45f96214f 100644
--- a/plugins/Clist_modern/src/modern_clc.h
+++ b/plugins/Clist_modern/src/modern_clc.h
@@ -93,11 +93,6 @@ void clcSetDelayTimer(UINT_PTR uIDEvent, HWND hwnd, int nDelay = -1);
#define DROPTARGET_ONMETACONTACT 6
#define DROPTARGET_ONSUBCONTACT 7
-#define CONTACTF_ONLINE 1
-#define CONTACTF_NOTONLIST 8
-#define CONTACTF_CHECKED 16
-#define CONTACTF_IDLE 32
-
#define AVATAR_POS_DONT_HAVE -1
#define AVATAR_POS_ANIMATED -2
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp
index 23260fd237..638dab4493 100644
--- a/src/mir_app/src/clcmsgs.cpp
+++ b/src/mir_app/src/clcmsgs.cpp
@@ -141,7 +141,11 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar
case CLM_GETCHECKMARK:
if (!Clist_FindItem(hwnd, dat, wParam, &contact))
return 0;
- return (contact->flags & CONTACTF_CHECKED) != 0;
+
+ if (contact->flags & CONTACTF_CHECKED)
+ return 1;
+
+ return (contact->flags & CONTACTF_HASMEMBERS) ? 2 : 0;
case CLM_GETCOUNT:
return g_clistApi.pfnGetGroupContentsCount(&dat->list, 0);
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 4626c91e14..57d9997037 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -796,12 +796,16 @@ static int GroupHasCheck(ClcGroup *group)
bAllChecked = false;
}
- if (res & 1)
+ if (res & 1) {
+ cc->flags |= CONTACTF_HASMEMBERS;
bHasMembers = true;
+ }
+ else cc->flags &= ~CONTACTF_HASMEMBERS;
}
else if (cc->type == CLCIT_CONTACT) {
- bHasMembers = true;
- if (!(cc->flags & CONTACTF_CHECKED))
+ if (cc->flags & CONTACTF_CHECKED)
+ bHasMembers = true;
+ else
bAllChecked = false;
}
}