summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/clist/Docking.cpp2
-rw-r--r--src/modules/clist/clcmsgs.cpp2
-rw-r--r--src/modules/clist/clistmenus.cpp2
-rw-r--r--src/modules/clist/clistmod.cpp6
-rw-r--r--src/modules/clist/clui.cpp14
-rw-r--r--src/modules/clist/contact.cpp7
-rw-r--r--src/modules/clist/genmenu.cpp2
-rw-r--r--src/modules/clist/genmenuopt.cpp4
-rw-r--r--src/modules/database/dbini.cpp2
-rw-r--r--src/modules/findadd/searchresults.cpp6
-rw-r--r--src/modules/fonts/FontOptions.cpp16
-rw-r--r--src/modules/icolib/skin2opts.cpp4
-rw-r--r--src/modules/ignore/ignore.cpp2
-rw-r--r--src/modules/netlib/netliblog.cpp22
-rw-r--r--src/modules/netlib/netlibopts.cpp16
-rw-r--r--src/modules/options/options.cpp4
-rw-r--r--src/modules/plugins/newplugins.cpp2
-rw-r--r--src/modules/protocols/protoaccs.cpp4
-rw-r--r--src/modules/skin/hotkey_opts.cpp8
-rw-r--r--src/modules/skin/hotkeys.cpp2
-rw-r--r--src/modules/skin/sounds.cpp4
-rw-r--r--src/modules/utils/timezones.cpp2
22 files changed, 66 insertions, 67 deletions
diff --git a/src/modules/clist/Docking.cpp b/src/modules/clist/Docking.cpp
index c2aeafec93..cfcfc2a36d 100644
--- a/src/modules/clist/Docking.cpp
+++ b/src/modules/clist/Docking.cpp
@@ -149,7 +149,7 @@ int fnDocking_ProcessWindowMessage(WPARAM wParam, LPARAM lParam)
{
if (docked)
{
- DBWriteContactSettingByte(NULL, "CList", "Docked", (BYTE) docked);
+ db_set_b(NULL, "CList", "Docked", (BYTE) docked);
db_set_dw(NULL, "CList", "DockX", (DWORD) dockPos.x);
db_set_dw(NULL, "CList", "DockY", (DWORD) dockPos.y);
}
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp
index 3492ef3438..b772f3bad0 100644
--- a/src/modules/clist/clcmsgs.cpp
+++ b/src/modules/clist/clcmsgs.cpp
@@ -419,7 +419,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
break;
case CLM_SETHIDEOFFLINEROOT:
- DBWriteContactSettingByte(NULL, "CLC", "HideOfflineRoot", (BYTE) wParam);
+ db_set_b(NULL, "CLC", "HideOfflineRoot", (BYTE) wParam);
SendMessage(hwnd, CLM_AUTOREBUILD, 0, 0);
break;
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 5e33c150ce..567fa0c1f2 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -577,7 +577,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM)
char szHumanName[64] = {0};
PROTOACCOUNT * acc = Proto_GetAccount(smep->proto);
int i = (db_get_b(NULL, prot, "LockMainStatus", 0)?0:1);
- DBWriteContactSettingByte(NULL, prot, "LockMainStatus", (BYTE)i);
+ db_set_b(NULL, prot, "LockMainStatus", (BYTE)i);
CallProtoServiceInt(NULL,smep->proto, PS_GETNAME, (WPARAM)SIZEOF(szHumanName), (LPARAM)szHumanName);
pimi = MO_GetIntMenuItem((HGENMENU)smep->protoindex);
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp
index 962b733987..cb14eb0c42 100644
--- a/src/modules/clist/clistmod.cpp
+++ b/src/modules/clist/clistmod.cpp
@@ -402,7 +402,7 @@ int fnShowHide(WPARAM, LPARAM)
SetWindowPos(cli.hwndContactList, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
SetForegroundWindow(cli.hwndContactList);
- DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_NORMAL);
+ db_set_b(NULL, "CList", "State", SETTING_STATE_NORMAL);
//this forces the window onto the visible screen
GetWindowRect(cli.hwndContactList, &rcWindow);
@@ -415,11 +415,11 @@ int fnShowHide(WPARAM, LPARAM)
if (db_get_b(NULL, "CList", "ToolWindow", SETTING_TOOLWINDOW_DEFAULT) ||
db_get_b(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
ShowWindow(cli.hwndContactList, SW_HIDE);
- DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_HIDDEN);
+ db_set_b(NULL, "CList", "State", SETTING_STATE_HIDDEN);
}
else {
ShowWindow(cli.hwndContactList, SW_MINIMIZE);
- DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
+ db_set_b(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
}
if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp
index 1a0c9e9410..c51530f676 100644
--- a/src/modules/clist/clui.cpp
+++ b/src/modules/clist/clui.cpp
@@ -204,7 +204,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
status = CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0);
if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
// Set a flag so we remember to delete the contact when the protocol goes online the next time
- DBWriteContactSettingByte((HANDLE)wParam, "CList", "Delete", 1);
+ db_set_b((HANDLE)wParam, "CList", "Delete", 1);
MessageBox(NULL,
TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
TranslateT("Delete Contact"), MB_OK);
@@ -217,7 +217,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
// Archive contact
case IDC_HIDE:
- DBWriteContactSettingByte((HANDLE)wParam, "CList", "Hidden", 1);
+ db_set_b((HANDLE)wParam, "CList", "Hidden", 1);
break;
}
@@ -570,9 +570,9 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
if (wParam == SIZE_MINIMIZED) {
if ((GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOOLWINDOW) || db_get_b(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT)) {
ShowWindow(hwnd, SW_HIDE);
- DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_HIDDEN);
+ db_set_b(NULL, "CList", "State", SETTING_STATE_HIDDEN);
}
- else DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
+ else db_set_b(NULL, "CList", "State", SETTING_STATE_MINIMIZED);
if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
@@ -723,7 +723,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
db_get_b(NULL, "CList", "Min2Tray", SETTING_MIN2TRAY_DEFAULT))
{
ShowWindow(hwnd, SW_HIDE);
- DBWriteContactSettingByte(NULL, "CList", "State", SETTING_STATE_HIDDEN);
+ db_set_b(NULL, "CList", "State", SETTING_STATE_HIDDEN);
if (MySetProcessWorkingSetSize != NULL && db_get_b(NULL, "CList", "DisableWorkingSet", 1))
MySetProcessWorkingSetSize(GetCurrentProcess(), -1, -1);
@@ -766,7 +766,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case POPUP_HIDEEMPTYGROUPS:
{
int newVal = !(GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_HIDEEMPTYGROUPS);
- DBWriteContactSettingByte(NULL, "CList", "HideEmptyGroups", (BYTE) newVal);
+ db_set_b(NULL, "CList", "HideEmptyGroups", (BYTE) newVal);
SendMessage(cli.hwndContactTree, CLM_SETHIDEEMPTYGROUPS, newVal, 0);
}
break;
@@ -774,7 +774,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
case POPUP_DISABLEGROUPS:
{
int newVal = !(GetWindowLongPtr(cli.hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
- DBWriteContactSettingByte(NULL, "CList", "UseGroups", (BYTE) newVal);
+ db_set_b(NULL, "CList", "UseGroups", (BYTE) newVal);
SendMessage(cli.hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
}
break;
diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp
index becd06f2a3..76cb8960c7 100644
--- a/src/modules/clist/contact.cpp
+++ b/src/modules/clist/contact.cpp
@@ -178,14 +178,13 @@ int fnSetHideOffline(WPARAM wParam, LPARAM)
{
switch((int)wParam) {
case 0:
- DBWriteContactSettingByte(NULL, "CList", "HideOffline", 0);
+ db_set_b(NULL, "CList", "HideOffline", 0);
break;
case 1:
- DBWriteContactSettingByte(NULL, "CList", "HideOffline", 1);
+ db_set_b(NULL, "CList", "HideOffline", 1);
break;
case -1:
- DBWriteContactSettingByte(NULL, "CList", "HideOffline",
- (BYTE) ! db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
+ db_set_b(NULL, "CList", "HideOffline", !db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
break;
}
cli.pfnLoadContactTree();
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp
index 02ffb598ed..e3b81c23e4 100644
--- a/src/modules/clist/genmenu.cpp
+++ b/src/modules/clist/genmenu.cpp
@@ -913,7 +913,7 @@ HMENU BuildRecursiveMenu(HMENU hMenu, PMO_IntMenuItem pRootMenu, ListParam *para
// check if it visible
mir_snprintf(DBString, SIZEOF(DBString), "%s_visible", menuItemName);
if (db_get_b(NULL, MenuNameItems, DBString, -1) == -1)
- DBWriteContactSettingByte(NULL, MenuNameItems, DBString, 1);
+ db_set_b(NULL, MenuNameItems, DBString, 1);
pmi->OverrideShow = TRUE;
if ( !db_get_b(NULL, MenuNameItems, DBString, 1)) {
diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp
index 40dc80a597..2d31c862c8 100644
--- a/src/modules/clist/genmenuopt.cpp
+++ b/src/modules/clist/genmenuopt.cpp
@@ -104,7 +104,7 @@ static int SaveTree(HWND hwndDlg)
GetMenuItemName(iod->pimi, menuItemName, sizeof(menuItemName));
mir_snprintf(DBString, SIZEOF(DBString), "%s_visible", menuItemName);
- DBWriteContactSettingByte(NULL, MenuNameItems, DBString, iod->show);
+ db_set_b(NULL, MenuNameItems, DBString, iod->show);
mir_snprintf(DBString, SIZEOF(DBString), "%s_pos", menuItemName);
db_set_dw(NULL, MenuNameItems, DBString, runtimepos);
@@ -537,7 +537,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case 0:
if (hdr->code == PSN_APPLY) {
bIconsDisabled = IsDlgButtonChecked(hwndDlg, IDC_DISABLEMENUICONS) != 0;
- DBWriteContactSettingByte(NULL, "CList", "DisableMenuIcons", bIconsDisabled);
+ db_set_b(NULL, "CList", "DisableMenuIcons", bIconsDisabled);
SaveTree(hwndDlg);
int iNewMenuValue = IsDlgButtonChecked(hwndDlg, IDC_RADIO1) ? 0 : 1;
if (iNewMenuValue != dat->iInitMenuValue) {
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index 775352cf99..f43e0ac733 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -310,7 +310,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
switch(szValue[0]) {
case 'b':
case 'B':
- DBWriteContactSettingByte(NULL, szSection, szName, (BYTE)strtol(szValue+1, NULL, 0));
+ db_set_b(NULL, szSection, szName, (BYTE)strtol(szValue+1, NULL, 0));
break;
case 'w':
case 'W':
diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp
index 8804df5b22..8393fbc4b6 100644
--- a/src/modules/findadd/searchresults.cpp
+++ b/src/modules/findadd/searchresults.cpp
@@ -47,13 +47,13 @@ void SaveColumnSizes(HWND hwndResults)
ListView_GetColumnOrderArray(hwndResults, columnCount, columnOrder);
for (i=0; i < NUM_COLUMNID; i++) {
mir_snprintf(szSetting, SIZEOF(szSetting), "ColOrder%d", i);
- DBWriteContactSettingByte(NULL, "FindAdd", szSetting, (BYTE)columnOrder[i]);
+ db_set_b(NULL, "FindAdd", szSetting, (BYTE)columnOrder[i]);
if (i>=columnCount) continue;
mir_snprintf(szSetting, SIZEOF(szSetting), "ColWidth%d", i);
DBWriteContactSettingWord(NULL, "FindAdd", szSetting, (WORD)ListView_GetColumnWidth(hwndResults, i));
}
- DBWriteContactSettingByte(NULL, "FindAdd", "SortColumn", (BYTE)dat->iLastColumnSortIndex);
- DBWriteContactSettingByte(NULL, "FindAdd", "SortAscending", (BYTE)dat->bSortAscending);
+ db_set_b(NULL, "FindAdd", "SortColumn", (BYTE)dat->iLastColumnSortIndex);
+ db_set_b(NULL, "FindAdd", "SortAscending", (BYTE)dat->bSortAscending);
}
static const TCHAR *szColumnNames[] = { NULL, NULL, _T("Nick"), _T("First Name"), _T("Last Name"), _T("E-mail") };
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp
index 3b1c218107..f95b590912 100644
--- a/src/modules/fonts/FontOptions.cpp
+++ b/src/modules/fonts/FontOptions.cpp
@@ -418,9 +418,9 @@ static void sttSaveCollapseState(HWND hwndTree)
if (tvi.cChildren > 0) {
treeItem = (TreeItem *)tvi.lParam;
if (tvi.state & TVIS_EXPANDED)
- DBWriteContactSettingByte(NULL, "FontServiceUI", treeItem->paramName, TVIS_EXPANDED);
+ db_set_b(NULL, "FontServiceUI", treeItem->paramName, TVIS_EXPANDED);
else
- DBWriteContactSettingByte(NULL, "FontServiceUI", treeItem->paramName, 0);
+ db_set_b(NULL, "FontServiceUI", treeItem->paramName, 0);
}
ht = TreeView_GetChild(hwndTree, hti);
@@ -545,19 +545,19 @@ static void sttSaveFontData(HWND hwndDlg, FontInternal &F)
SelectObject(hdc, hOldFont);
DeleteObject(hFont);
- DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, (char)size.cy);
+ db_set_b(NULL, F.dbSettingsGroup, str, (char)size.cy);
}
else if (F.flags & FIDF_SAVEPOINTSIZE) {
HDC hdc = GetDC(hwndDlg);
- DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, (BYTE)-MulDiv(F.value.size, 72, GetDeviceCaps(hdc, LOGPIXELSY)));
+ db_set_b(NULL, F.dbSettingsGroup, str, (BYTE)-MulDiv(F.value.size, 72, GetDeviceCaps(hdc, LOGPIXELSY)));
ReleaseDC(hwndDlg, hdc);
}
- else DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, F.value.size);
+ else db_set_b(NULL, F.dbSettingsGroup, str, F.value.size);
mir_snprintf(str, SIZEOF(str), "%sSty", F.prefix);
- DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, F.value.style);
+ db_set_b(NULL, F.dbSettingsGroup, str, F.value.style);
mir_snprintf(str, SIZEOF(str), "%sSet", F.prefix);
- DBWriteContactSettingByte(NULL, F.dbSettingsGroup, str, F.value.charset);
+ db_set_b(NULL, F.dbSettingsGroup, str, F.value.charset);
mir_snprintf(str, SIZEOF(str), "%sCol", F.prefix);
db_set_dw(NULL, F.dbSettingsGroup, str, F.value.colour);
if (F.flags & FIDF_NOAS) {
@@ -1193,7 +1193,7 @@ static INT_PTR CALLBACK DlgProcLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam,
EffectInternal& E = effect_id_list_w2[i];
mir_snprintf(str, SIZEOF(str), "%sEffect", E.setting);
- DBWriteContactSettingByte(NULL, E.dbSettingsGroup, str, E.value.effectIndex);
+ db_set_b(NULL, E.dbSettingsGroup, str, E.value.effectIndex);
mir_snprintf(str, SIZEOF(str), "%sEffectCol1", E.setting);
db_set_dw(NULL, E.dbSettingsGroup, str, E.value.baseColour);
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index f5bb3ffa06..9b2c341b64 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -623,9 +623,9 @@ static void SaveCollapseState(HWND hwndTree)
if (tvi.cChildren > 0) {
TreeItem *treeItem = (TreeItem *)tvi.lParam;
if (tvi.state & TVIS_EXPANDED)
- DBWriteContactSettingByte(NULL, "SkinIconsUI", treeItem->paramName, TVIS_EXPANDED);
+ db_set_b(NULL, "SkinIconsUI", treeItem->paramName, TVIS_EXPANDED);
else
- DBWriteContactSettingByte(NULL, "SkinIconsUI", treeItem->paramName, 0);
+ db_set_b(NULL, "SkinIconsUI", treeItem->paramName, 0);
}
HTREEITEM ht = TreeView_GetChild(hwndTree, hti);
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp
index 47a48a027c..080e83a7a7 100644
--- a/src/modules/ignore/ignore.cpp
+++ b/src/modules/ignore/ignore.cpp
@@ -305,7 +305,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
if (SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
DBDeleteContactSetting(hContact, "CList", "Hidden");
else
- DBWriteContactSettingByte(hContact, "CList", "Hidden", 1);
+ db_set_b(hContact, "CList", "Hidden", 1);
}
while (hContact = db_find_next(hContact));
SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), NULL, hItemAll, "Default1");
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp
index 4eac00a0c4..01f5855e10 100644
--- a/src/modules/netlib/netliblog.cpp
+++ b/src/modules/netlib/netliblog.cpp
@@ -211,7 +211,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
GetDlgItemText(hwndDlg, IDC_RUNATSTART, str, MAX_PATH);
db_set_ts(NULL, "Netlib", "RunAtStart", str);
- DBWriteContactSettingByte(NULL, "Netlib", "ShowLogOptsAtStart", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTHISDLGATSTART));
+ db_set_b(NULL, "Netlib", "ShowLogOptsAtStart", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_SHOWTHISDLGATSTART));
mir_cslock lck(logOptions.cs);
@@ -264,16 +264,16 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
}
if (logOptions.save) {
- DBWriteContactSettingByte(NULL, "Netlib", "DumpRecv", (BYTE)logOptions.dumpRecv);
- DBWriteContactSettingByte(NULL, "Netlib", "DumpSent", (BYTE)logOptions.dumpSent);
- DBWriteContactSettingByte(NULL, "Netlib", "DumpProxy", (BYTE)logOptions.dumpProxy);
- DBWriteContactSettingByte(NULL, "Netlib", "DumpSsl", (BYTE)logOptions.dumpSsl);
- DBWriteContactSettingByte(NULL, "Netlib", "TextDumps", (BYTE)logOptions.textDumps);
- DBWriteContactSettingByte(NULL, "Netlib", "AutoDetectText", (BYTE)logOptions.autoDetectText);
- DBWriteContactSettingByte(NULL, "Netlib", "TimeFormat", (BYTE)logOptions.timeFormat);
- DBWriteContactSettingByte(NULL, "Netlib", "ShowUser", (BYTE)logOptions.showUser);
- DBWriteContactSettingByte(NULL, "Netlib", "ToOutputDebugString", (BYTE)logOptions.toOutputDebugString);
- DBWriteContactSettingByte(NULL, "Netlib", "ToFile", (BYTE)logOptions.toFile);
+ db_set_b(NULL, "Netlib", "DumpRecv", (BYTE)logOptions.dumpRecv);
+ db_set_b(NULL, "Netlib", "DumpSent", (BYTE)logOptions.dumpSent);
+ db_set_b(NULL, "Netlib", "DumpProxy", (BYTE)logOptions.dumpProxy);
+ db_set_b(NULL, "Netlib", "DumpSsl", (BYTE)logOptions.dumpSsl);
+ db_set_b(NULL, "Netlib", "TextDumps", (BYTE)logOptions.textDumps);
+ db_set_b(NULL, "Netlib", "AutoDetectText", (BYTE)logOptions.autoDetectText);
+ db_set_b(NULL, "Netlib", "TimeFormat", (BYTE)logOptions.timeFormat);
+ db_set_b(NULL, "Netlib", "ShowUser", (BYTE)logOptions.showUser);
+ db_set_b(NULL, "Netlib", "ToOutputDebugString", (BYTE)logOptions.toOutputDebugString);
+ db_set_b(NULL, "Netlib", "ToFile", (BYTE)logOptions.toFile);
db_set_ts(NULL, "Netlib", "File", logOptions.szFile ? logOptions.szUserFile: _T(""));
logOptions.save = 0;
}
diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp
index 19548210b5..1131980bc5 100644
--- a/src/modules/netlib/netlibopts.cpp
+++ b/src/modules/netlib/netlibopts.cpp
@@ -196,23 +196,23 @@ static void WriteSettingsStructToDb(const char *szSettingsModule, NETLIBUSERSETT
{
if (flags & NUF_OUTGOING) {
char szEncodedPassword[512];
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLValidateSSL", (BYTE)settings->validateSSL);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLUseProxy", (BYTE)settings->useProxy);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLProxyType", (BYTE)settings->proxyType);
+ db_set_b(NULL, szSettingsModule, "NLValidateSSL", (BYTE)settings->validateSSL);
+ db_set_b(NULL, szSettingsModule, "NLUseProxy", (BYTE)settings->useProxy);
+ db_set_b(NULL, szSettingsModule, "NLProxyType", (BYTE)settings->proxyType);
DBWriteContactSettingString(NULL, szSettingsModule, "NLProxyServer", settings->szProxyServer?settings->szProxyServer:"");
DBWriteContactSettingWord(NULL, szSettingsModule, "NLProxyPort", (WORD)settings->wProxyPort);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLUseProxyAuth", (BYTE)settings->useProxyAuth);
+ db_set_b(NULL, szSettingsModule, "NLUseProxyAuth", (BYTE)settings->useProxyAuth);
DBWriteContactSettingString(NULL, szSettingsModule, "NLProxyAuthUser", settings->szProxyAuthUser?settings->szProxyAuthUser:"");
lstrcpynA(szEncodedPassword, settings->szProxyAuthPassword?settings->szProxyAuthPassword:"", SIZEOF(szEncodedPassword));
CallService(MS_DB_CRYPT_ENCODESTRING, SIZEOF(szEncodedPassword), (LPARAM)szEncodedPassword);
DBWriteContactSettingString(NULL, szSettingsModule, "NLProxyAuthPassword", szEncodedPassword);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLDnsThroughProxy", (BYTE)settings->dnsThroughProxy);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLSpecifyOutgoingPorts", (BYTE)settings->specifyOutgoingPorts);
+ db_set_b(NULL, szSettingsModule, "NLDnsThroughProxy", (BYTE)settings->dnsThroughProxy);
+ db_set_b(NULL, szSettingsModule, "NLSpecifyOutgoingPorts", (BYTE)settings->specifyOutgoingPorts);
DBWriteContactSettingString(NULL, szSettingsModule, "NLOutgoingPorts", settings->szOutgoingPorts?settings->szOutgoingPorts:"");
}
if (flags & NUF_INCOMING) {
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLEnableUPnP", (BYTE)settings->enableUPnP);
- DBWriteContactSettingByte(NULL, szSettingsModule, "NLSpecifyIncomingPorts", (BYTE)settings->specifyIncomingPorts);
+ db_set_b(NULL, szSettingsModule, "NLEnableUPnP", (BYTE)settings->enableUPnP);
+ db_set_b(NULL, szSettingsModule, "NLSpecifyIncomingPorts", (BYTE)settings->specifyIncomingPorts);
DBWriteContactSettingString(NULL, szSettingsModule, "NLIncomingPorts", settings->szIncomingPorts?settings->szIncomingPorts:"");
}
}
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index b1d5e2ac3b..56f15f7c86 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -191,7 +191,7 @@ static void SaveOptionsTreeState(HWND hdlg)
while (tvi.hItem != NULL) {
if (SendMessageA( GetDlgItem(hdlg, IDC_PAGETREE), TVM_GETITEMA, 0, (LPARAM)&tvi)) {
mir_snprintf(buf, SIZEOF(buf), "%s%s", OPTSTATE_PREFIX, str);
- DBWriteContactSettingByte(NULL, "Options", buf, (BYTE)((tvi.state&TVIS_EXPANDED)?1:0));
+ db_set_b(NULL, "Options", buf, (BYTE)((tvi.state&TVIS_EXPANDED)?1:0));
}
tvi.hItem = TreeView_GetNextSibling( GetDlgItem(hdlg, IDC_PAGETREE), tvi.hItem);
} }
@@ -1132,7 +1132,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L
break;
case IDC_MODERN:
- DBWriteContactSettingByte(NULL, "Options", "Expert", 0);
+ db_set_b(NULL, "Options", "Expert", 0);
SaveOptionsTreeState(hdlg);
PostMessage(hdlg, WM_CLOSE, 0, 0);
CallService(MS_MODERNOPT_SHOW, 0, 0);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 4c971519c6..753720efb1 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -476,7 +476,7 @@ void SetPluginOnWhiteList(const TCHAR* pluginname, int allow)
char plugName[MAX_PATH];
strncpy(plugName, StrConvA(pluginname), SIZEOF(plugName));
strlwr(plugName);
- DBWriteContactSettingByte(NULL, PLUGINDISABLELIST, plugName, allow == 0);
+ db_set_b(NULL, PLUGINDISABLELIST, plugName, allow == 0);
}
// returns 1 if the plugin should be enabled within this profile, filename is always lower case
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index b753f78963..fff20b30c2 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -234,7 +234,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM)
BuildProtoMenus();
if (count == 0 && !db_get_b(NULL, "FirstRun", "AccManager", 0)) {
- DBWriteContactSettingByte(NULL, "FirstRun", "AccManager", 1);
+ db_set_b(NULL, "FirstRun", "AccManager", 1);
CallService(MS_PROTO_SHOWACCMGR, 0, 0);
}
return 0;
@@ -618,7 +618,7 @@ void BuildProtoMenus()
void RebuildProtoMenus(int iNewValue)
{
- DBWriteContactSettingByte(NULL, "CList", "MoveProtoMenus", iNewValue);
+ db_set_b(NULL, "CList", "MoveProtoMenus", iNewValue);
RebuildMenuOrder();
BuildProtoMenus();
diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp
index 3e6a30c76c..03aa7bbd7b 100644
--- a/src/modules/skin/hotkey_opts.cpp
+++ b/src/modules/skin/hotkey_opts.cpp
@@ -326,9 +326,9 @@ static void sttOptionsSaveItem(THotkeyItem *item)
item->Enabled = item->OptEnabled;
DBWriteContactSettingWord(NULL, DBMODULENAME, item->pszName, item->Hotkey);
- DBWriteContactSettingByte(NULL, DBMODULENAME "Off", item->pszName, (BYTE)!item->Enabled);
+ db_set_b(NULL, DBMODULENAME "Off", item->pszName, (BYTE)!item->Enabled);
if (item->type != HKT_MANUAL)
- DBWriteContactSettingByte(NULL, DBMODULENAME "Types", item->pszName, (BYTE)item->type);
+ db_set_b(NULL, DBMODULENAME "Types", item->pszName, (BYTE)item->type);
item->nSubHotkeys = 0;
for (i=0; i < hotkeys.getCount(); i++) {
@@ -340,7 +340,7 @@ static void sttOptionsSaveItem(THotkeyItem *item)
mir_snprintf(buf, SIZEOF(buf), "%s$%d", item->pszName, item->nSubHotkeys);
DBWriteContactSettingWord(NULL, DBMODULENAME, buf, subItem->Hotkey);
if (subItem->type != HKT_MANUAL)
- DBWriteContactSettingByte(NULL, DBMODULENAME "Types", buf, (BYTE)subItem->type);
+ db_set_b(NULL, DBMODULENAME "Types", buf, (BYTE)subItem->type);
++item->nSubHotkeys;
} }
@@ -993,7 +993,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
lvi.iSubItem = 1;
ListView_GetItem(hwndHotkey, &lvi);
- DBWriteContactSettingByte(NULL, DBMODULENAME "UI", _T2A(lvi.pszText), ListView_GetCheckState(hwndHotkey, lvi.iItem));
+ db_set_b(NULL, DBMODULENAME "UI", _T2A(lvi.pszText), ListView_GetCheckState(hwndHotkey, lvi.iItem));
}
}
}
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp
index bafb4f5d42..96f1f7c268 100644
--- a/src/modules/skin/hotkeys.cpp
+++ b/src/modules/skin/hotkeys.cpp
@@ -382,7 +382,7 @@ int LoadSkinHotkeys(void)
mir_snprintf(szSetting, SIZEOF(szSetting), "HKEn%s", oldSettings[i]);
if ((key = db_get_b(NULL, "Clist", szSetting, 0))) {
DBDeleteContactSetting(NULL, "Clist", szSetting);
- DBWriteContactSettingByte(NULL, DBMODULENAME "Off", newSettings[i], (BYTE)(key == 0));
+ db_set_b(NULL, DBMODULENAME "Off", newSettings[i], (BYTE)(key == 0));
}
}
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 104229ab7d..42e51898ed 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -329,7 +329,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
switch(((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_APPLY) {
- DBWriteContactSettingByte(NULL, "Skin", "UseSound", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
+ db_set_b(NULL, "Skin", "UseSound", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
for (int i=0; i < arSounds.getCount(); i++)
if (arSounds[i].ptszTempFile)
@@ -351,7 +351,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
cgs.szSetting = arSounds[tvic.lParam].name;
CallService(MS_DB_CONTACT_DELETESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cgs);
}
- else DBWriteContactSettingByte(NULL, "SkinSoundsOff", arSounds[tvic.lParam].name, 1);
+ else db_set_b(NULL, "SkinSoundsOff", arSounds[tvic.lParam].name, 1);
tvic.hItem = TreeView_GetNextSibling(hwndTree, tvic.hItem);
} }
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp
index 5342b82d5c..2f7153442b 100644
--- a/src/modules/utils/timezones.cpp
+++ b/src/modules/utils/timezones.cpp
@@ -249,7 +249,7 @@ static void timeapiSetInfoByContact(HANDLE hContact, HANDLE hTZ)
if (tz)
{
db_set_ts(hContact, "UserInfo", "TzName", tz->tszName);
- DBWriteContactSettingByte(hContact, "UserInfo", "Timezone", (char)((tz->tzi.Bias + tz->tzi.StandardBias) / 30));
+ db_set_b(hContact, "UserInfo", "Timezone", (char)((tz->tzi.Bias + tz->tzi.StandardBias) / 30));
}
else
{