summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/icq_popups.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-28 15:20:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-28 15:20:02 +0000
commit597d5a26ad80b3e45d4863c5083994900dfd54ec (patch)
treec842b647ab0be86eec7222e57cd60adea3222aec /protocols/IcqOscarJ/icq_popups.cpp
parentf7892e2c27b96566489297ae53dee0ed3e53bd9c (diff)
collection of various fixes from the forums
git-svn-id: http://svn.miranda-ng.org/main/trunk@215 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/icq_popups.cpp')
-rw-r--r--protocols/IcqOscarJ/icq_popups.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/protocols/IcqOscarJ/icq_popups.cpp b/protocols/IcqOscarJ/icq_popups.cpp
index d40b2526a1..e1cdadada6 100644
--- a/protocols/IcqOscarJ/icq_popups.cpp
+++ b/protocols/IcqOscarJ/icq_popups.cpp
@@ -58,11 +58,13 @@ static const UINT icqPopupColorControls[] = {
INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ static bool bInitDone = true;
BYTE bEnabled;
CIcqProto* ppro = (CIcqProto*)GetWindowLongPtr( hwndDlg, GWLP_USERDATA );
switch (msg) {
case WM_INITDIALOG:
+ bInitDone = false;
TranslateDialogDefault(hwndDlg);
ppro = (CIcqProto*)lParam;
@@ -93,6 +95,7 @@ INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
CheckDlgButton(hwndDlg, IDC_POPUPS_ENABLED, bEnabled);
icq_EnableMultipleControls(hwndDlg, icqPopupsControls, SIZEOF(icqPopupsControls), bEnabled);
icq_EnableMultipleControls(hwndDlg, icqPopupColorControls, SIZEOF(icqPopupColorControls), bEnabled & !IsDlgButtonChecked(hwndDlg,IDC_USEWINCOLORS));
+ bInitDone = true;
return TRUE;
case WM_COMMAND:
@@ -114,9 +117,20 @@ INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case IDC_USEWINCOLORS:
bEnabled = IsDlgButtonChecked(hwndDlg,IDC_POPUPS_ENABLED);
icq_EnableMultipleControls(hwndDlg, icqPopupColorControls, SIZEOF(icqPopupColorControls), bEnabled & !IsDlgButtonChecked(hwndDlg,IDC_USEWINCOLORS));
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ case IDC_POPUP_LOG0_TIMEOUT:
+ case IDC_POPUP_LOG1_TIMEOUT:
+ case IDC_POPUP_LOG2_TIMEOUT:
+ case IDC_POPUP_LOG3_TIMEOUT:
+ case IDC_POPUP_SPAM_TIMEOUT:
+ if((HIWORD(wParam) == EN_CHANGE) && bInitDone)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+ default:
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
}
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case WM_NOTIFY: