From 0388e4a5e99d7f38718ac17c4d3e3565d1e2d559 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 29 Apr 2018 23:41:17 +0200 Subject: fixes #1307 (horror in webview contact settings) --- plugins/WebView/src/webview_datawnd.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'plugins/WebView/src/webview_datawnd.cpp') diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index f4159e24f3..19b600d481 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -383,23 +383,13 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break; case IDC_OPTIONS_BUTTON: - if (hContact = FindContactByUrl(hwndDlg)) { - ContactHwnd = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTACT_OPT), hwndDlg, DlgProcContactOpt, (LPARAM) hContact); - ShowWindow(ContactHwnd, SW_SHOW); - SetActiveWindow(ContactHwnd); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTIONS_BUTTON), 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_ALERT_BUTTON), 0); - } + if (hContact = FindContactByUrl(hwndDlg)) + DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_CONTACT_OPT), hwndDlg, DlgProcContactOpt, hContact); break; case IDC_ALERT_BUTTON: - if (hContact = FindContactByUrl(hwndDlg)) { - HWND hwndAlertOpt = CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_ALRT_OPT), hwndDlg, DlgProcAlertOpt, (LPARAM) hContact); - ShowWindow(hwndAlertOpt, SW_SHOW); - SetActiveWindow(hwndAlertOpt); - EnableWindow(GetDlgItem(hwndDlg, IDC_ALERT_BUTTON), 0); - EnableWindow(GetDlgItem(hwndDlg, IDC_OPTIONS_BUTTON), 0); - } + if (hContact = FindContactByUrl(hwndDlg)) + DialogBoxParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_ALRT_OPT), hwndDlg, DlgProcAlertOpt, hContact); break; case IDOK: -- cgit v1.2.3