From f98e2216f98a31dbb0f77b97249aaaee75b345ed Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 22 Dec 2013 16:20:05 +0000 Subject: massive garbage removal from extra icons module git-svn-id: http://svn.miranda-ng.org/main/trunk@7340 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/svc_email.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'plugins/UserInfoEx/src/svc_email.cpp') diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index bcc452c628..55aacd17b5 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -189,15 +189,11 @@ void SvcEMailRebuildMenu() { static HANDLE hPrebuildMenuHook = NULL; - if (db_get_b(NULL, MODNAME, SET_EXTENDED_EMAILSERVICE, TRUE)) - { + if (db_get_b(NULL, MODNAME, SET_EXTENDED_EMAILSERVICE, TRUE)) { if (!hPrebuildMenuHook) - { hPrebuildMenuHook = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPreBuildMenu); - } - if (!ghMenuItem) - { + if (!ghMenuItem) { // insert contact menuitem CLISTMENUITEM mi = { sizeof(mi) }; mi.position = -2000010000; @@ -207,15 +203,11 @@ void SvcEMailRebuildMenu() ghMenuItem = Menu_AddContactMenuItem(&mi); } } - else - { - if (hPrebuildMenuHook) - { - UnhookEvent(ME_CLIST_PREBUILDCONTACTMENU); - hPrebuildMenuHook = NULL; - } - if (ghMenuItem) - { + else { + if (hPrebuildMenuHook) + UnhookEvent(ME_CLIST_PREBUILDCONTACTMENU), hPrebuildMenuHook = NULL; + + if (ghMenuItem) { CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)ghMenuItem, NULL); ghMenuItem = NULL; } @@ -230,7 +222,7 @@ void SvcEMailRebuildMenu() **/ void SvcEMailApplyCListIcons() { - //walk through all the contacts stored in the DB + // walk through all the contacts stored in the DB for (HANDLE hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) OnCListApplyIcons((WPARAM)hContact, 0); } -- cgit v1.2.3