From 511456b0716460eace01efe5861bf7381bd5612f Mon Sep 17 00:00:00 2001 From: leo Date: Sat, 25 Jun 2005 03:22:49 +0000 Subject: Added an option to check for newer versions on startup. git-svn-id: http://svn.leocad.org/trunk@412 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- win/Prefpage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'win/Prefpage.cpp') diff --git a/win/Prefpage.cpp b/win/Prefpage.cpp index cfa2fcd..acea191 100644 --- a/win/Prefpage.cpp +++ b/win/Prefpage.cpp @@ -37,6 +37,7 @@ CPreferencesGeneral::CPreferencesGeneral() : CPropertyPage(CPreferencesGeneral:: m_bAutoSave = FALSE; m_bCombo = FALSE; m_strUser = _T(""); + m_Updates = FALSE; //}}AFX_DATA_INIT } @@ -61,6 +62,7 @@ void CPreferencesGeneral::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_GENDLG_COMBO, m_bCombo); DDX_Text(pDX, IDC_GENDLG_USER, m_strUser); DDV_MaxChars(pDX, m_strUser, 100); + DDX_Check(pDX, IDC_GENDLG_UPDATES, m_Updates); //}}AFX_DATA_MAP } @@ -90,8 +92,9 @@ void CPreferencesGeneral::SetOptions(int nSaveInterval, int nMouse, const char* m_strFolder = strFolder; m_strUser = strUser; + m_Updates = AfxGetApp()->GetProfileInt("Settings", "CheckUpdates", 1); int i = AfxGetApp()->GetProfileInt("Settings", "Piecebar Options", - PIECEBAR_PREVIEW|PIECEBAR_GROUP|PIECEBAR_COMBO|PIECEBAR_ZOOMPREVIEW); + PIECEBAR_PREVIEW|PIECEBAR_GROUP|PIECEBAR_COMBO|PIECEBAR_ZOOMPREVIEW); m_bPreview = (i & PIECEBAR_PREVIEW) != 0; m_bSubparts = (i & PIECEBAR_SUBPARTS) != 0; m_bGroup = (i & PIECEBAR_GROUP) != 0; @@ -117,6 +120,7 @@ void CPreferencesGeneral::GetOptions(int* nSaveTime, int* nMouse, char* strFolde if (m_bZoom) i |= PIECEBAR_ZOOMPREVIEW; AfxGetApp()->WriteProfileInt("Settings", "Piecebar Options", i); + AfxGetApp()->WriteProfileInt("Settings", "CheckUpdates", m_Updates); } BOOL CPreferencesGeneral::OnInitDialog() -- cgit v1.2.3