summaryrefslogtreecommitdiff
path: root/plugins/AVS/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-14 16:44:50 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-14 16:44:50 +0000
commit3190ba9e94f0fe954efb049886279dc365b1694f (patch)
tree2a909e9388a6e184ae0d6d24da4571316c4d20f8 /plugins/AVS/src
parent27e56d478fd53d2457068fd06ece531242daa3c4 (diff)
compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@4029 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r--plugins/AVS/src/main.cpp38
-rw-r--r--plugins/AVS/src/options.cpp36
2 files changed, 37 insertions, 37 deletions
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index 6c95ec7026..d6e1b453d3 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -372,7 +372,7 @@ void MakePathRelative(HANDLE hContact, TCHAR *path)
static void MakePathRelative(HANDLE hContact)
{
DBVARIANT dbv;
- if ( !DBGetContactSettingTStrring(hContact, "ContactPhoto", "File", &dbv)) {
+ if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
MakePathRelative(hContact, dbv.ptszVal);
db_free(&dbv);
}
@@ -434,11 +434,11 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto)
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
- else if (!DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) {
+ else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
- else if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
@@ -448,13 +448,13 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto)
}
else {
if (hContact == 0) { // create a protocol picture in the proto picture cache
- if (!DBGetContactSettingTString(NULL, PPICT_MODULE, szProto, &dbv)) {
+ if ( !DBGetContactSettingTString(NULL, PPICT_MODULE, szProto, &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
else {
if (lstrcmpA(szProto, AVS_DEFAULT)) {
- if (!DBGetContactSettingTString(NULL, PPICT_MODULE, AVS_DEFAULT, &dbv)) {
+ if ( !DBGetContactSettingTString(NULL, PPICT_MODULE, AVS_DEFAULT, &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
@@ -465,7 +465,7 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto)
return -1;
char key[MAX_PATH];
mir_snprintf(key, SIZEOF(key), "Global avatar for %s accounts", pdescr->szProtoName);
- if (!DBGetContactSettingTString(NULL, PPICT_MODULE, key, &dbv)) {
+ if ( !DBGetContactSettingTString(NULL, PPICT_MODULE, key, &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
@@ -494,7 +494,7 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto)
else
MultiByteToWideChar( CP_ACP, 0, szFileName, -1, tszFilename, SIZEOF(tszFilename));
}
- else if (!DBGetContactSettingTString(NULL, szProto, "AvatarFile", &dbv)) {
+ else if ( !DBGetContactSettingTString(NULL, szProto, "AvatarFile", &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, tszFilename);
db_free(&dbv);
}
@@ -733,7 +733,7 @@ static int ProtocolAck(WPARAM wParam, LPARAM lParam)
if (szProto == NULL || Proto_NeedDelaysForAvatars(szProto))
{
// Queue
- DBWriteContactSettingByte(ack->hContact, "ContactPhoto", "NeedUpdate", 1);
+ db_set_b(ack->hContact, "ContactPhoto", "NeedUpdate", 1);
QueueAdd(ack->hContact);
}
else
@@ -757,7 +757,7 @@ INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam)
if (hContact) {
if (!was_locked)
MakePathRelative(hContact);
- DBWriteContactSettingByte(hContact, "ContactPhoto", "Locked", lParam ? 1 : 0);
+ db_set_b(hContact, "ContactPhoto", "Locked", lParam ? 1 : 0);
if (lParam == 0)
MakePathRelative(hContact);
ChangeAvatar(hContact, TRUE);
@@ -885,7 +885,7 @@ INT_PTR avSetAvatar(HANDLE hContact, TCHAR* tszPath)
AVS_pathToRelative(szFinalName, szBackupName);
db_set_ts(hContact, "ContactPhoto", "Backup", szBackupName);
- DBWriteContactSettingByte(hContact, "ContactPhoto", "Locked", is_locked);
+ db_set_b(hContact, "ContactPhoto", "Locked", is_locked);
db_set_ts(hContact, "ContactPhoto", "File", szFinalName);
MakePathRelative(hContact, szFinalName);
// Fix cache
@@ -1135,9 +1135,9 @@ static int InternalRemoveMyAvatar(char *protocol)
{
// Has global avatar?
DBVARIANT dbv = {0};
- if (!DBGetContactSettingTString(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) {
- db_unset(&dbv);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
+ if ( !DBGetContactSettingTString(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) {
+ db_free(&dbv);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
DeleteGlobalUserAvatar();
}
}
@@ -1165,9 +1165,9 @@ static int InternalRemoveMyAvatar(char *protocol)
DeleteGlobalUserAvatar();
if (ret)
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
else
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 0);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 0);
}
SetIgnoreNotify(protocol, FALSE);
@@ -1218,7 +1218,7 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo
if (ret == 0)
{
DeleteGlobalUserAvatar();
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
}
}
else
@@ -1244,7 +1244,7 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo
if (ret)
{
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
}
else
{
@@ -1302,11 +1302,11 @@ static int InternalSetMyAvatar(char *protocol, TCHAR *szFinalName, SetMyAvatarHo
else
db_set_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", globalFile);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 0);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 0);
}
else
{
- DBWriteContactSettingByte(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
+ db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1);
}
}
}
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 402684a4b9..b720b900fc 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -242,10 +242,10 @@ INT_PTR CALLBACK DlgProcOptionsAvatars(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case 0:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- DBWriteContactSettingByte(NULL, AVS_MODULE, "warnings", IsDlgButtonChecked(hwndDlg, IDC_SHOWWARNINGS) ? 1 : 0);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "MakeGrayscale", IsDlgButtonChecked(hwndDlg, IDC_MAKE_GRAYSCALE) ? 1 : 0);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "MakeTransparentBkg", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSPARENT_BKG) ? 1 : 0);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "MakeTransparencyProportionalToColorDiff", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSP_PROPORTIONAL) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "warnings", IsDlgButtonChecked(hwndDlg, IDC_SHOWWARNINGS) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "MakeGrayscale", IsDlgButtonChecked(hwndDlg, IDC_MAKE_GRAYSCALE) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "MakeTransparentBkg", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSPARENT_BKG) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "MakeTransparencyProportionalToColorDiff", IsDlgButtonChecked(hwndDlg, IDC_MAKE_TRANSP_PROPORTIONAL) ? 1 : 0);
db_set_w(NULL, AVS_MODULE, "TranspBkgNumPoints", (WORD) SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0));
db_set_w(NULL, AVS_MODULE, "TranspBkgColorDiff", (WORD) SendDlgItemMessage(hwndDlg, IDC_BKG_COLOR_DIFFERENCE_SPIN, UDM_GETPOS, 0, 0));
} }
@@ -274,8 +274,8 @@ INT_PTR CALLBACK DlgProcOptionsOwn(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case 0:
switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
- DBWriteContactSettingByte(NULL, AVS_MODULE, "MakeMyAvatarsTransparent", IsDlgButtonChecked(hwndDlg, IDC_MAKE_MY_AVATARS_TRANSP) ? 1 : 0);
- DBWriteContactSettingByte(NULL, AVS_MODULE, "SetAllwaysMakeSquare", IsDlgButtonChecked(hwndDlg, IDC_SET_MAKE_SQUARE) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "MakeMyAvatarsTransparent", IsDlgButtonChecked(hwndDlg, IDC_MAKE_MY_AVATARS_TRANSP) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "SetAllwaysMakeSquare", IsDlgButtonChecked(hwndDlg, IDC_SET_MAKE_SQUARE) ? 1 : 0);
} }
break;
}
@@ -444,9 +444,9 @@ INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
}
if (newVal)
- DBWriteContactSettingByte(NULL, AVS_MODULE, szProto, 1);
+ db_set_b(NULL, AVS_MODULE, szProto, 1);
else
- DBWriteContactSettingByte(NULL, AVS_MODULE, szProto, 0);
+ db_set_b(NULL, AVS_MODULE, szProto, 0);
}
}
}
@@ -477,7 +477,7 @@ void SaveTransparentData(HWND hwndDlg, HANDLE hContact)
if (db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0) == transp)
db_unset(hContact, "ContactPhoto", "MakeTransparentBkg");
else
- DBWriteContactSettingByte(hContact, "ContactPhoto", "MakeTransparentBkg", transp);
+ db_set_b(hContact, "ContactPhoto", "MakeTransparentBkg", transp);
WORD tmp = (WORD) SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_GETPOS, 0, 0);
if (db_get_w(0, AVS_MODULE, "TranspBkgNumPoints", 5) == tmp)
@@ -565,7 +565,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
int hidden = IsDlgButtonChecked(hwndDlg, IDC_HIDEAVATAR) ? 1 : 0;
SetAvatarAttribute(hContact, AVS_HIDEONCLIST, hidden);
if (hidden != db_get_b(hContact, "ContactPhoto", "Hidden", 0))
- DBWriteContactSettingByte(hContact, "ContactPhoto", "Hidden", hidden);
+ db_set_b(hContact, "ContactPhoto", "Hidden", hidden);
if (!locked && db_get_b(hContact, "ContactPhoto", "NeedUpdate", 0))
QueueAdd(hContact);
@@ -616,7 +616,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
ProtectAvatar((WPARAM)hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
- if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -641,7 +641,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
DBVARIANT dbv = {0};
ProtectAvatar((WPARAM)hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
- if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -712,11 +712,11 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
AVS_pathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
- else if (!DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) {
+ else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
- else if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
AVS_pathToAbsolute(dbv.ptszVal, szFinalName);
db_free(&dbv);
}
@@ -811,7 +811,7 @@ INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LP
int hidden = IsDlgButtonChecked(hwndDlg, IDC_HIDEAVATAR) ? 1 : 0;
SetAvatarAttribute(hContact, AVS_HIDEONCLIST, hidden);
if (hidden != db_get_b(hContact, "ContactPhoto", "Hidden", 0))
- DBWriteContactSettingByte(hContact, "ContactPhoto", "Hidden", hidden);
+ db_set_b(hContact, "ContactPhoto", "Hidden", hidden);
break;
}
@@ -847,7 +847,7 @@ INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ProtectAvatar((WPARAM)hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
- if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -870,7 +870,7 @@ INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LP
ProtectAvatar((WPARAM)hContact, 0);
if (MessageBox(0, TranslateT("Delete picture file from disk (may be necessary to force a reload, but will delete local pictures)?"), TranslateT("Reset contact picture"), MB_YESNO) == IDYES) {
- if (!DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
+ if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
@@ -1135,7 +1135,7 @@ INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wParam, L
break;
case IDC_PER_PROTO:
- DBWriteContactSettingByte(NULL, AVS_MODULE, "PerProtocolUserAvatars", IsDlgButtonChecked(hwndDlg, IDC_PER_PROTO) ? 1 : 0);
+ db_set_b(NULL, AVS_MODULE, "PerProtocolUserAvatars", IsDlgButtonChecked(hwndDlg, IDC_PER_PROTO) ? 1 : 0);
EnableDisableProtocols(hwndDlg, FALSE);
break;
}