summaryrefslogtreecommitdiff
path: root/src/modules/skin
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/skin')
-rw-r--r--src/modules/skin/hotkey_opts.cpp4
-rw-r--r--src/modules/skin/hotkeys.cpp6
-rw-r--r--src/modules/skin/skinicons.cpp12
-rw-r--r--src/modules/skin/sounds.cpp10
4 files changed, 16 insertions, 16 deletions
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp
index ed6a4bd40b..07c31fdc91 100644
--- a/src/modules/skin/hotkey_opts.cpp
+++ b/src/modules/skin/hotkey_opts.cpp
@@ -319,7 +319,7 @@ static void sttOptionsSaveItem(THotkeyItem *item)
item->type = item->OptType;
item->Enabled = item->OptEnabled;
- DBWriteContactSettingWord(NULL, DBMODULENAME, item->pszName, item->Hotkey);
+ db_set_w(NULL, DBMODULENAME, item->pszName, item->Hotkey);
db_set_b(NULL, DBMODULENAME "Off", item->pszName, (BYTE)!item->Enabled);
if (item->type != HKT_MANUAL)
db_set_b(NULL, DBMODULENAME "Types", item->pszName, (BYTE)item->type);
@@ -332,7 +332,7 @@ static void sttOptionsSaveItem(THotkeyItem *item)
subItem->type = subItem->OptType;
mir_snprintf(buf, SIZEOF(buf), "%s$%d", item->pszName, item->nSubHotkeys);
- DBWriteContactSettingWord(NULL, DBMODULENAME, buf, subItem->Hotkey);
+ db_set_w(NULL, DBMODULENAME, buf, subItem->Hotkey);
if (subItem->type != HKT_MANUAL)
db_set_b(NULL, DBMODULENAME "Types", buf, (BYTE)subItem->type);
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index d7635de2d5..4da60bfbb8 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -375,13 +375,13 @@ int LoadSkinHotkeys(void)
WORD key;
if ((key = db_get_w(NULL, "Clist", szSetting, 0))) {
- DBDeleteContactSetting(NULL, "Clist", szSetting);
- DBWriteContactSettingWord(NULL, DBMODULENAME, newSettings[i], key);
+ db_unset(NULL, "Clist", szSetting);
+ db_set_w(NULL, DBMODULENAME, newSettings[i], key);
}
mir_snprintf(szSetting, SIZEOF(szSetting), "HKEn%s", oldSettings[i]);
if ((key = db_get_b(NULL, "Clist", szSetting, 0))) {
- DBDeleteContactSetting(NULL, "Clist", szSetting);
+ db_unset(NULL, "Clist", szSetting);
db_set_b(NULL, DBMODULENAME "Off", newSettings[i], (BYTE)(key == 0));
}
}
diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp
index cd959b877a..d2f602be45 100644
--- a/src/modules/skin/skinicons.cpp
+++ b/src/modules/skin/skinicons.cpp
@@ -380,13 +380,13 @@ static void convertOneProtocol(char *moduleName, char *iconName)
_itoa(statusIcons[i].id, pm, 10);
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, "Icons", moduleName, &dbv)) {
+ if ( !db_get_ts(NULL, "Icons", moduleName, &dbv)) {
_itoa(i, pi, 10);
db_set_ts(NULL, "SkinIcons", iconName, dbv.ptszVal);
db_free(&dbv);
- DBDeleteContactSetting(NULL, "Icons", moduleName);
+ db_unset(NULL, "Icons", moduleName);
} } }
static INT_PTR sttLoadSkinIcon(WPARAM wParam, LPARAM lParam)
@@ -422,7 +422,7 @@ int LoadSkinIcons(void)
for (i=0; i < SIZEOF(mainIcons); i++) {
_itoa(mainIcons[i].id, moduleName, 10);
- if (DBGetContactSettingTString(NULL, "Icons", moduleName, &dbv))
+ if (db_get_ts(NULL, "Icons", moduleName, &dbv))
break;
mir_snprintf(iconName, SIZEOF(iconName), "%s%d", mainIconsFmt, i);
@@ -430,7 +430,7 @@ int LoadSkinIcons(void)
db_set_ts(NULL, "SkinIcons", iconName, dbv.ptszVal);
db_free(&dbv);
- DBDeleteContactSetting(NULL, "Icons", moduleName);
+ db_unset(NULL, "Icons", moduleName);
}
for (;;) {
@@ -438,10 +438,10 @@ int LoadSkinIcons(void)
moduleName[0] = 'p';
moduleName[1] = 0;
_itoa(j++, moduleName+1, 100);
- if (DBGetContactSettingTString(NULL, "Icons", moduleName, &dbv))
+ if (db_get_ts(NULL, "Icons", moduleName, &dbv))
break;
- DBDeleteContactSetting(NULL, "Icons", moduleName);
+ db_unset(NULL, "Icons", moduleName);
// make old skinicons' prefix
mir_snprintf(moduleName, SIZEOF(moduleName), "%S", dbv.ptszVal);
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 614c99f1f4..aba9154f15 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -93,7 +93,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM wParam, LPARAM lParam)
if (ptszDefaultFile) {
DBVARIANT dbv;
- if (DBGetContactSettingString(NULL, "SkinSounds", item->name, &dbv))
+ if (db_get_s(NULL, "SkinSounds", item->name, &dbv))
db_set_ts(NULL, "SkinSounds", item->name, ptszDefaultFile);
else
db_free(&dbv);
@@ -139,7 +139,7 @@ static INT_PTR ServiceSkinPlaySound(WPARAM, LPARAM lParam)
return 1;
DBVARIANT dbv;
- if ( DBGetContactSettingTString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
+ if ( db_get_ts(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
ServiceSkinPlaySoundFile(0, (LPARAM)dbv.ptszVal);
db_free(&dbv);
return 0;
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
NotifyEventHooks(hPlayEvent, 1, (LPARAM)arSounds[tvi.lParam].ptszTempFile);
else {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
+ if ( !db_get_ts(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
TCHAR szPathFull[MAX_PATH];
PathToAbsoluteT(dbv.ptszVal, szPathFull);
NotifyEventHooks(hPlayEvent, 1, (LPARAM)szPathFull);
@@ -292,7 +292,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
else {
if (db_get_b(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
DBVARIANT dbv;
- if (DBGetContactSettingTString(NULL, "SkinSounds", snd.name, &dbv) == 0) {
+ if (db_get_ts(NULL, "SkinSounds", snd.name, &dbv) == 0) {
PathToAbsoluteT(dbv.ptszVal, strdir);
db_free(&dbv);
} } }
@@ -394,7 +394,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SetDlgItemText(hwndDlg, IDC_LOCATION, arSounds[tvi.lParam].ptszTempFile);
else {
DBVARIANT dbv;
- if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
+ if ( !db_get_ts(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
SetDlgItemText(hwndDlg, IDC_LOCATION, dbv.ptszVal);
db_free(&dbv);
}