summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/userprefs.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-26 20:04:19 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-26 20:04:19 +0000
commit0ff5363fc3c387364947df74da71790eb0c4c1a3 (patch)
tree73fec09994495436e38126530b2689fadb348d1d /plugins/TabSRMM/src/userprefs.cpp
parent10bf2c45f3592efcfb662c1c9cc7ba163f32a523 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@4205 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/userprefs.cpp')
-rw-r--r--plugins/TabSRMM/src/userprefs.cpp50
1 files changed, 23 insertions, 27 deletions
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp
index 7a99d15480..e594a6408c 100644
--- a/plugins/TabSRMM/src/userprefs.cpp
+++ b/plugins/TabSRMM/src/userprefs.cpp
@@ -193,24 +193,22 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
unsigned int iNewIEView;
switch (iMode) {
- case 0:
- M->WriteByte(hContact, SRMSGMOD_T, "ieview", 0);
- M->WriteByte(hContact, SRMSGMOD_T, "hpplog", 0);
- break;
- case 1:
- M->WriteByte(hContact, SRMSGMOD_T, "ieview", -1);
- M->WriteByte(hContact, SRMSGMOD_T, "hpplog", -1);
- break;
- case 2:
- M->WriteByte(hContact, SRMSGMOD_T, "ieview", -1);
- M->WriteByte(hContact, SRMSGMOD_T, "hpplog", 1);
- break;
- case 3:
- M->WriteByte(hContact, SRMSGMOD_T, "ieview", 1);
- M->WriteByte(hContact, SRMSGMOD_T, "hpplog", -1);
- break;
- default:
- break;
+ case 0:
+ M->WriteByte(hContact, SRMSGMOD_T, "ieview", 0);
+ M->WriteByte(hContact, SRMSGMOD_T, "hpplog", 0);
+ break;
+ case 1:
+ M->WriteByte(hContact, SRMSGMOD_T, "ieview", -1);
+ M->WriteByte(hContact, SRMSGMOD_T, "hpplog", -1);
+ break;
+ case 2:
+ M->WriteByte(hContact, SRMSGMOD_T, "ieview", -1);
+ M->WriteByte(hContact, SRMSGMOD_T, "hpplog", 1);
+ break;
+ case 3:
+ M->WriteByte(hContact, SRMSGMOD_T, "ieview", 1);
+ M->WriteByte(hContact, SRMSGMOD_T, "hpplog", -1);
+ break;
}
if (hWnd && dat) {
iNewIEView = GetIEViewMode(hWnd, dat->hContact);
@@ -222,7 +220,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
}
if ((iIndex = SendDlgItemMessage(hwndDlg, IDC_TEXTFORMATTING, CB_GETCURSEL, 0, 0)) != CB_ERR) {
if (iIndex == 0)
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "sendformat");
+ db_unset(hContact, SRMSGMOD_T, "sendformat");
else
M->WriteDword(hContact, SRMSGMOD_T, "sendformat", iIndex == 2 ? -1 : 1);
}
@@ -253,7 +251,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
bAvatarVisible = (BYTE)SendDlgItemMessage(hwndDlg, IDC_SHOWAVATAR, CB_GETCURSEL, 0, 0);
if (bAvatarVisible == 0)
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "hideavatar");
+ db_unset(hContact, SRMSGMOD_T, "hideavatar");
else
M->WriteByte(hContact, SRMSGMOD_T, "hideavatar", (BYTE)(bAvatarVisible == 1 ? 1 : 0));
@@ -283,7 +281,7 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
if (hWnd && dat)
dat->sendMode |= SMODE_NOACK;
} else {
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "no_ack");
+ db_unset(hContact, SRMSGMOD_T, "no_ack");
if (hWnd && dat)
dat->sendMode &= ~SMODE_NOACK;
}
@@ -297,8 +295,6 @@ static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam,
DestroyWindow(hwndDlg);
break;
}
- default:
- break;
}
break;
}
@@ -432,8 +428,8 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA
M->WriteDword(hContact, SRMSGMOD_T, "mwflags", dwFlags);
}
else {
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "mwmask");
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "mwflags");
+ db_unset(hContact, SRMSGMOD_T, "mwmask");
+ db_unset(hContact, SRMSGMOD_T, "mwflags");
}
if (hwnd && dat) {
if (dwMask)
@@ -444,8 +440,8 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA
break;
}
case IDC_REVERTGLOBAL:
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "mwmask");
- DBDeleteContactSetting(hContact, SRMSGMOD_T, "mwflags");
+ db_unset(hContact, SRMSGMOD_T, "mwmask");
+ db_unset(hContact, SRMSGMOD_T, "mwflags");
SendMessage(hwndDlg, WM_COMMAND, WM_USER + 200, 0);
break;
}