Commit 026d199c authored by Laurent Montel's avatar Laurent Montel 😁

Fix enable/disable user1 button

svn path=/trunk/KDE/kdepim/messagecomposer/; revision=1158283
parent b236a94a
......@@ -105,6 +105,7 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
setDefaultButton( User1 );
setModal( false );
setButtonText( User1, i18nc("@action:button","Save List") );
enableButton( User1, false );
QBoxLayout *topLayout = new QVBoxLayout( topFrame );
topLayout->setSpacing( spacingHint() );
......@@ -132,6 +133,8 @@ DistributionListDialog::DistributionListDialog( QWidget *parent )
topLayout->addWidget( mRecipientsList );
connect( this, SIGNAL( user1Clicked() ),
this, SLOT( slotUser1() ) );
connect( mTitleEdit, SIGNAL( textChanged( const QString& ) ),
this, SLOT( slotTitleChanged( const QString& ) ) );
}
void DistributionListDialog::setRecipients( const Recipient::List &recipients )
......@@ -286,5 +289,10 @@ void DistributionListDialog::slotContactGroupCreateJobResult( KJob *job )
}
}
void DistributionListDialog::slotTitleChanged( const QString& text )
{
enableButton( KDialog::User1, !text.isEmpty() );
}
#include "distributionlistdialog.moc"
......@@ -40,6 +40,7 @@ class DistributionListDialog : public KDialog
public slots:
void slotUser1();
void slotTitleChanged( const QString& );
private Q_SLOTS:
void slotDelayedSetRecipients( KJob* );
......
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