From 007b4c7301f0d26a72f89f74e9929f42e24eb3e6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 5 Apr 2013 22:27:16 +0000 Subject: - 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 --- plugins/AVS/src/main.cpp | 30 +++++++++++++++--------------- plugins/AVS/src/options.cpp | 16 ++++++++-------- 2 files changed, 23 insertions(+), 23 deletions(-) (limited to 'plugins/AVS') diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index beff99167f..7cee95c5ff 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -248,7 +248,7 @@ static void NotifyMetaAware(HANDLE hContact, struct CacheNode *node = NULL, AVAT char *szProto = GetContactProto(hContact); if (szProto != NULL) { DBVARIANT dbv = {0}; - if ( !DBGetContactSettingString(hContact, szProto, "AvatarHash", &dbv)) { + if ( !db_get_s(hContact, szProto, "AvatarHash", &dbv)) { if (dbv.type == DBVT_TCHAR) { _tcsncpy(cacn.hash, dbv.ptszVal, SIZEOF(cacn.hash)); } else if (dbv.type == DBVT_BLOB) { @@ -372,7 +372,7 @@ void MakePathRelative(HANDLE hContact, TCHAR *path) static void MakePathRelative(HANDLE hContact) { DBVARIANT dbv; - if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) { + if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) { MakePathRelative(hContact, dbv.ptszVal); db_free(&dbv); } @@ -390,10 +390,10 @@ static TCHAR *getJGMailID(char *szProto) static TCHAR szJID[MAX_PATH+1]; szJID[0] = '\0'; DBVARIANT dbva, dbvb; - if ( DBGetContactSettingTString(NULL, szProto, "LoginName", &dbva)) + if ( db_get_ts(NULL, szProto, "LoginName", &dbva)) return szJID; - if ( DBGetContactSettingTString(NULL, szProto, "LoginServer", &dbvb)) { + if ( db_get_ts(NULL, szProto, "LoginServer", &dbvb)) { db_free(&dbva); return szJID; } @@ -430,15 +430,15 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto) } if (db_get_b(hContact, "ContactPhoto", "Locked", 0) - && !DBGetContactSettingTString(hContact, "ContactPhoto", "Backup", &dbv)) { + && !db_get_ts(hContact, "ContactPhoto", "Backup", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, tszFilename); db_free(&dbv); } - else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) { + else if ( !db_get_ts(hContact, "ContactPhoto", "RFile", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, tszFilename); db_free(&dbv); } - else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) { + else if ( !db_get_ts(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 ( !db_get_ts(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 ( !db_get_ts(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 ( !db_get_ts(NULL, PPICT_MODULE, key, &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, tszFilename); db_free(&dbv); } @@ -477,7 +477,7 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto) // startup and everytime they are changed. if (szProto[0] == '\0') { // Global avatar - if ( DBGetContactSettingTString(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) + if ( db_get_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) return -10; AVS_pathToAbsolute(dbv.ptszVal, tszFilename); @@ -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 ( !db_get_ts(NULL, szProto, "AvatarFile", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, tszFilename); db_free(&dbv); } @@ -546,7 +546,7 @@ int CreateAvatarInCache(HANDLE hContact, avatarCacheEntry *ace, char *szProto) if (imgHash != db_get_dw(hContact, "ContactPhoto", "ImageHash", 0)) { ResetTranspSettings(hContact); - DBWriteContactSettingDword(hContact, "ContactPhoto", "ImageHash", imgHash); + db_set_dw(hContact, "ContactPhoto", "ImageHash", imgHash); } // Make transparent? @@ -1095,7 +1095,7 @@ static void FilterGetStrings(TCHAR *filter, int bytesLeft, BOOL xml, BOOL swf) static void DeleteGlobalUserAvatar() { DBVARIANT dbv = {0}; - if (DBGetContactSettingTString(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) + if (db_get_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) return; TCHAR szFilename[MAX_PATH]; @@ -1135,7 +1135,7 @@ static int InternalRemoveMyAvatar(char *protocol) { // Has global avatar? DBVARIANT dbv = {0}; - if ( !DBGetContactSettingTString(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) { + if ( !db_get_ts(NULL, AVS_MODULE, "GlobalUserAvatarFile", &dbv)) { db_free(&dbv); db_set_b(NULL, AVS_MODULE, "GlobalUserAvatarNotConsistent", 1); DeleteGlobalUserAvatar(); diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index b720b900fc..46908870fa 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -400,7 +400,7 @@ INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wParam, LPA g_selectedProto = GetProtoFromList(hwndDlg, iItem); if ( g_selectedProto ) { DBVARIANT dbv; - if ( !DBGetContactSettingTString(NULL, PPICT_MODULE, g_selectedProto, &dbv)) { + if ( !db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) { if ( !AVS_pathIsAbsolute(dbv.ptszVal)) { TCHAR szFinalPath[MAX_PATH]; mir_sntprintf(szFinalPath, SIZEOF(szFinalPath), _T("%%miranda_path%%\\%s"), dbv.ptszVal); @@ -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 ( !db_get_ts(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 ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) { DeleteFile(dbv.ptszVal); db_free(&dbv); } @@ -708,15 +708,15 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA szFinalName[0] = 0; - if (is_locked && !DBGetContactSettingTString(hContact, "ContactPhoto", "Backup", &dbv)) { + if (is_locked && !db_get_ts(hContact, "ContactPhoto", "Backup", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, szFinalName); db_free(&dbv); } - else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "RFile", &dbv)) { + else if ( !db_get_ts(hContact, "ContactPhoto", "RFile", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, szFinalName); db_free(&dbv); } - else if ( !DBGetContactSettingTString(hContact, "ContactPhoto", "File", &dbv)) { + else if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) { AVS_pathToAbsolute(dbv.ptszVal, szFinalName); db_free(&dbv); } @@ -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 ( !db_get_ts(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 ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) { DeleteFile(dbv.ptszVal); db_free(&dbv); } -- cgit v1.2.3