summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp')
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp39
1 files changed, 13 insertions, 26 deletions
diff --git a/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp b/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp
index ee867b0a48..7daa97cf9d 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/movetogroup.cpp
@@ -5,41 +5,28 @@ HANDLE hPriorityItem = 0, hFloatingItem = 0;
static int OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
{
- CLISTMENUITEM mi;
- BYTE bSetting;
-
- // Menu Item - Floating Contact
- bSetting = cfg::getByte("CList", "flt_enabled", 0);
- if (bSetting && !hFloatingItem)
- {
- memset(&mi,0,sizeof(mi));
- mi.cbSize=sizeof(mi);
+ BYTE bSetting = cfg::getByte("CList", "flt_enabled", 0);
+ if (bSetting && !hFloatingItem) {
+ CLISTMENUITEM mi = { sizeof(mi) };
mi.position=200000;
mi.pszPopupName=(char *)-1;
mi.pszService="CList/SetContactFloating";
mi.pszName=LPGEN("&Floating Contact");
- if (pcli)
- {
- if (SendMessage(pcli->hwndContactTree, CLM_QUERYFLOATINGCONTACT, wParam, 0))
- mi.flags=CMIF_CHECKED;
- }
+ if (SendMessage(pcli->hwndContactTree, CLM_QUERYFLOATINGCONTACT, wParam, 0))
+ mi.flags = CMIF_CHECKED;
+
hFloatingItem = Menu_AddContactMenuItem(&mi);
}
- else if ( !bSetting && hFloatingItem)
- {
+ else if ( !bSetting && hFloatingItem) {
CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)hFloatingItem, 0);
hFloatingItem = 0;
}
- else
- {
- memset(&mi,0,sizeof(mi));
- mi.cbSize=sizeof(mi);
- mi.flags=CMIM_FLAGS;
- if (pcli)
- {
- if (SendMessage(pcli->hwndContactTree, CLM_QUERYFLOATINGCONTACT, wParam, 0))
- mi.flags |= CMIF_CHECKED;
- }
+ else {
+ CLISTMENUITEM mi = { sizeof(mi) };
+ mi.flags = CMIM_FLAGS;
+ if (SendMessage(pcli->hwndContactTree, CLM_QUERYFLOATINGCONTACT, wParam, 0))
+ mi.flags |= CMIF_CHECKED;
+
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hFloatingItem, (LPARAM)&mi);
}
return 0;