Commit e45e7d85 authored by David Palacio's avatar David Palacio

Make the file dialog accept directories if a generator offers to handle them.

svn path=/trunk/KDE/kdegraphics/okular/; revision=1230524
parent db7d8ff6
......@@ -252,6 +252,11 @@ void Shell::fileOpen()
startDir = m_part->url().toLocalFile();
KFileDialog dlg( startDir, QString(), this );
dlg.setOperationMode( KFileDialog::Opening );
// A directory may be a document. E.g. comicbook generator.
if ( m_fileformats.contains( "inode/directory" ) )
dlg.setMode( dlg.mode() | KFile::Directory );
if ( m_fileformatsscanned && m_fileformats.isEmpty() )
dlg.setFilter( i18n( "*|All Files" ) );
else
......
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