From e1a01b5f23430304b900b9817fdcdfd12bc75808 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 19 Feb 2013 10:48:23 +0000 Subject: - Create PopUp options pages only when popup plugin present git-svn-id: http://svn.miranda-ng.org/main/trunk@3642 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ClientChangeNotify/src/OptDlg.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'plugins/ClientChangeNotify') diff --git a/plugins/ClientChangeNotify/src/OptDlg.cpp b/plugins/ClientChangeNotify/src/OptDlg.cpp index ac196f72c7..4a348a3d8b 100644 --- a/plugins/ClientChangeNotify/src/OptDlg.cpp +++ b/plugins/ClientChangeNotify/src/OptDlg.cpp @@ -172,16 +172,18 @@ INT_PTR CALLBACK PopupOptDlg(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara int OptionsDlgInit(WPARAM wParam, LPARAM lParam) { - OPTIONSDIALOGPAGE optDi = {0}; - optDi.cbSize = sizeof(optDi); - optDi.position = 920000000; - optDi.ptszTitle = LPGENT("ClientChangeNotify"); - optDi.pfnDlgProc = PopupOptDlg; - optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG); - optDi.hInstance = g_hInstance; - optDi.ptszGroup = LPGENT("PopUps"); - optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; - Options_AddPage(wParam, &optDi); + if (ServiceExists(MS_POPUP_ADDPOPUP)) { + OPTIONSDIALOGPAGE optDi = {0}; + optDi.cbSize = sizeof(optDi); + optDi.position = 920000000; + optDi.ptszTitle = LPGENT("ClientChangeNotify"); + optDi.pfnDlgProc = PopupOptDlg; + optDi.pszTemplate = MAKEINTRESOURCEA(IDD_POPUPOPTDLG); + optDi.hInstance = g_hInstance; + optDi.ptszGroup = LPGENT("PopUps"); + optDi.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; + Options_AddPage(wParam, &optDi); + } return 0; } -- cgit v1.2.3