diff options
Diffstat (limited to 'plugins/BasicHistory/src/BasicHistory.cpp')
-rw-r--r-- | plugins/BasicHistory/src/BasicHistory.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 7083ac7e4a..1a4c589d4e 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -79,18 +79,8 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) int count = EventList::GetContactMessageNumber((HANDLE)wParam);
bool isInList = HistoryWindow::IsInList(GetForegroundWindow());
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_FLAGS;
-
- if (!count) mi.flags |= CMIF_HIDDEN;
- else mi.flags &= ~CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenu, (LPARAM)&mi);
-
- mi.flags = CMIM_FLAGS;
- if (!count || !isInList) mi.flags |= CMIF_HIDDEN;
- else mi.flags &= ~CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hDeleteContactMenu, (LPARAM)&mi);
-
+ Menu_ShowItem(hContactMenu, count != 0);
+ Menu_ShowItem(hDeleteContactMenu, count != 0 && isInList);
return 0;
}
|