diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 22:27:16 +0000 |
commit | 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 (patch) | |
tree | b1ee30b70c6e36d1a06aed6885cb80dc560a68ca /plugins/PasteIt/src/PasteIt.cpp | |
parent | f4a1bbc6ba4b8137cb868639ac146aa97e97e9df (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/PasteIt/src/PasteIt.cpp')
-rw-r--r-- | plugins/PasteIt/src/PasteIt.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 7600d2a4bb..b2a5196a94 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -124,7 +124,7 @@ void PasteIt(HANDLE hContact, int mode) char *szProto = GetContactProto(hContact);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND)
{
- BOOL isChat = DBGetContactSettingByte(hContact, szProto, "ChatRoom", 0);
+ BOOL isChat = db_get_b(hContact, szProto, "ChatRoom", 0);
if(Options::instance->autoSend)
{
if(!isChat)
@@ -328,26 +328,17 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) char *szProto = GetContactProto((HANDLE)wParam);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND)
- bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false;
-
- CLISTMENUITEM mi = { sizeof(mi) };
- mi.flags = CMIM_FLAGS;
-
- if (!bIsContact) mi.flags |= CMIF_HIDDEN;
- else mi.flags &= ~CMIF_HIDDEN;
- CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hContactMenu, (LPARAM)&mi);
+ bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) != 0;
+ Menu_ShowItem(hContactMenu, bIsContact);
return 0;
}
INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam)
{
if(lParam >= DEF_PAGES_START)
- {
Options::instance->SetDefWeb(lParam - DEF_PAGES_START);
- }
- else
- {
+ else {
HANDLE hContact = (HANDLE)wParam;
PasteIt(hContact, lParam);
}
@@ -437,7 +428,7 @@ int WindowEvent(WPARAM wParam, MessageWindowEventData* lParam) char *szProto = GetContactProto(lParam->hContact);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND)
{
- if(DBGetContactSettingByte(lParam->hContact, szProto, "ChatRoom", 0))
+ if(db_get_b(lParam->hContact, szProto, "ChatRoom", 0))
{
(*contactWindows)[lParam->hContact] = lParam->hwndInput;
}
|