/* Connects */
BUTTONACT( ui.fileBrowseButton, browseFile() );
- BUTTONACT( ui.delFileButton, deleteFile() );
+ BUTTONACT( ui.removeFileButton, removeFile() );
BUTTONACT( ui.subBrowseButton, browseFileSub() );
CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) );
CONNECT( ui.subInput, textChanged( const QString& ), this, updateMRL() );
CONNECT( ui.alignSubComboBox, currentIndexChanged( int ), this, updateMRL() );
CONNECT( ui.sizeSubComboBox, currentIndexChanged( int ), this, updateMRL() );
+ updateButtons();
}
inline void FileOpenPanel::BuildOldPanel()
item->setFlags( Qt::ItemIsEditable | Qt::ItemIsEnabled );
ui.fileListWidg->addItem( item );
}
+ updateButtons();
updateMRL();
}
-void FileOpenPanel::deleteFile()
+void FileOpenPanel::removeFile()
{
int i = ui.fileListWidg->currentRow();
if( i != -1 )
}
updateMRL();
+ updateButtons();
}
/* Show a fileBrowser to select a subtitle */
ui.subInput->clear();
}
+/* Update buttons depending on current selection */
+void FileOpenPanel::updateButtons()
+{
+ bool b_has_files = ( ui.fileListWidg->count() > 0 );
+ ui.removeFileButton->setEnabled( b_has_files );
+ ui.subCheckBox->setEnabled( b_has_files );
+}
+
/**************************************************************************
* Open Discs ( DVD, CD, VCD and similar devices ) *
**************************************************************************/