summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/KeepStatus/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus/options.cpp')
-rw-r--r--plugins/StatusPlugins/KeepStatus/options.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp
index eb02862138..c8dede9f74 100644
--- a/plugins/StatusPlugins/KeepStatus/options.cpp
+++ b/plugins/StatusPlugins/KeepStatus/options.cpp
@@ -37,11 +37,11 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L
SetDlgItemInt(hwndDlg, IDC_MAXRETRIES, db_get_b(NULL,MODULENAME,SETTING_MAXRETRIES,DEFAULT_MAXRETRIES),FALSE);
SetDlgItemInt(hwndDlg, IDC_INITDELAY, db_get_dw(NULL,MODULENAME,SETTING_INITDELAY,DEFAULT_INITDELAY),FALSE);
- CheckDlgButton(hwndDlg, IDC_CHECKCONNECTION, db_get_b(NULL, MODULENAME, SETTING_CHECKCONNECTION,FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_SHOWCONNECTIONPOPUPS, ( db_get_b(NULL, MODULENAME, SETTING_SHOWCONNECTIONPOPUPS,FALSE)&&ServiceExists(MS_POPUP_SHOWMESSAGE))?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CHKINET, db_get_b(NULL, MODULENAME, SETTING_CHKINET, FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CONTCHECK, db_get_b(NULL, MODULENAME, SETTING_CONTCHECK, FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_BYPING, db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHECKCONNECTION, db_get_b(NULL, MODULENAME, SETTING_CHECKCONNECTION,FALSE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_SHOWCONNECTIONPOPUPS, ( db_get_b(NULL, MODULENAME, SETTING_SHOWCONNECTIONPOPUPS,FALSE)&&ServiceExists(MS_POPUP_SHOWMESSAGE)) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHKINET, db_get_b(NULL, MODULENAME, SETTING_CHKINET, FALSE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CONTCHECK, db_get_b(NULL, MODULENAME, SETTING_CONTCHECK, FALSE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_BYPING, db_get_b(NULL, MODULENAME, SETTING_BYPING, FALSE) ? BST_CHECKED : BST_UNCHECKED);
if (!db_get(NULL, MODULENAME, SETTING_PINGHOST, &dbv))
SetDlgItemTextA(hwndDlg, IDC_PINGHOST, dbv.pszVal);
// proto list
@@ -169,12 +169,12 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg,UINT msg,WPARAM wParam,LPA
TranslateDialogDefault(hwndDlg);
SetDlgItemInt(hwndDlg, IDC_MAXDELAY, db_get_dw(NULL,MODULENAME,SETTING_MAXDELAY,DEFAULT_MAXDELAY),FALSE);
SetDlgItemInt(hwndDlg, IDC_MAXCONNECTINGTIME, db_get_dw(NULL,MODULENAME,SETTING_MAXCONNECTINGTIME,0),FALSE);
- CheckDlgButton(hwndDlg, IDC_INCREASEEXPONENTIAL, db_get_b(NULL, MODULENAME, SETTING_INCREASEEXPONENTIAL,FALSE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_CNCOTHERLOC, ( db_get_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, FALSE)&&(CallService(MS_SYSTEM_GETVERSION,0,0) >= 0x00040000))?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_LOGINERR, db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING)==LOGINERR_NOTHING?FALSE:TRUE);
- CheckDlgButton(hwndDlg, IDC_CHECKAPMRESUME, ( db_get_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, FALSE)&&(CallService(MS_SYSTEM_GETVERSION,0,0) >= 0x00040000))?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_FIRSTOFFLINE, ( db_get_b(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)));
- CheckDlgButton(hwndDlg, IDC_NOLOCKED, ( db_get_b(NULL, MODULENAME, SETTING_NOLOCKED, FALSE)));
+ CheckDlgButton(hwndDlg, IDC_INCREASEEXPONENTIAL, db_get_b(NULL, MODULENAME, SETTING_INCREASEEXPONENTIAL,FALSE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_CNCOTHERLOC, (db_get_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, FALSE)&&(CallService(MS_SYSTEM_GETVERSION,0,0) >= 0x00040000)) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_LOGINERR, db_get_b(NULL, MODULENAME, SETTING_LOGINERR, LOGINERR_NOTHING)==LOGINERR_NOTHING ? BST_UNCHECKED : BST_CHECKED);
+ CheckDlgButton(hwndDlg, IDC_CHECKAPMRESUME, (db_get_b(NULL, MODULENAME, SETTING_CHECKAPMRESUME, FALSE)&&(CallService(MS_SYSTEM_GETVERSION,0,0) >= 0x00040000)) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_FIRSTOFFLINE, (db_get_b(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_NOLOCKED, (db_get_b(NULL, MODULENAME, SETTING_NOLOCKED, FALSE)) ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemInt(hwndDlg, IDC_LOGINERR_DELAY, db_get_dw(NULL, MODULENAME, SETTING_LOGINERR_DELAY, DEFAULT_MAXDELAY), FALSE);
SetDlgItemInt(hwndDlg, IDC_PINGCOUNT, db_get_w(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT), FALSE);
SetDlgItemInt(hwndDlg, IDC_CNTDELAY, db_get_dw(NULL, MODULENAME, SETTING_CNTDELAY, CHECKCONTIN_DELAY), FALSE);
@@ -418,19 +418,19 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
// text
SendDlgItemMessage(hwndDlg,IDC_TEXTCOLOR,CPM_SETCOLOUR,0,db_get_dw(NULL, MODULENAME, SETTING_POPUP_TEXTCOLOR, 0x0000CC));
// wincolors
- CheckDlgButton(hwndDlg, IDC_WINCOLORS, db_get_b(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0));
+ CheckDlgButton(hwndDlg, IDC_WINCOLORS, db_get_b(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0) ? BST_CHECKED : BST_UNCHECKED);
// defaultcolors
- CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( ( db_get_b(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
+ CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ((db_get_b(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))) ? BST_CHECKED : BST_UNCHECKED);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
// popup types
- CheckDlgButton(hwndDlg, IDC_PUCONNLOST, db_get_b(NULL, MODULENAME, SETTING_PUCONNLOST, TRUE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUOTHER, db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUCONNRETRY, db_get_b(NULL, MODULENAME, SETTING_PUCONNRETRY, TRUE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PURESULT, db_get_b(NULL, MODULENAME, SETTING_PURESULT, TRUE)?BST_CHECKED:BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_PUSHOWEXTRA, db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)?BST_CHECKED:BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PUCONNLOST, db_get_b(NULL, MODULENAME, SETTING_PUCONNLOST, TRUE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PUOTHER, db_get_b(NULL, MODULENAME, SETTING_PUOTHER, TRUE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PUCONNRETRY, db_get_b(NULL, MODULENAME, SETTING_PUCONNRETRY, TRUE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PURESULT, db_get_b(NULL, MODULENAME, SETTING_PURESULT, TRUE) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_PUSHOWEXTRA, db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE) ? BST_CHECKED : BST_UNCHECKED);
bFreeze = false;
break;
@@ -438,10 +438,10 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar
switch (LOWORD(wParam)) {
case IDC_WINCOLORS:
case IDC_DEFAULTCOLORS:
- EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
- EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
- EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
+ EnableWindow(GetDlgItem(hwndDlg, IDC_WINCOLORS), (BST_UNCHECKED == IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS)));
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;