vlc_linux/vlc-3.0.16/modules/gui/qt/components/open_panels.cpp
/* update the buttons according the type of device */
update the buttons according the type of device
update the buttons according the type of device
void DiscOpenPanel::updateButtons()
{
    if ( ui.dvdRadioButton->isChecked() )
    {
        if( m_discType != Dvd )
        {
            setDrive( psz_dvddiscpath );
            m_discType = Dvd;
        }
        ui.titleLabel->setText( qtr("Title") );
        ui.chapterLabel->show();
        ui.chapterSpin->show();
        ui.diskOptionBox_2->show();
        ui.dvdsimple->setEnabled( true );
    }
    else if ( ui.bdRadioButton->isChecked() )
    {
        if( m_discType != BRD )
        {
            setDrive( psz_dvddiscpath );
            m_discType = BRD;
            ui.dvdsimple->setChecked( !var_InheritBool( p_intf, "bluray-menu" ) );
        }
        ui.titleLabel->setText( qtr("Title") );
        ui.chapterLabel->hide();
        ui.chapterSpin->hide();
        ui.diskOptionBox_2->hide();
        ui.dvdsimple->setEnabled( true );
    }
    else if ( ui.vcdRadioButton->isChecked() )
    {
        if( m_discType != Vcd )
        {
            setDrive( psz_vcddiscpath );
            m_discType = Vcd;
        }
        ui.titleLabel->setText( qtr("Entry") );
        ui.chapterLabel->hide();
        ui.chapterSpin->hide();
        ui.diskOptionBox_2->show();
        ui.dvdsimple->setEnabled( false );
    }
    else 
    {
        if( m_discType != Cdda )
        {
            setDrive( psz_cddadiscpath );
            m_discType = Cdda;
        }
        ui.titleLabel->setText( qtr("Track") );
        ui.chapterLabel->hide();
        ui.chapterSpin->hide();
        ui.diskOptionBox_2->hide();
        ui.dvdsimple->setEnabled( false );
    }
    updateMRL();
}
void DiscOpenPanel :: updateButtons ( ) { if ( ui . dvdRadioButton -> isChecked ( ) ) { if ( m_discType != Dvd ) { setDrive ( psz_dvddiscpath ) ; m_discType = Dvd ; } ui . titleLabel -> setText ( qtr ( " " ) ) ; ui . chapterLabel -> show ( ) ; ui . chapterSpin -> show ( ) ; ui . diskOptionBox_2 -> show ( ) ; ui . dvdsimple -> setEnabled ( true ) ; } else if ( ui . bdRadioButton -> isChecked ( ) ) { if ( m_discType != BRD ) { setDrive ( psz_dvddiscpath ) ; m_discType = BRD ; ui . dvdsimple -> setChecked ( ! var_InheritBool ( p_intf , " " ) ) ; } ui . titleLabel -> setText ( qtr ( " " ) ) ; ui . chapterLabel -> hide ( ) ; ui . chapterSpin -> hide ( ) ; ui . diskOptionBox_2 -> hide ( ) ; ui . dvdsimple -> setEnabled ( true ) ; } else if ( ui . vcdRadioButton -> isChecked ( ) ) { if ( m_discType != Vcd ) { setDrive ( psz_vcddiscpath ) ; m_discType = Vcd ; } ui . titleLabel -> setText ( qtr ( " " ) ) ; ui . chapterLabel -> hide ( ) ; ui . chapterSpin -> hide ( ) ; ui . diskOptionBox_2 -> show ( ) ; ui . dvdsimple -> setEnabled ( false ) ; } else { if ( m_discType != Cdda ) { setDrive ( psz_cddadiscpath ) ; m_discType = Cdda ; } ui . titleLabel -> setText ( qtr ( " " ) ) ; ui . chapterLabel -> hide ( ) ; ui . chapterSpin -> hide ( ) ; ui . diskOptionBox_2 -> hide ( ) ; ui . dvdsimple -> setEnabled ( false ) ; } updateMRL ( ) ; }
update the buttons according the type of device
update the buttons according the type of device
/* CDDA */