From 32dedc767dec565c576b78b786e7a95d76ac806e Mon Sep 17 00:00:00 2001
From: George Hazan <george.hazan@gmail.com>
Date: Mon, 19 Nov 2012 12:51:53 +0000
Subject: - added another helper, ExtraIcon_Clear, to remove an icon from slot;
 - added ability to pass IcoLib handles instead of icons' names

git-svn-id: http://svn.miranda-ng.org/main/trunk@2371 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
---
 src/modules/protocols/protoaccs.cpp | 16 ++++++++--------
 src/modules/protocols/protoopts.cpp |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

(limited to 'src/modules/protocols')

diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index fff20b30c2..b643a960e8 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -54,7 +54,7 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l
 			pa->iOrder = accounts.getCount();
 			accounts.insert(pa);
 		}
-		DBFreeVariant(&dbv);
+		db_free(&dbv);
 	}
 	return 0;
 }
@@ -73,12 +73,12 @@ void LoadDbAccounts(void)
 
 		PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
 		if (pa == NULL) {
-			DBFreeVariant(&dbv);
+			db_free(&dbv);
 			continue;
 		}
 		pa->cbSize = sizeof(*pa);
 		pa->szModuleName = mir_strdup(dbv.pszVal);
-		DBFreeVariant(&dbv);
+		db_free(&dbv);
 
 		_itoa(OFFSET_VISIBLE+i, buf, 10);
 		pa->bIsVisible = db_get_dw(NULL, "Protocols", buf, 1);
@@ -87,11 +87,11 @@ void LoadDbAccounts(void)
 		pa->iOrder = db_get_dw(NULL, "Protocols", buf, 1);
 
 		if (ver >= 4) {
-			DBFreeVariant(&dbv);
+			db_free(&dbv);
 			_itoa(OFFSET_NAME+i, buf, 10);
 			if ( !DBGetContactSettingTString(NULL, "Protocols", buf, &dbv)) {
 				pa->tszAccountName = mir_tstrdup(dbv.ptszVal);
-				DBFreeVariant(&dbv);
+				db_free(&dbv);
 			}
 
 			_itoa(OFFSET_ENABLED+i, buf, 10);
@@ -99,14 +99,14 @@ void LoadDbAccounts(void)
 
 			if ( !DBGetContactSettingString(NULL, pa->szModuleName, "AM_BaseProto", &dbv)) {
 				pa->szProtoName = mir_strdup(dbv.pszVal);
-				DBFreeVariant(&dbv);
+				db_free(&dbv);
 			}
 		}
 		else pa->bIsEnabled = TRUE;
 
 		if ( !pa->szProtoName) {
 			pa->szProtoName = mir_strdup(pa->szModuleName);
-			DBWriteContactSettingString(NULL, pa->szModuleName, "AM_BaseProto", pa->szProtoName);
+			db_set_s(NULL, pa->szModuleName, "AM_BaseProto", pa->szProtoName);
 		}
 
 		if ( !pa->tszAccountName)
@@ -173,7 +173,7 @@ void WriteDbAccounts()
 
 		char buf[ 20 ];
 		_itoa(i, buf, 10);
-		DBWriteContactSettingString(NULL, "Protocols", buf, pa->szModuleName);
+		db_set_s(NULL, "Protocols", buf, pa->szModuleName);
 
 		_itoa(OFFSET_PROTOPOS+i, buf, 10);
 		db_set_dw(NULL, "Protocols", buf, pa->iOrder);
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp
index 52bd819123..9aa7436b4d 100644
--- a/src/modules/protocols/protoopts.cpp
+++ b/src/modules/protocols/protoopts.cpp
@@ -175,7 +175,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
 							mir_snprintf(buf, SIZEOF(buf), "%s_%d", pa->szProtoName, count++);
 							if (DBGetContactSettingString(NULL, buf, "AM_BaseProto", &dbv))
 								break;
-							DBFreeVariant(&dbv);
+							db_free(&dbv);
 						}	
 					}
 					pa->szModuleName = mir_strdup(buf);
@@ -185,7 +185,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
 						pa->tszAccountName = mir_a2t(buf);
 					}
 
-					DBWriteContactSettingString(NULL, pa->szModuleName, "AM_BaseProto", pa->szProtoName);
+					db_set_s(NULL, pa->szModuleName, "AM_BaseProto", pa->szProtoName);
 					accounts.insert(pa);
 
 					if ( ActivateAccount(pa)) {
-- 
cgit v1.2.3