]> git.saurik.com Git - wxWidgets.git/blobdiff - demos/life/life.cpp
extra word removed (patch 813536)
[wxWidgets.git] / demos / life / life.cpp
index b6d1a7ae58e381a8af483591e169fb354cfd15af..22ce390cc1340bd96ac26ca845b6561501203ecf 100644 (file)
@@ -355,16 +355,17 @@ void LifeFrame::UpdateUI()
     // start / stop
     GetToolBar()->EnableTool(ID_START, !m_running);
     GetToolBar()->EnableTool(ID_STOP,  m_running);
-    GetMenuBar()->GetMenu(2)->Enable(ID_START, !m_running);
-    GetMenuBar()->GetMenu(2)->Enable(ID_STEP,  !m_running);
-    GetMenuBar()->GetMenu(2)->Enable(ID_STOP,  m_running);
+    GetMenuBar()->Enable(ID_START, !m_running);
+    GetMenuBar()->Enable(ID_STEP,  !m_running);
+    GetMenuBar()->Enable(ID_STOP,  m_running);
+    GetMenuBar()->Enable(ID_TOPSPEED, !m_topspeed);
 
     // zooming
     int cellsize = m_canvas->GetCellSize();
     GetToolBar()->EnableTool(ID_ZOOMIN,  cellsize < 32);
     GetToolBar()->EnableTool(ID_ZOOMOUT, cellsize > 1);
-    GetMenuBar()->GetMenu(1)->Enable(ID_ZOOMIN,  cellsize < 32);
-    GetMenuBar()->GetMenu(1)->Enable(ID_ZOOMOUT, cellsize > 1);
+    GetMenuBar()->Enable(ID_ZOOMIN,  cellsize < 32);
+    GetMenuBar()->Enable(ID_ZOOMOUT, cellsize > 1);
 }
 
 // Event handlers -----------------------------------------------------------
@@ -808,7 +809,7 @@ void LifeCanvas::DrawChanged()
 }
 
 // event handlers
-void LifeCanvas::OnPaint(wxPaintEvent& event)
+void LifeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
 {
     wxPaintDC dc(this);
     wxRect  rect = GetUpdateRegion().GetBox();