Fix filter list when opening a file

Signed-off-by: mio <stigma@disroot.org>
pull/21/head
mio 2 months ago
parent f6d6e20609
commit c0311bdfc3

@ -902,13 +902,37 @@ VideoWindow::fileFilter() const
{ {
char *supportedExtensions = xine_get_file_extensions( m_xine ); char *supportedExtensions = xine_get_file_extensions( m_xine );
TQString filter( "*." ); TQString filter("*.");
filter.append( supportedExtensions ); filter.append(supportedExtensions);
filter.remove( "txt" );
filter.remove( "png" ); // Remove protocols
filter.replace( ' ', " *." ); filter.remove(" dvb://");
filter.remove(" dvbc://");
std::free( supportedExtensions ); filter.remove(" dvbs://");
filter.remove(" dvbt://");
filter.remove(" vcd:/");
filter.remove(" vdr:/");
filter.remove(" netvdr:/");
filter.remove(" dvd:/");
filter.remove(" pvr:/");
filter.remove(" slave://");
filter.remove(" cdda:/");
// Remove image files
filter.remove(" bmp");
filter.remove(" gif");
filter.remove(" jpg");
filter.remove(" jpeg");
filter.remove(" png");
// Remove misc. files
filter.remove(" txt");
// Remove spaces (prevent multiple *.)
filter.replace(" ", " ");
filter.replace(' ', " *.");
std::free(supportedExtensions);
return filter; return filter;
} }

Loading…
Cancel
Save