void target_cds_found (GUPnPServiceProxy *target_cds_proxy) { cds_proxy = target_cds_proxy; if (dest_container != NULL) { container_found (dest_container); } else { /* Find a suitable container */ search_container (target_cds_proxy); } }
void LIB_VIEW_FRAME::OnSelectSymbol( wxCommandEvent& aEvent ) { wxString dialogTitle; PART_LIBS* libs = Prj().SchLibs(); // Container doing search-as-you-type. COMPONENT_TREE_SEARCH_CONTAINER search_container( libs ); for( PART_LIB& lib : *libs ) { search_container.AddLibrary( lib ); } dialogTitle.Printf( _( "Choose Component (%d items loaded)" ), search_container.GetComponentsCount() ); DIALOG_CHOOSE_COMPONENT dlg( this, dialogTitle, &search_container, m_convert ); if( dlg.ShowModal() == wxID_CANCEL ) return; /// @todo: The unit selection gets reset to 1 by SetSelectedComponent() so the unit /// selection feature of the choose symbol dialog doesn't work. LIB_ALIAS* const alias = dlg.GetSelectedAlias( &m_unit ); if( !alias || !alias->GetLib() ) return; if( m_libraryName == alias->GetLib()->GetName() ) { if( m_entryName != alias->GetName() ) SetSelectedComponent( alias->GetName() ); } else { m_entryName = alias->GetName(); SetSelectedLibrary( alias->GetLib()->GetName() ); } }