From 1fb0cd07fba1e8d6f9ac2ebe3b4f2e1c60acb81b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 21:51:46 +0000 Subject: - metacontacts are always present; - added META_PROTO constant for mc module name; - MS_MC_GETPROTOCOLNAME removed, because it always returns META_PROTO git-svn-id: http://svn.miranda-ng.org/main/trunk@8319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/QuickContacts/src/options.cpp | 63 ++++++++++++----------------------- 1 file changed, 21 insertions(+), 42 deletions(-) (limited to 'plugins/QuickContacts/src/options.cpp') diff --git a/plugins/QuickContacts/src/options.cpp b/plugins/QuickContacts/src/options.cpp index 975c4e282a..1e69ce13df 100644 --- a/plugins/QuickContacts/src/options.cpp +++ b/plugins/QuickContacts/src/options.cpp @@ -92,9 +92,8 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP { int ret = SaveOptsDlgProc(controls, SIZEOF(controls), MODULE_NAME, hwndDlg, msg, wParam, lParam); - switch (msg) - { - case WM_INITDIALOG: + switch (msg) { + case WM_INITDIALOG: { BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_LASTSENTTO); EnableWindow(GetDlgItem(hwndDlg, IDC_GLOBAL), enabled); @@ -102,52 +101,32 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP enabled = IsDlgButtonChecked(hwndDlg, IDC_SUBCONTACTS); EnableWindow(GetDlgItem(hwndDlg, IDC_KEEP_OFFLINE), enabled); - - if (metacontacts_proto == NULL) - { - ShowWindow(GetDlgItem(hwndDlg, IDC_SUBCONTACTS), SW_HIDE); - ShowWindow(GetDlgItem(hwndDlg, IDC_KEEP_OFFLINE), SW_HIDE); - } - return TRUE; } - case WM_COMMAND: - { - if(LOWORD(wParam) == IDC_LASTSENTTO) - { - BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_LASTSENTTO); - EnableWindow(GetDlgItem(hwndDlg, IDC_GLOBAL), enabled); - EnableWindow(GetDlgItem(hwndDlg, IDC_LOCAL), enabled); - } - - if(LOWORD(wParam) == IDC_SUBCONTACTS) - { - BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_SUBCONTACTS); - EnableWindow(GetDlgItem(hwndDlg, IDC_KEEP_OFFLINE), enabled); - } + case WM_COMMAND: + if(LOWORD(wParam) == IDC_LASTSENTTO) { + BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_LASTSENTTO); + EnableWindow(GetDlgItem(hwndDlg, IDC_GLOBAL), enabled); + EnableWindow(GetDlgItem(hwndDlg, IDC_LOCAL), enabled); + } - break; + if(LOWORD(wParam) == IDC_SUBCONTACTS) { + BOOL enabled = IsDlgButtonChecked(hwndDlg, IDC_SUBCONTACTS); + EnableWindow(GetDlgItem(hwndDlg, IDC_KEEP_OFFLINE), enabled); } - case WM_NOTIFY: - { - switch (((LPNMHDR)lParam)->idFrom) - { - case 0: - { - switch (((LPNMHDR)lParam)->code) - { - case PSN_APPLY: - { - LoadOptions(); - - return TRUE; - } - } - break; - } + break; + + case WM_NOTIFY: + switch (((LPNMHDR)lParam)->idFrom) { + case 0: + switch (((LPNMHDR)lParam)->code) { + case PSN_APPLY: + LoadOptions(); + return TRUE; } break; } + break; } return ret; -- cgit v1.2.3