Patch by Sven to allow icons in the infowidget. The kmail part does not

yet emit folder icons on normal folders, tho

svn path=/trunk/kdepim/; revision=225909
wilder-work
Daniel Molkentin 23 years ago
parent ec105b225c
commit 3d98c3f954
  1. 12
      kmail_part.cpp
  2. 1
      kmail_part.h

@ -140,6 +140,8 @@ KMailPart::KMailPart(QWidget *parentWidget, const char *widgetName,
KParts::InfoExtension *ie = new KParts::InfoExtension( this, "KMailInfo" );
connect( mainWidget->folderTree(), SIGNAL(folderSelected(KMFolder*)), this, SLOT(exportFolder(KMFolder*)) );
connect( this, SIGNAL(textChanged(const QString&)), ie, SIGNAL(textChanged(const QString&)) );
connect( this, SIGNAL(iconChanged(const QPixmap&)), ie, SIGNAL(iconChanged(const QPixmap&)) );
#endif
KGlobal::iconLoader()->addAppDir( "kmail" );
setXMLFile( "kmmainwin.rc" );
@ -178,8 +180,18 @@ bool KMailPart::openFile()
void KMailPart::exportFolder( KMFolder *folder )
{
KMFolderTreeItem* fti = static_cast< KMFolderTreeItem* >( mainWidget->folderTree()->currentItem() );
if ( folder != 0 )
emit textChanged( folder->label() );
QPixmap pix;
if ( fti->normalIcon() != 0 )
pix = *fti->normalIcon();
else
pix = QPixmap();
emit iconChanged( pix );
}
void KMailPart::guiActivateEvent(KParts::GUIActivateEvent *e)

@ -67,6 +67,7 @@ class KMailPart: public KParts::ReadOnlyPart, virtual public KMailPartIface
signals:
void textChanged( const QString& );
void iconChanged( const QPixmap& );
protected:
virtual bool openFile();

Loading…
Cancel
Save