From: Leon W. <moo...@us...> - 2005-03-24 09:22:57
|
Update of /cvsroot/anyedit/AnyEditv2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24173 Modified Files: AnyEdit.cpp Log Message: Bugfix: Open Startup Page menu item was grey when no Startup Page was open. It now switches to the Startup Page when one is open. Index: AnyEdit.cpp =================================================================== RCS file: /cvsroot/anyedit/AnyEditv2/AnyEdit.cpp,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -d -r1.108 -r1.109 *** AnyEdit.cpp 24 Mar 2005 09:00:10 -0000 1.108 --- AnyEdit.cpp 24 Mar 2005 09:22:31 -0000 1.109 *************** *** 1106,1109 **** --- 1106,1124 ---- { OpenStartupPage(); + + CMDIChildWnd* pChild = ((CMainFrame*)m_pMainWnd)->MDIGetActive(); + while( pChild ) + { + CDocument* pDoc = pChild->GetActiveDocument(); + if( NULL != pDoc ) + { + if( pDoc->GetPathName() == GetAppPath() + STARTUP_PAGE_FILENAME) + { + pChild->MDIActivate(); + break; + } + } + pChild = (CMDIChildWnd*)pChild->GetWindow(GW_HWNDNEXT); + } } *************** *** 2096,2100 **** void CAnyEditApp::OnUpdateFileOpenstartuppage(CCmdUI* pCmdUI) { ! pCmdUI->Enable(GetStartupPage() != NULL); } --- 2111,2123 ---- void CAnyEditApp::OnUpdateFileOpenstartuppage(CCmdUI* pCmdUI) { ! if( GetStartupPage() != NULL ) ! { ! pCmdUI->SetText( "Switch to Startup Page" ); ! } ! else ! { ! pCmdUI->SetText( "Open Startup Page" ); ! } ! pCmdUI->Enable(TRUE); } |