MCPcopy Create free account
hub / github.com/amule-project/amule / HighlightServer

Method HighlightServer

src/ServerListCtrl.cpp:311–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310
311void 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
343void CServerListCtrl::ShowServerCount()

Callers 2

HandlePacketMethod · 0.80
ServerHighlightFunction · 0.80

Calls 1

SetFontMethod · 0.45

Tested by

no test coverage detected