From 197fe77f67654cf8c46c53376190fc321176c08b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 7 Oct 2012 11:42:28 +0000 Subject: old database macros removed from m_database.h git-svn-id: http://svn.miranda-ng.org/main/trunk@1796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/protocols/protoaccs.cpp | 22 +++++++++++----------- src/modules/protocols/protoopts.cpp | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/modules/protocols') diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 0b31bfab25..c21e1a85c8 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -63,8 +63,8 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l void LoadDbAccounts(void) { DBVARIANT dbv; - int ver = DBGetContactSettingDword(NULL, "Protocols", "PrVer", -1); - int count = DBGetContactSettingDword(NULL, "Protocols", "ProtoCount", 0), i; + int ver = db_get_dw(NULL, "Protocols", "PrVer", -1); + int count = db_get_dw(NULL, "Protocols", "ProtoCount", 0), i; for (i=0; i < count; i++) { char buf[10]; @@ -83,10 +83,10 @@ void LoadDbAccounts(void) DBFreeVariant(&dbv); _itoa(OFFSET_VISIBLE+i, buf, 10); - pa->bIsVisible = DBGetContactSettingDword(NULL, "Protocols", buf, 1); + pa->bIsVisible = db_get_dw(NULL, "Protocols", buf, 1); _itoa(OFFSET_PROTOPOS+i, buf, 10); - pa->iOrder = DBGetContactSettingDword(NULL, "Protocols", buf, 1); + pa->iOrder = db_get_dw(NULL, "Protocols", buf, 1); if (ver >= 4) { DBFreeVariant(&dbv); @@ -97,7 +97,7 @@ void LoadDbAccounts(void) } _itoa(OFFSET_ENABLED+i, buf, 10); - pa->bIsEnabled = DBGetContactSettingDword(NULL, "Protocols", buf, 1); + pa->bIsEnabled = db_get_dw(NULL, "Protocols", buf, 1); if ( !DBGetContactSettingString(NULL, pa->szModuleName, "AM_BaseProto", &dbv)) { pa->szProtoName = mir_strdup(dbv.pszVal); @@ -178,21 +178,21 @@ void WriteDbAccounts() DBWriteContactSettingString(NULL, "Protocols", buf, pa->szModuleName); _itoa(OFFSET_PROTOPOS+i, buf, 10); - DBWriteContactSettingDword(NULL, "Protocols", buf, pa->iOrder); + db_set_dw(NULL, "Protocols", buf, pa->iOrder); _itoa(OFFSET_VISIBLE+i, buf, 10); - DBWriteContactSettingDword(NULL, "Protocols", buf, pa->bIsVisible); + db_set_dw(NULL, "Protocols", buf, pa->bIsVisible); _itoa(OFFSET_ENABLED+i, buf, 10); - DBWriteContactSettingDword(NULL, "Protocols", buf, pa->bIsEnabled); + db_set_dw(NULL, "Protocols", buf, pa->bIsEnabled); _itoa(OFFSET_NAME+i, buf, 10); DBWriteContactSettingTString(NULL, "Protocols", buf, pa->tszAccountName); } DBDeleteContactSetting(0, "Protocols", "ProtoCount"); - DBWriteContactSettingDword(0, "Protocols", "ProtoCount", accounts.getCount()); - DBWriteContactSettingDword(0, "Protocols", "PrVer", 4); + db_set_dw(0, "Protocols", "ProtoCount", accounts.getCount()); + db_set_dw(0, "Protocols", "PrVer", 4); } ///////////////////////////////////////////////////////////////////////////////////////// @@ -238,7 +238,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) BuildProtoMenus(); - if (count == 0 && !DBGetContactSettingByte(NULL, "FirstRun", "AccManager", 0)) { + if (count == 0 && !db_get_b(NULL, "FirstRun", "AccManager", 0)) { DBWriteContactSettingByte(NULL, "FirstRun", "AccManager", 1); CallService(MS_PROTO_SHOWACCMGR, 0, 0); } diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 2faccf8d24..c6c43f4169 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -192,7 +192,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam if (ActivateAccount(pa)) { pa->ppro->OnEvent(EV_PROTO_ONLOAD, 0, 0); - if ( !DBGetContactSettingByte(NULL, "CList", "MoveProtoMenus", TRUE)) + if ( !db_get_b(NULL, "CList", "MoveProtoMenus", TRUE)) pa->ppro->OnEvent(EV_PROTO_ONMENU, 0, 0); } else pa->type = PROTOTYPE_DISPROTO; @@ -776,7 +776,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM if (pa->bIsEnabled) { if (ActivateAccount(pa)) { pa->ppro->OnEvent(EV_PROTO_ONLOAD, 0, 0); - if ( !DBGetContactSettingByte(NULL, "CList", "MoveProtoMenus", TRUE)) + if ( !db_get_b(NULL, "CList", "MoveProtoMenus", TRUE)) pa->ppro->OnEvent(EV_PROTO_ONMENU, 0, 0); } else pa->type = PROTOTYPE_DISPROTO; } -- cgit v1.2.3