slotAboutBackend(): use the document's mimetype to get an icon instead of the unknown icon.

this way you don't have to specify redundant icon names yourself.

CCMAIL: pino@kde.org

I hope the patch is OK for you. If so I'll forwardport it.

As I only have PDF files, could you please test the other plugins?

svn path=/branches/KDE/4.2/kdegraphics/okular/; revision=943375
remotes/origin/KDE/4.2
André Wöbbeking 17 years ago
parent d02ca45ef4
commit 046013332d
  1. 17
      part.cpp

@ -1759,7 +1759,22 @@ void Part::slotAboutBackend()
if ( !data )
return;
KAboutApplicationDialog dlg( data->aboutData(), widget() );
KAboutData aboutData( *data->aboutData() );
if ( aboutData.programIconName().isEmpty() || aboutData.programIconName() == aboutData.appName() )
{
if ( const Okular::DocumentInfo *documentInfo = m_document->documentInfo() )
{
const QString mimeTypeName = documentInfo->get("mimeType");
if ( !mimeTypeName.isEmpty() )
{
if ( KMimeType::Ptr type = KMimeType::mimeType( mimeTypeName ) )
aboutData.setProgramIconName( type->iconName() );
}
}
}
KAboutApplicationDialog dlg( &aboutData, widget() );
dlg.exec();
}

Loading…
Cancel
Save