// OptionsDlg\DialogsPage.cpp : implementation file
//
#include "stdafx.h"
#include "P4win.h"
#include "OptionsDlg\DialogsPage.h"
// CDialogsPage dialog
IMPLEMENT_DYNAMIC(CDialogsPage, CPropertyPage)
CDialogsPage::CDialogsPage()
: CPropertyPage(CDialogsPage::IDD)
{
m_Inited = FALSE;
}
CDialogsPage::~CDialogsPage()
{
}
void CDialogsPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDepotPage)
DDX_Control(pDX, IDC_CHECK1, m_ShowDiscard);
DDX_Control(pDX, IDC_CHECK2, m_ShowNewClient);
DDX_Control(pDX, IDC_CHECK3, m_ShowSyncClient);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDialogsPage, CPropertyPage)
END_MESSAGE_MAP()
// CDialogsPage message handlers
BOOL CDialogsPage::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// Init all data members from the registry
m_ShowDiscard.SetCheck(!(GET_P4REGPTR()->DontShowDiscardFormChgs()));
m_ShowNewClient.SetCheck(!(GET_P4REGPTR()->DontShowYouHaveCr8NewClient()));
m_ShowSyncClient.SetCheck(!(GET_P4REGPTR()->DontShowYouHaveChgClientView()));
// Update input fields
UpdateData(FALSE);
m_Inited = TRUE;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDialogsPage::OnOK()
{
if (!m_Inited)
return;
// This bit of silliness is required to ensure all the
// fields provide their data to the UpdateData() routine
GotoDlgCtrl(GetParent()->GetDlgItem(IDC_APPLY));
int errorCount=0;
if(UpdateData(TRUE))
{
BOOL b = !m_ShowDiscard.GetCheck();
if (b != GET_P4REGPTR()->DontShowDiscardFormChgs())
{
if(!GET_P4REGPTR()->SetDontShowDiscardFormChgs( b ) )
errorCount++;
}
b = !m_ShowNewClient.GetCheck();
if (b != GET_P4REGPTR()->DontShowYouHaveCr8NewClient())
{
if(!GET_P4REGPTR()->SetDontShowYouHaveCr8NewClient( b ) )
errorCount++;
}
b = !m_ShowSyncClient.GetCheck();
if (b != GET_P4REGPTR()->DontShowYouHaveChgClientView())
{
if(!GET_P4REGPTR()->SetDontShowYouHaveChgClientView( b ) )
errorCount++;
}
if(errorCount)
AfxMessageBox(IDS_BAD_REGISTRY, MB_ICONSTOP);
}
}
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 19924 | YourUncleBob |
Populate -o //guest/perforce_software/p4win/... //guest/YourUncleBob/p4win/..... |
||
| //guest/perforce_software/p4win/main/gui/OptionsDlg/DialogsPage.cpp | |||||
| #1 | 16169 | perforce_software | Move files to follow new path scheme for branches. | ||
| //guest/perforce_software/p4win/gui/OptionsDlg/DialogsPage.cpp | |||||
| #1 | 8562 | Matt Attaway |
These feet never stop running. Initial commit of the P4Win source code. To the best of our knowledge this compiles and runs using the 2013.3 P4 API and VS 2010. Expect a few changes as we refine the build process. Please post any build issues to the forums. |
||