Fix Bug 258653 - possibility to configure number of recent addresses

FIXED-IN: 4.11
BUG: 258653
wilder-work
Montel Laurent 13 years ago
parent 8bc9c59301
commit fd6fcc366b
  1. 21
      configuredialog.cpp
  2. 1
      configuredialog_p.h

@ -2422,6 +2422,23 @@ ComposerPageGeneralTab::ComposerPageGeneralTab( QWidget * parent )
// recent addresses
hlay = new QHBoxLayout(); // inherits spacing
vlay->addLayout( hlay );
mMaximumRecentAddress = new KIntNumInput( this );
mMaximumRecentAddress->setSliderEnabled(false);
mMaximumRecentAddress->setMinimum(0);
mMaximumRecentAddress->setMaximum(999);
mMaximumRecentAddress->setSpecialValueText(i18n("No save"));
connect( mMaximumRecentAddress, SIGNAL(valueChanged(int)),
this, SLOT(slotEmitChanged()) );
label = new QLabel("Maximum recent address:");
hlay->addWidget(label);
hlay->addWidget(mMaximumRecentAddress);
hlay->addStretch( 1 );
hlay = new QHBoxLayout(); // inherits spacing
vlay->addLayout( hlay );
QPushButton *recentAddressesBtn = new QPushButton( i18n( "Edit Recent Addresses..." ), this );
connect( recentAddressesBtn, SIGNAL(clicked()),
this, SLOT(slotConfigureRecentAddresses()) );
@ -2505,6 +2522,7 @@ void ComposerPage::GeneralTab::doResetToDefaultsOther()
mShowRecentAddressesInComposer->setChecked( showRecentAddress );
mImprovePlainTextOfHtmlMessage->setChecked(improvePlainText);
mMaximumRecentAddress->setValue( 40 );
}
void ComposerPage::GeneralTab::doLoadFromGlobalSettings()
@ -2536,6 +2554,7 @@ void ComposerPage::GeneralTab::doLoadFromGlobalSettings()
mForwardTypeCombo->setCurrentIndex( 1 );
#endif
mMaximumRecentAddress->setValue(RecentAddresses::self( MessageComposer::MessageComposerSettings::self()->config() )->maxCount());
// editor group:
mExternalEditorCheck->setChecked( GlobalSettings::self()->useExternalEditor() );
mEditorRequester->setText( GlobalSettings::self()->externalEditor() );
@ -2567,6 +2586,8 @@ void ComposerPage::GeneralTab::save() {
GlobalSettings::self()->setUseExternalEditor( mExternalEditorCheck->isChecked() );
GlobalSettings::self()->setExternalEditor( mEditorRequester->text() );
RecentAddresses::self( MessageComposer::MessageComposerSettings::self()->config() )->setMaxCount( mMaximumRecentAddress->value() );
MessageComposer::MessageComposerSettings::self()->requestSync();
}

@ -545,6 +545,7 @@ private:
KUrlRequester *mEditorRequester;
KIntSpinBox *mMaximumRecipients;
QCheckBox *mImprovePlainTextOfHtmlMessage;
KIntNumInput *mMaximumRecentAddress;
#ifdef KDEPIM_ENTERPRISE_BUILD
KComboBox *mForwardTypeCombo;
QCheckBox *mRecipientCheck;

Loading…
Cancel
Save