From f476f43ac65d4c8cc8cb69b19662966b45043c88 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 22 Oct 2012 15:27:01 +0000 Subject: if there's no modernopt plugin, link to them should be disabled git-svn-id: http://svn.miranda-ng.org/main/trunk@2046 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/options/options.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 031691e5c2..56f48befda 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -667,6 +667,9 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L case WM_INITDIALOG: TranslateDialogDefault(hdlg); + + if ( !ServiceExists(MS_MODERNOPT_SHOW)) + ShowWindow( GetDlgItem(hdlg, IDC_MODERN), FALSE); { PROPSHEETHEADER *psh = (PROPSHEETHEADER*)lParam; OPENOPTIONSDIALOG *ood = (OPENOPTIONSDIALOG*)psh->pStartPage; @@ -1126,17 +1129,15 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == CBN_EDITCHANGE)) if ( !SetTimer(hdlg, FILTER_TIMEOUT_TIMER, 400, NULL)) MessageBeep(MB_ICONSTOP); - break; case IDC_MODERN: - { - DBWriteContactSettingByte(NULL, "Options", "Expert", 0); - SaveOptionsTreeState(hdlg); - PostMessage(hdlg, WM_CLOSE, 0, 0); - CallService(MS_MODERNOPT_SHOW, 0, 0); - break; - } + DBWriteContactSettingByte(NULL, "Options", "Expert", 0); + SaveOptionsTreeState(hdlg); + PostMessage(hdlg, WM_CLOSE, 0, 0); + CallService(MS_MODERNOPT_SHOW, 0, 0); + break; + case IDCANCEL: { PSHNOTIFY pshn; -- cgit v1.2.3