| 309 | |
| 310 | |
| 311 | void CServerListCtrl::HighlightServer( const CServer* server, bool highlight ) |
| 312 | { |
| 313 | // Unset the old highlighted server if we are going to set a new one |
| 314 | if ( m_connected && highlight ) { |
| 315 | // A recursive call to do the real work. |
| 316 | HighlightServer( m_connected, false ); |
| 317 | |
| 318 | m_connected = 0; |
| 319 | } |
| 320 | |
| 321 | long itemnr = FindItem( -1, reinterpret_cast<wxUIntPtr>(server) ); |
| 322 | if ( itemnr > -1 ) { |
| 323 | wxListItem item; |
| 324 | item.SetId( itemnr ); |
| 325 | |
| 326 | if ( GetItem( item ) ) { |
| 327 | wxFont font = GetFont(); |
| 328 | |
| 329 | if ( highlight ) { |
| 330 | font.SetWeight( wxFONTWEIGHT_BOLD ); |
| 331 | |
| 332 | m_connected = server; |
| 333 | } |
| 334 | |
| 335 | item.SetFont( font ); |
| 336 | |
| 337 | SetItem( item ); |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | |
| 343 | void CServerListCtrl::ShowServerCount() |
no test coverage detected