summaryrefslogtreecommitdiff
path: root/src/modules/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/utils')
-rw-r--r--src/modules/utils/path.cpp2
-rw-r--r--src/modules/utils/timezones.cpp4
-rw-r--r--src/modules/utils/utils.cpp16
3 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 0ce1eae95a..9d2f543e4a 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -67,7 +67,7 @@ TCHAR *GetContactID(HANDLE hContact)
{
TCHAR *theValue = {0};
char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- if (DBGetContactSettingByte(hContact, szProto, "ChatRoom", 0) == 1) {
+ if (db_get_b(hContact, szProto, "ChatRoom", 0) == 1) {
DBVARIANT dbv;
if ( !DBGetContactSettingTString(hContact, szProto, "ChatRoomID", &dbv)) {
theValue = (TCHAR *)mir_tstrdup(dbv.ptszVal);
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp
index f1440464f4..81c883dd13 100644
--- a/src/modules/utils/timezones.cpp
+++ b/src/modules/utils/timezones.cpp
@@ -194,7 +194,7 @@ static HANDLE timeapiGetInfoByContact(HANDLE hContact, DWORD dwFlags)
if (res) return res;
}
- signed char timezone = (signed char)DBGetContactSettingByte(hContact, "UserInfo", "Timezone", -1);
+ signed char timezone = (signed char)db_get_b(hContact, "UserInfo", "Timezone", -1);
if (timezone == -1)
{
char* szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
@@ -204,7 +204,7 @@ static HANDLE timeapiGetInfoByContact(HANDLE hContact, DWORD dwFlags)
DBFreeVariant(&dbv);
if (res) return res;
}
- timezone = (signed char)DBGetContactSettingByte(hContact, szProto, "Timezone", -1);
+ timezone = (signed char)db_get_b(hContact, szProto, "Timezone", -1);
}
if (timezone != -1)
diff --git a/src/modules/utils/utils.cpp b/src/modules/utils/utils.cpp
index c4d88915be..f0fa1045c9 100644
--- a/src/modules/utils/utils.cpp
+++ b/src/modules/utils/utils.cpp
@@ -326,13 +326,13 @@ static INT_PTR SaveWindowPosition(WPARAM, LPARAM lParam)
wp.length = sizeof(wp);
GetWindowPlacement(swp->hwnd, &wp);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sx", swp->szNamePrefix);
- DBWriteContactSettingDword(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.left);
+ db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.left);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sy", swp->szNamePrefix);
- DBWriteContactSettingDword(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.top);
+ db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.top);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%swidth", swp->szNamePrefix);
- DBWriteContactSettingDword(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.right-wp.rcNormalPosition.left);
+ db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.right-wp.rcNormalPosition.left);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sheight", swp->szNamePrefix);
- DBWriteContactSettingDword(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.bottom-wp.rcNormalPosition.top);
+ db_set_dw(swp->hContact, swp->szModule, szSettingName, wp.rcNormalPosition.bottom-wp.rcNormalPosition.top);
return 0;
}
@@ -386,9 +386,9 @@ static INT_PTR RestoreWindowPosition(WPARAM wParam, LPARAM lParam)
wp.length = sizeof(wp);
GetWindowPlacement(swp->hwnd, &wp);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sx", swp->szNamePrefix);
- x = DBGetContactSettingDword(swp->hContact, swp->szModule, szSettingName, -1);
+ x = db_get_dw(swp->hContact, swp->szModule, szSettingName, -1);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sy", swp->szNamePrefix);
- y = (int)DBGetContactSettingDword(swp->hContact, swp->szModule, szSettingName, -1);
+ y = (int)db_get_dw(swp->hContact, swp->szModule, szSettingName, -1);
if (x == -1) return 1;
if (wParam&RWPF_NOSIZE) {
OffsetRect(&wp.rcNormalPosition, x-wp.rcNormalPosition.left, y-wp.rcNormalPosition.top);
@@ -397,9 +397,9 @@ static INT_PTR RestoreWindowPosition(WPARAM wParam, LPARAM lParam)
wp.rcNormalPosition.left = x;
wp.rcNormalPosition.top = y;
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%swidth", swp->szNamePrefix);
- wp.rcNormalPosition.right = wp.rcNormalPosition.left+DBGetContactSettingDword(swp->hContact, swp->szModule, szSettingName, -1);
+ wp.rcNormalPosition.right = wp.rcNormalPosition.left+db_get_dw(swp->hContact, swp->szModule, szSettingName, -1);
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sheight", swp->szNamePrefix);
- wp.rcNormalPosition.bottom = wp.rcNormalPosition.top+DBGetContactSettingDword(swp->hContact, swp->szModule, szSettingName, -1);
+ wp.rcNormalPosition.bottom = wp.rcNormalPosition.top+db_get_dw(swp->hContact, swp->szModule, szSettingName, -1);
}
wp.flags = 0;
if (wParam & RWPF_HIDDEN)