From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/Nudge/src/main.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'plugins/Nudge/src/main.cpp') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index d94994b68a..73caaf1db3 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -31,8 +31,10 @@ PLUGININFOEX pluginInfo={ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam) { for(NudgeElementList *n = NudgeList;n != NULL; n = n->next) - if (!strcmp((char *) wParam,n->item.ProtocolName)) - return n->item.ShowContactMenu(lParam != 0); + if (!strcmp((char *) wParam,n->item.ProtocolName)) { + Menu_ShowItem(n->item.hContactMenu, lParam != 0); + break; + } return 0; } @@ -40,7 +42,7 @@ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam) INT_PTR NudgeSend(WPARAM wParam,LPARAM lParam) { char *protoName = GetContactProto((HANDLE)wParam); - int diff = time(NULL) - DBGetContactSettingDword((HANDLE) wParam, "Nudge", "LastSent", time(NULL)-30); + int diff = time(NULL) - db_get_dw((HANDLE) wParam, "Nudge", "LastSent", time(NULL)-30); if(diff < GlobalNudge.sendTimeSec) { @@ -85,8 +87,8 @@ int NudgeReceived(WPARAM wParam,LPARAM lParam) DWORD currentTimestamp = time(NULL); DWORD nudgeSentTimestamp = lParam ? (DWORD)lParam : currentTimestamp; - int diff = currentTimestamp - DBGetContactSettingDword((HANDLE) wParam, "Nudge", "LastReceived", currentTimestamp-30); - int diff2 = nudgeSentTimestamp - DBGetContactSettingDword((HANDLE) wParam, "Nudge", "LastReceived2", nudgeSentTimestamp-30); + int diff = currentTimestamp - db_get_dw((HANDLE) wParam, "Nudge", "LastReceived", currentTimestamp-30); + int diff2 = nudgeSentTimestamp - db_get_dw((HANDLE) wParam, "Nudge", "LastReceived2", nudgeSentTimestamp-30); if(diff >= GlobalNudge.recvTimeSec) db_set_dw((HANDLE) wParam, "Nudge", "LastReceived", currentTimestamp); -- cgit v1.2.3