BOOL COptions_PropertyPage::OnQueryCancel() { // Check whether there have been any changes in order to ask the user // if they really want to cancel // QuerySiblings is only sent to loaded PropertyPages (i.e. user has // selected to view them as ones not yet loaded cannot have changed fields) if (QuerySiblings(PP_DATA_CHANGED, 0L) != 0L) { CGeneralMsgBox gmb; if (gmb.AfxMessageBox(IDS_AREYOUSURE_OPT, MB_YESNO | MB_ICONEXCLAMATION | MB_DEFBUTTON2) == IDNO) return FALSE; } return CPWPropertyPage::OnQueryCancel(); }
BOOL COptionsSystem::OnSetActive() { BOOL enable = (((CButton*)GetDlgItem(IDC_DEFPWUSESYSTRAY))->GetCheck() == BST_CHECKED) ? TRUE : FALSE; if (enable == TRUE) { // Check if user has the Misc PP open and hot key set if (QuerySiblings(PPOPT_HOTKEY_SET, 0L) == 1L) { // Yes - open and hot key is set GetDlgItem(IDC_DEFPWHIDESYSTRAY)->EnableWindow(TRUE); } else { // No - Not open - then take initial value as the answer GetDlgItem(IDC_DEFPWHIDESYSTRAY)->EnableWindow(m_InitialHotkeyState); } } return CPWPropertyPage::OnSetActive(); }
BOOL COptionsMisc::OnApply() { UpdateData(TRUE); // Go ask Security for ClearClipboardOnMinimize value BOOL bClearClipboardOnMinimize; if (QuerySiblings(PPOPT_GET_CCOM, (LPARAM)&bClearClipboardOnMinimize) == 0L) { // Security not loaded - get from Prefs bClearClipboardOnMinimize = PWSprefs::GetInstance()->GetPref(PWSprefs::ClearClipboardOnMinimize); } if (m_DoubleClickAction == PWSprefs::DoubleClickCopyPasswordMinimize && bClearClipboardOnMinimize) { CGeneralMsgBox gmb; gmb.AfxMessageBox(IDS_MINIMIZECONFLICT); // Are we the current page, if not activate this page COptions_PropertySheet *pPS = (COptions_PropertySheet *)GetParent(); if (pPS->GetActivePage() != (COptions_PropertyPage *)this) pPS->SetActivePage(this); m_dblclk_cbox.SetFocus(); return FALSE; } M_DefUsername() = (CSecString)m_DefUsername; M_OtherBrowserLocation() = m_OtherBrowserLocation; M_OtherEditorLocation() = m_OtherEditorLocation; M_OtherBrowserCmdLineParms() = m_OtherBrowserCmdLineParms; M_OtherEditorCmdLineParms() = m_OtherEditorCmdLineParms; M_AutotypeText() = m_AutotypeText; M_AutotypeDelay() = m_AutotypeDelay; M_ConfirmDelete() = m_ConfirmDelete; M_MaintainDatetimeStamps() = m_MaintainDatetimeStamps; M_EscExits() = m_EscExits; M_UseDefUsername() = m_UseDefUsername; M_QuerySetDefUsername() = m_QuerySetDefUsername; M_AutotypeMinimize() = m_AutotypeMinimize; M_DoubleClickAction() = m_DoubleClickAction; M_ShiftDoubleClickAction() = m_ShiftDoubleClickAction; return COptions_PropertyPage::OnApply(); }
void COptionsSystem::OnUseSystemTray() { BOOL enable = (((CButton*)GetDlgItem(IDC_DEFPWUSESYSTRAY))->GetCheck() == BST_CHECKED) ? TRUE : FALSE; GetDlgItem(IDC_STATIC_MAXREITEMS)->EnableWindow(enable); GetDlgItem(IDC_MAXREITEMS)->EnableWindow(enable); GetDlgItem(IDC_RESPIN)->EnableWindow(enable); if (enable == TRUE) { // Check if user has the Misc PP open and hot key set if (QuerySiblings(PPOPT_HOTKEY_SET, 0L) == 1L) { // Yes - open and hot key is set GetDlgItem(IDC_DEFPWHIDESYSTRAY)->EnableWindow(TRUE); } else { // No - Not open - then take initial value as the answer GetDlgItem(IDC_DEFPWHIDESYSTRAY)->EnableWindow(m_InitialHotkeyState); } } }
BOOL COptionsSecurity::OnApply() { UpdateData(TRUE); CGeneralMsgBox gmb; // Go ask Misc for DoubleClickAction value int iDoubleClickAction; if (QuerySiblings(PPOPT_GET_DCA, (LPARAM)&iDoubleClickAction) == 0L) { // Misc not loaded - get from Prefs iDoubleClickAction = PWSprefs::GetInstance()->GetPref(PWSprefs::DoubleClickAction); } if (m_ClearClipboardOnMinimize && iDoubleClickAction == PWSprefs::DoubleClickCopyPasswordMinimize) { gmb.AfxMessageBox(IDS_MINIMIZECONFLICT); // Are we the current page, if not activate this page COptions_PropertySheet *pPS = (COptions_PropertySheet *)GetParent(); if (pPS->GetActivePage() != (COptions_PropertyPage *)this) pPS->SetActivePage(this); GetDlgItem(IDC_CLEARBOARDONMINIMIZE)->SetFocus(); return FALSE; } M_ClearClipboardOnMinimize() = m_ClearClipboardOnMinimize; M_ClearClipboardOnExit() = m_ClearClipboardOnExit; M_LockOnMinimize() = m_LockOnMinimize; M_ConfirmCopy() = m_ConfirmCopy; M_LockOnWindowLock() = m_LockOnWindowLock; M_LockOnIdleTimeout() = m_LockOnIdleTimeout; M_CopyPswdBrowseURL() = m_CopyPswdBrowseURL; M_IdleTimeOut() = m_IdleTimeOut; UpdateHashIter(); M_HashIters() = m_HashIter; return COptions_PropertyPage::OnApply(); }