summaryrefslogtreecommitdiff
path: root/plugins/BuddyExpectator
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/BuddyExpectator
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/BuddyExpectator')
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp17
-rw-r--r--plugins/BuddyExpectator/src/options.cpp2
2 files changed, 6 insertions, 13 deletions
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index d3a55b4afa..13a6303ee3 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -447,24 +447,17 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
return 0;
CLISTMENUITEM mi = { sizeof(mi) };
-
- if (db_get_b((HANDLE)wParam, proto, "ChatRoom", 0) || !(CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
- mi.flags = CMIM_FLAGS | CMIF_HIDDEN;
- else
- mi.flags = CMIM_FLAGS;
-
+ mi.flags = CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
if (db_get_b((HANDLE)wParam, MODULE_NAME, "MissYou", 0)) {
- mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
mi.ptszName = LPGENT("Disable Miss You");
mi.icolibItem = iconList[1].hIcolib;
}
else {
- mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_ICONFROMICOLIB | CMIF_TCHAR;
mi.ptszName = LPGENT("Enable Miss You");
mi.icolibItem = iconList[2].hIcolib;
}
Menu_ModifyItem(hContactMenu, &mi);
-
+ Menu_ShowItem(hContactMenu, !db_get_b((HANDLE)wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
return 0;
}
@@ -496,7 +489,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam)
return 0;
int currentStatus = inf->value.wVal;
- int prevStatus = DBGetContactSettingWord(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
+ int prevStatus = db_get_w(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
if (currentStatus == prevStatus)
return 0;
@@ -722,8 +715,8 @@ extern "C" int __declspec(dllexport) Load(void)
HANDLE hContact = db_find_first();
DWORD current_time = (DWORD)time(0);
while (hContact != 0) {
- if ( !DBGetContactSetting(hContact, MODULE_NAME, "CreationTime", &dbv))
- DBFreeVariant(&dbv);
+ if ( !db_get(hContact, MODULE_NAME, "CreationTime", &dbv))
+ db_free(&dbv);
else
db_set_dw(hContact, MODULE_NAME, "CreationTime", current_time);
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp
index 202d83d2ff..3cd321b1d7 100644
--- a/plugins/BuddyExpectator/src/options.cpp
+++ b/plugins/BuddyExpectator/src/options.cpp
@@ -469,7 +469,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar
else
{
/*
- int status = DBGetContactSettingWord((HANDLE)lparam, MODULE_NAME, "LastStatus", ID_STATUS_OFFLINE);
+ int status = db_get_w((HANDLE)lparam, MODULE_NAME, "LastStatus", ID_STATUS_OFFLINE);
char *strptr = (char *)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)status, 0);
*/
_tcsftime(tmpBuf, 50, _T("%#x"), gmtime(&tmpTime));