summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-04-05 22:27:16 +0000
commit007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch)
treeb1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/NoHistory
parentf4a1bbc6ba4b8137cb868639ac146aa97e97e9df (diff)
- rest of menus cleared;
- old database macroses wiped out from all plugins (left in m_database.h for compatibility) git-svn-id: http://svn.miranda-ng.org/main/trunk@4324 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index c2f571526e..babf696ccf 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -8,7 +8,8 @@ static void SrmmMenu_UpdateIcon(HANDLE hContact);
static int SrmmMenu_ProcessEvent(WPARAM wParam, LPARAM lParam);
static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam);
-HANDLE hMenuToggle, hMenuClear, hServiceToggle, hServiceClear;
+HGENMENU hMenuToggle, hMenuClear;
+HANDLE hServiceToggle, hServiceClear;
CRITICAL_SECTION list_cs;
@@ -154,7 +155,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_FLAGS|CMIF_TCHAR;
+ mi.flags = CMIM_FLAGS | CMIF_TCHAR;
if (chat_room) mi.flags |= CMIF_HIDDEN;
else {
mi.flags |= (CMIM_NAME | CMIM_ICON);
@@ -163,11 +164,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
}
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuToggle, (LPARAM)&mi);
- mi.flags = CMIM_FLAGS;
- if (chat_room || db_event_count(hContact) <= 0)
- mi.flags |= CMIF_HIDDEN;
-
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuClear, (LPARAM)&mi);
+ Menu_ShowItem(hMenuClear, !chat_room && db_event_count(hContact) > 0);
return 0;
}
@@ -283,9 +280,6 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
mi.hIcon = hIconClear;
hMenuClear = Menu_AddMainMenuItem(&mi);
- // kill read events once in a minute
- // SetTimer(NULL, 0, 60000, TimerProc);
-
// add icon to srmm status icons
SrmmMenu_Load();
return 0;