summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/gg.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-07-10 20:18:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-07-10 20:18:54 +0000
commit6ce6a5277e749cf6082ae42f005b68b3ec763c6c (patch)
treeb9cde795c6ed4863d97428f05482bf44576c031b /protocols/Gadu-Gadu/src/gg.cpp
parent00c866aaa0b79c354f9c71ca5d61f57daeec6e6a (diff)
protocol DB helpers for GG
git-svn-id: http://svn.miranda-ng.org/main/trunk@5314 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/gg.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 3bd7b199a6..737a60d1a6 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -149,7 +149,7 @@ void GGPROTO::cleanuplastplugin(DWORD version)
{
// Store current plugin version
- db_set_dw(NULL, m_szModuleName, GG_PLUGINVERSION, pluginInfo.version);
+ setDword(GG_PLUGINVERSION, pluginInfo.version);
//1. clean files: %miranda_avatarcache%\GG\*.(null)
@@ -233,11 +233,11 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIM_FLAGS | CMIF_TCHAR;
- if ( db_get_dw(hContact, gg->m_szModuleName, GG_KEY_UIN, 0) == db_get_b(NULL, gg->m_szModuleName, GG_KEY_UIN, 0)
- || db_get_b(hContact, gg->m_szModuleName, "ChatRoom", 0)
- || db_get_b(hContact, "CList", "NotOnList", 0))
+ if ( gg->getDword(hContact, GG_KEY_UIN, 0) == gg->getByte(GG_KEY_UIN, 0) ||
+ gg->getByte(hContact, "ChatRoom", 0) ||
+ db_get_b(hContact, "CList", "NotOnList", 0))
mi.flags |= CMIF_HIDDEN;
- mi.ptszName = db_get_b(hContact, gg->m_szModuleName, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
+ mi.ptszName = gg->getByte(hContact, GG_KEY_BLOCK, 0) ? LPGENT("&Unblock") : LPGENT("&Block");
Menu_ModifyItem(gg->hBlockMenuItem, &mi);
return 0;
}
@@ -247,7 +247,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
{
const HANDLE hContact = (HANDLE)wParam;
- db_set_b(hContact, m_szModuleName, GG_KEY_BLOCK, !db_get_b(hContact, m_szModuleName, GG_KEY_BLOCK, 0));
+ setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
notifyuser(hContact, 1);
return 0;
}