summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src/BasicHistory.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-03-12 15:17:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-03-12 15:17:53 +0000
commitfab0ad41fc5a614a3d9710e9dfc9ed7850fa34c3 (patch)
tree49318786ba0d4b549b960f9521b343a09c13ef35 /plugins/BasicHistory/src/BasicHistory.cpp
parent85179f507a34f211dccfdf96913caaf8bd8f637a (diff)
a contact has history when db_event_last <> NULL
db_event_count might return 0 for subs git-svn-id: http://svn.miranda-ng.org/main/trunk@8581 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src/BasicHistory.cpp')
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 550077b8b3..f625f727ea 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -74,13 +74,13 @@ void DeinitScheduler();
int DoLastTask(WPARAM, LPARAM);
INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam);
-int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- int count = EventList::GetContactMessageNumber(wParam);
+ bool bHasHistory = db_event_last(hContact) != NULL;
bool isInList = HistoryWindow::IsInList(GetForegroundWindow());
- Menu_ShowItem(hContactMenu, count != 0);
- Menu_ShowItem(hDeleteContactMenu, count != 0 && isInList);
+ Menu_ShowItem(hContactMenu, bHasHistory);
+ Menu_ShowItem(hDeleteContactMenu, bHasHistory && isInList);
return 0;
}