summaryrefslogtreecommitdiff
path: root/src/modules/clist
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/clist')
-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
8 files changed, 19 insertions, 20 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) {