Commit e123fc1e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt: try to make the advanced open dialog more usable for files (who the H......

Qt: try to make the advanced open dialog more usable for files (who the H... uses files nowadays ;) )
parent be7fb988
...@@ -135,6 +135,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) : ...@@ -135,6 +135,7 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* Connects */ /* Connects */
BUTTONACT( ui.fileBrowseButton, browseFile() ); BUTTONACT( ui.fileBrowseButton, browseFile() );
BUTTONACT( ui.delFileButton, deleteFile() );
BUTTONACT( ui.subBrowseButton, browseFileSub() ); BUTTONACT( ui.subBrowseButton, browseFileSub() );
CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) ); CONNECT( ui.subCheckBox, toggled( bool ), this, toggleSubtitleFrame( bool ) );
...@@ -161,6 +162,18 @@ void FileOpenPanel::browseFile() ...@@ -161,6 +162,18 @@ void FileOpenPanel::browseFile()
updateMRL(); updateMRL();
} }
void FileOpenPanel::deleteFile()
{
int i = ui.fileListWidg->currentRow();
if( i != -1 )
{
QListWidgetItem *temp = ui.fileListWidg->takeItem( i );
delete temp;
}
updateMRL();
}
/* Show a fileBrowser to select a subtitle */ /* Show a fileBrowser to select a subtitle */
void FileOpenPanel::browseFileSub() void FileOpenPanel::browseFileSub()
{ {
......
...@@ -110,6 +110,7 @@ public slots: ...@@ -110,6 +110,7 @@ public slots:
private slots: private slots:
void browseFileSub(); void browseFileSub();
void browseFile(); void browseFile();
void deleteFile();
void toggleSubtitleFrame( bool ); void toggleSubtitleFrame( bool );
}; };
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment