summaryrefslogtreecommitdiff
path: root/plugins/Nudge/src/main.cpp
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/Nudge/src/main.cpp
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/Nudge/src/main.cpp')
-rw-r--r--plugins/Nudge/src/main.cpp12
1 files changed, 7 insertions, 5 deletions
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);