+ // the first item in the radio group is checked by default to be consistent
+ // with wxGTK and the menu radio items
+ int radioGroupCount = 0;
+
+ for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
+ node;
+ node = node->GetNext() )
+ {
+ wxToolBarTool *tool = (wxToolBarTool*) node->GetData();
+
+ if ( !tool->IsButton() || tool->GetKind() != wxITEM_RADIO )
+ {
+ radioGroupCount = 0;
+ continue;
+ }
+
+ bool toggle = !radioGroupCount++;
+ if ( tool->Toggle(toggle) )
+ {
+ DoToggleTool(tool, toggle);
+ }
+ }
+