summaryrefslogtreecommitdiff
path: root/plugins/MenuItemEx/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MenuItemEx/src')
-rw-r--r--plugins/MenuItemEx/src/main.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 5a1c87ab99..a8c8a6f3c5 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -377,7 +377,7 @@ static INT_PTR onSetVis(WPARAM wparam, LPARAM)
static INT_PTR onHide(WPARAM wparam, LPARAM)
{
MCONTACT hContact = (MCONTACT)wparam;
- db_set_b(hContact, "CList", "Hidden", (BYTE)!db_get_b(hContact, "CList", "Hidden", 0));
+ Clist_HideContact(hContact, !Clist_IsHidden(hContact));
return 0;
}
@@ -643,7 +643,7 @@ static int isIgnored(MCONTACT hContact, int type)
static INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
{
if (g_plugin.getByte("ignorehide", 0) && (lparam == IGNOREEVENT_ALL))
- db_set_b((MCONTACT)wparam, "CList", "Hidden", (isIgnored((MCONTACT)wparam, lparam) ? (byte)0 : (byte)1));
+ Clist_HideContact(wparam, !isIgnored((MCONTACT)wparam, lparam));
CallService(isIgnored((MCONTACT)wparam, lparam) ? MS_IGNORE_UNIGNORE : MS_IGNORE_IGNORE, wparam, lparam);
return 0;
@@ -693,8 +693,7 @@ static int BuildMenu(WPARAM wparam, LPARAM)
bEnabled = bShowAll || (flags & VF_HFL);
Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
- BYTE bHidden = db_get_b(hContact, "CList", "Hidden", 0);
- if (bHidden)
+ if (Clist_IsHidden(hContact))
Menu_ModifyItem(hmenuHide, LPGENW("Show in list"), IcoLib_GetIconHandle("miex_showil"));
else
Menu_ModifyItem(hmenuHide, LPGENW("Hide from list"), IcoLib_GetIconHandle("miex_hidefl"));