summaryrefslogtreecommitdiff
path: root/src/modules/skin
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-07 11:42:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-07 11:42:28 +0000
commit197fe77f67654cf8c46c53376190fc321176c08b (patch)
tree1a161cf7fb7968e3781b1d11771195d9b5e4c26c /src/modules/skin
parent4bcab3fc00696ca2daf1396bfc75bd49009644d6 (diff)
old database macros removed from m_database.h
git-svn-id: http://svn.miranda-ng.org/main/trunk@1796 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r--src/modules/skin/hotkey_opts.cpp4
-rw-r--r--src/modules/skin/hotkeys.cpp8
-rw-r--r--src/modules/skin/sounds.cpp10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp
index fb932ed7b7..9bf5bdc86e 100644
--- a/src/modules/skin/hotkey_opts.cpp
+++ b/src/modules/skin/hotkey_opts.cpp
@@ -346,7 +346,7 @@ static void sttOptionsSaveItem(THotkeyItem *item)
} }
mir_snprintf(buf, SIZEOF(buf), "%s$count", item->pszName);
- DBWriteContactSettingDword(NULL, DBMODULENAME, buf, item->nSubHotkeys);
+ db_set_dw(NULL, DBMODULENAME, buf, item->nSubHotkeys);
}
static void sttBuildHotkeyList(HWND hwndList)
@@ -506,7 +506,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
szSetting = mir_t2a(lvi.pszText);
ListView_SetCheckState(hwndHotkey, lvi.iItem,
- DBGetContactSettingByte(NULL, DBMODULENAME "UI", szSetting, TRUE));
+ db_get_b(NULL, DBMODULENAME "UI", szSetting, TRUE));
mir_free(szSetting);
}
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index b72a3ad3e2..1e72b380a1 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -166,14 +166,14 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam)
}
else {
item->pszName = mir_strdup(desc->pszName);
- item->Enabled = !DBGetContactSettingByte(NULL, DBMODULENAME "Off", item->pszName, 0);
+ item->Enabled = !db_get_b(NULL, DBMODULENAME "Off", item->pszName, 0);
}
item->pszService = desc->pszService ? mir_strdup(desc->pszService) : 0;
item->DefHotkey = desc->DefHotKey & ~HKF_MIRANDA_LOCAL;
item->Hotkey = DBGetContactSettingWord(NULL, DBMODULENAME, item->pszName, item->DefHotkey);
item->type = item->pszService ?
- (THotkeyType)DBGetContactSettingByte(NULL, DBMODULENAME "Types", item->pszName,
+ (THotkeyType)db_get_b(NULL, DBMODULENAME "Types", item->pszName,
(desc->DefHotKey & HKF_MIRANDA_LOCAL) ? HKT_LOCAL : HKT_GLOBAL) : HKT_MANUAL;
item->lParam = desc->lParam;
@@ -193,7 +193,7 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam)
/* try to load alternatives from db */
int count, i;
mir_snprintf(buf, SIZEOF(buf), "%s$count", item->pszName);
- count = (int)DBGetContactSettingDword(NULL, DBMODULENAME, buf, -1);
+ count = (int)db_get_dw(NULL, DBMODULENAME, buf, -1);
for (i=0; i < count; i++) {
mir_snprintf(buf, SIZEOF(buf), "%s$%d", item->pszName, i);
if ( !DBGetContactSettingWord(NULL, DBMODULENAME, buf, 0))
@@ -380,7 +380,7 @@ int LoadSkinHotkeys(void)
}
mir_snprintf(szSetting, SIZEOF(szSetting), "HKEn%s", oldSettings[i]);
- if ((key = DBGetContactSettingByte(NULL, "Clist", szSetting, 0))) {
+ if ((key = db_get_b(NULL, "Clist", szSetting, 0))) {
DBDeleteContactSetting(NULL, "Clist", szSetting);
DBWriteContactSettingByte(NULL, DBMODULENAME "Off", newSettings[i], (BYTE)(key == 0));
}
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index e9aa29ed9c..44b463eb96 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -106,7 +106,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM wParam, LPARAM lParam)
static int SkinPlaySoundDefault(WPARAM wParam, LPARAM lParam)
{
TCHAR* pszFile = (TCHAR*) lParam;
- if (pszFile && (DBGetContactSettingByte(NULL, "Skin", "UseSound", 0) || (int)wParam == 1))
+ if (pszFile && (db_get_b(NULL, "Skin", "UseSound", 0) || (int)wParam == 1))
PlaySound(pszFile, NULL, SND_ASYNC | SND_FILENAME | SND_NOSTOP);
return 0;
@@ -123,7 +123,7 @@ static INT_PTR ServiceSkinPlaySound(WPARAM, LPARAM lParam)
if (idx == -1)
return 1;
- if ( DBGetContactSettingByte(NULL, "SkinSoundsOff", pszSoundName, 0) == 0) {
+ if ( db_get_b(NULL, "SkinSoundsOff", pszSoundName, 0) == 0) {
DBVARIANT dbv;
if ( DBGetContactSettingTString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
TCHAR szFull[MAX_PATH];
@@ -151,7 +151,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
SendMessage(hwndDlg, DM_HIDEPANE, 0, 0);
SendMessage(hwndDlg, DM_REBUILD_STREE, 0, 0);
TreeView_SetItemState(hwndTree, 0, TVIS_SELECTED, TVIS_SELECTED);
- CheckDlgButton(hwndDlg, IDC_ENABLESOUNDS, DBGetContactSettingByte(NULL, "Skin", "UseSound", 0));
+ CheckDlgButton(hwndDlg, IDC_ENABLESOUNDS, db_get_b(NULL, "Skin", "UseSound", 0));
SendMessage(hwndDlg, DM_CHECKENABLED, 0, 0);
return TRUE;
@@ -178,7 +178,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
TreeView_SetItem(hwndTree, &tvis.item);
}
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK( !DBGetContactSettingByte(NULL, "SkinSoundsOff", arSounds[i].name, 0)?2:1);
+ tvis.item.state = INDEXTOSTATEIMAGEMASK( !db_get_b(NULL, "SkinSoundsOff", arSounds[i].name, 0)?2:1);
tvis.item.lParam = i;
tvis.item.pszText = arSounds[i].getDescr();
TreeView_InsertItem(hwndTree, &tvis);
@@ -278,7 +278,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (snd.ptszTempFile)
_tcsncpy(strFull, snd.ptszTempFile, SIZEOF(strFull));
else {
- if (DBGetContactSettingByte(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
+ if (db_get_b(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
DBVARIANT dbv;
if (DBGetContactSettingTString(NULL, "SkinSounds", snd.name, &dbv) == 0) {
PathToAbsoluteT(dbv.ptszVal, strdir, NULL);