@ -626,7 +626,7 @@ TQString TexDocDialog::getMimeType(const TQString &filename)
KMimeType : : Ptr pMime = KMimeType : : findByURL ( mimeurl ) ;
mimetype = pMime - > name ( ) ;
}
KILE_DEBUG ( ) < < " \t mime = " < < mimetype < < " " < < endl ;
return mimetype ;
}
@ -634,21 +634,27 @@ TQString TexDocDialog::getMimeType(const TQString &filename)
TQString TexDocDialog : : getIconName ( const TQString & filename )
{
TQFileInfo fi ( filename ) ;
TQString basename = fi . baseName ( ) . lower ( ) ;
TQString basename = fi . baseName ( ) . lower ( ) ;
TQString ext = fi . extension ( false ) . lower ( ) ;
TQString icon ;
if ( ext = = " dvi " | | ext = = " pdf " | | ext = = " html " | | ext = = " htm " | | ext = = " txt " )
icon = ext ;
if ( ext = = " dvi " )
icon = " application-x-lyx " ;
else if ( ext = = " pdf " )
icon = " application-pdf " ;
else if ( ext = = " html " | | ext = = " htm " )
icon = " text-html " ;
else if ( ext = = " txt " )
icon = " text-plain " ;
else if ( ext = = " ps " )
icon = " postscript " ;
icon = " application- postscript" ;
else if ( ext = = " sty " )
icon = " tex " ;
icon = " tex t-x-tex " ;
else if ( ext = = " faq " | | basename = = " readme " | | basename = = " 00readme " )
icon = " readme " ;
icon = " text-x- readme" ;
else
icon = " ascii" ;
icon = " text-vnd.tde. ascii" ;
return icon ;
}