Change button

wilder-work
Montel Laurent 14 years ago
parent ad2c56f375
commit bdaf2ddef9
  1. 17
      identitydialog.cpp
  2. 3
      identitydialog.h

@ -802,12 +802,9 @@ namespace KMail {
mTemplatesCombo->setCollection( Akonadi::Collection( ident.templates().toLongLong() ) );
mVcardFilename = ident.vCardFile();
updateVcardButton();
if(mVcardFilename.isEmpty()) {
mEditVCard->setText(i18n("Create..."));
//Store in default place.
mVcardFilename = KStandardDirs::locateLocal("appdata",ident.identityName() + QLatin1String(".vcf"));
} else {
mEditVCard->setText(i18n("Edit..."));
}
mAttachMyVCard->setChecked(ident.attachVcard());
// "Templates" tab:
@ -879,6 +876,7 @@ namespace KMail {
else
ident.setTemplates( QString() );
ident.setVCardFile(mVcardFilename);
updateVcardButton();
ident.setAttachVcard(mAttachMyVCard->isChecked());
// "Templates" tab:
@ -909,8 +907,19 @@ namespace KMail {
dlg.loadVcard(mVcardFilename);
if(dlg.exec()) {
mVcardFilename = dlg.saveVcard();
updateVcardButton();
}
}
void IdentityDialog::updateVcardButton()
{
if(mVcardFilename.isEmpty()) {
mEditVCard->setText(i18n("Create..."));
} else {
mEditVCard->setText(i18n("Edit..."));
}
}
}
#include "identitydialog.moc"

@ -93,10 +93,11 @@ namespace KMail {
private slots:
void slotDelayedButtonClicked( KJob* );
void slotEditVcard();
void slotEditVcard();
private:
bool checkFolderExists( const QString & folder, const QString & msg );
bool validateAddresses( const QString & addresses );
void updateVcardButton();
protected:
// "general" tab:

Loading…
Cancel
Save