Remove the Retrieve all mail from server option, since it is obsolete.

svn path=/trunk/kdenetwork/kmail/; revision=68403
wilder-work
Michael Haeckel 26 years ago
parent 4472e95565
commit f0cef990f0
  1. 30
      accountdialog.cpp
  2. 51
      kmacctexppop.cpp
  3. 5
      kmacctexppop.h
  4. 6
      kmsettings.cpp
  5. 1
      kmsettings.h

@ -149,9 +149,9 @@ void AccountDialog::makeLocalAccountPage()
void AccountDialog::makePopAccountPage()
{
QFrame *page = makeMainWidget();
QGridLayout *topLayout = new QGridLayout( page, 17, 2, 0, spacingHint() );
QGridLayout *topLayout = new QGridLayout( page, 16, 2, 0, spacingHint() );
topLayout->addColSpacing( 1, fontMetrics().maxWidth()*15 );
topLayout->setRowStretch( 16, 10 );
topLayout->setRowStretch( 15, 10 );
topLayout->setColStretch( 1, 10 );
mPop.titleLabel = new QLabel( page );
@ -211,43 +211,39 @@ void AccountDialog::makePopAccountPage()
new QCheckBox( i18n("Delete mail from server"), page );
topLayout->addMultiCellWidget( mPop.deleteMailCheck, 9, 9, 0, 1 );
mPop.retriveAllCheck =
new QCheckBox( i18n("Retrieve all mail from server"), page );
topLayout->addMultiCellWidget( mPop.retriveAllCheck, 10, 10, 0, 1 );
mPop.excludeCheck =
new QCheckBox( i18n("Exclude from \"Check Mail\""), page );
topLayout->addMultiCellWidget( mPop.excludeCheck, 11, 11, 0, 1 );
topLayout->addMultiCellWidget( mPop.excludeCheck, 10, 10, 0, 1 );
mPop.intervalCheck =
new QCheckBox( i18n("Enable interval mail checking"), page );
topLayout->addMultiCellWidget( mPop.intervalCheck, 12, 12, 0, 1 );
topLayout->addMultiCellWidget( mPop.intervalCheck, 11, 11, 0, 1 );
connect( mPop.intervalCheck, SIGNAL(toggled(bool)),
this, SLOT(slotEnablePopInterval(bool)) );
mPop.intervalLabel = new QLabel( i18n("Check interval (minutes):"), page );
topLayout->addWidget( mPop.intervalLabel, 13, 0 );
topLayout->addWidget( mPop.intervalLabel, 12, 0 );
mPop.intervalSpin = new QSpinBox( page );
mPop.intervalSpin->setRange( 1, 10000 );
mPop.intervalSpin->setValue( 1 );
topLayout->addWidget( mPop.intervalSpin, 13, 1 );
topLayout->addWidget( mPop.intervalSpin, 12, 1 );
label = new QLabel( i18n("Destination folder:"), page );
topLayout->addWidget( label, 14, 0 );
topLayout->addWidget( label, 13, 0 );
mPop.folderCombo = new QComboBox( false, page );
topLayout->addWidget( mPop.folderCombo, 14, 1 );
topLayout->addWidget( mPop.folderCombo, 13, 1 );
/*
label = new QLabel( i18n("Default identity:"), page );
topLayout->addWidget( label, 15, 0 );
topLayout->addWidget( label, 14, 0 );
mPop.identityCombo = new QComboBox( false, page );
topLayout->addWidget( mPop.identityCombo, 15, 1 );
topLayout->addWidget( mPop.identityCombo, 14, 1 );
label->setEnabled(false);
*/
// mPop.identityCombo->setEnabled(false);
label = new QLabel( i18n("Precommand:"), page );
topLayout->addWidget( label, 16, 0 );
topLayout->addWidget( label, 15, 0 );
mPop.precommand = new QLineEdit( page );
topLayout->addWidget( mPop.precommand, 16, 1 );
topLayout->addWidget( mPop.precommand, 15, 1 );
connect(kapp,SIGNAL(kdisplayFontChanged()),SLOT(slotFontChanged()));
}
@ -283,7 +279,6 @@ void AccountDialog::setupSettings()
mPop.useSSLCheck->setChecked( ap.useSSL() );
mPop.storePasswordCheck->setChecked( ap.storePasswd() );
mPop.deleteMailCheck->setChecked( !ap.leaveOnServer() );
mPop.retriveAllCheck->setChecked( ap.retrieveAll() );
mPop.intervalCheck->setChecked( interval >= 1 );
mPop.intervalSpin->setValue( QMAX(1, interval) );
mPop.excludeCheck->setChecked( mAccount->checkExclude() );
@ -401,7 +396,6 @@ void AccountDialog::saveSettings()
epa.setStorePasswd( mPop.storePasswordCheck->isChecked() );
epa.setPasswd( mPop.passwordEdit->text(), epa.storePasswd() );
epa.setLeaveOnServer( !mPop.deleteMailCheck->isChecked() );
epa.setRetrieveAll( mPop.retriveAllCheck->isChecked() );
epa.setPrecommand( mPop.precommand->text() );
}

@ -45,7 +45,6 @@ KMAcctExpPop::KMAcctExpPop(KMAcctMgr* aOwner, const char* aAccountName):
mUseSSL = FALSE;
mStorePasswd = FALSE;
mLeaveOnServer = FALSE;
mRetrieveAll = FALSE;
mProtocol = 3;
struct servent *serv = getservbyname("pop-3", "tcp");
if (serv) {
@ -100,7 +99,6 @@ void KMAcctExpPop::init(void)
mUseSSL = FALSE;
mStorePasswd = FALSE;
mLeaveOnServer = FALSE;
mRetrieveAll = FALSE;
}
//-----------------------------------------------------------------------------
@ -119,7 +117,6 @@ void KMAcctExpPop::pseudoAssign(KMAccount* account)
setStorePasswd(acct->storePasswd());
setPasswd(acct->passwd(), acct->storePasswd());
setLeaveOnServer(acct->leaveOnServer());
setRetrieveAll(acct->retrieveAll());
setPrecommand(acct->precommand());
}
@ -169,7 +166,6 @@ void KMAcctExpPop::readConfig(KConfig& config)
mPort = config.readNumEntry("port");
mProtocol = config.readNumEntry("protocol");
mLeaveOnServer = config.readNumEntry("leave-on-server", FALSE);
mRetrieveAll = config.readNumEntry("retrieve-all", FALSE);
}
@ -188,7 +184,6 @@ void KMAcctExpPop::writeConfig(KConfig& config)
config.writeEntry("port", static_cast<int>(mPort));
config.writeEntry("protocol", mProtocol);
config.writeEntry("leave-on-server", mLeaveOnServer);
config.writeEntry("retrieve-all", mRetrieveAll);
}
@ -225,12 +220,14 @@ void KMAcctExpPop::setUseSSL(bool b)
mUseSSL = b;
}
//-----------------------------------------------------------------------------
void KMAcctExpPop::setStorePasswd(bool b)
{
mStorePasswd = b;
}
//-----------------------------------------------------------------------------
void KMAcctExpPop::setLeaveOnServer(bool b)
{
@ -238,24 +235,20 @@ void KMAcctExpPop::setLeaveOnServer(bool b)
}
//-----------------------------------------------------------------------------
void KMAcctExpPop::setRetrieveAll(bool b)
{
mRetrieveAll = b;
}
//-----------------------------------------------------------------------------
void KMAcctExpPop::setLogin(const QString& aLogin)
{
mLogin = aLogin;
}
//-----------------------------------------------------------------------------
const QString KMAcctExpPop::passwd(void) const
{
return decryptStr(mPasswd);
}
//-----------------------------------------------------------------------------
void KMAcctExpPop::setPasswd(const QString& aPasswd, bool aStoreInConfig)
{
@ -722,24 +715,22 @@ void KMAcctExpPop::slotData( KIO::Job* job, const QByteArray &data)
QString uid = qdata.mid(spc + 1);
uidsOfMsgs.append( uid );
if (uidsOfSeenMsgs.contains(uid)) {
if (!mRetrieveAll) {
QString id = qdata.left(spc);
url.setPath(QString("/download/%1").arg(id));
int idx = idsOfMsgsPendingDownload.findIndex(url.url());
if (idx != -1) {
lensOfMsgsPendingDownload.remove( lensOfMsgsPendingDownload
.at( idx ));
idsOfMsgsPendingDownload.remove(url.url());
idsOfMsgs.remove( id );
uidsOfMsgs.remove( uid );
}
else
kdDebug() << "KMAcctExpPop::slotData synchronization failure." << endl;
url.setPath(QString("/%1").arg(id));
if (uidsOfSeenMsgs.contains( uid ))
idsOfMsgsToDelete.append(url.url());
}
uidsOfNextSeenMsgs.append( uid );
QString id = qdata.left(spc);
url.setPath(QString("/download/%1").arg(id));
int idx = idsOfMsgsPendingDownload.findIndex(url.url());
if (idx != -1) {
lensOfMsgsPendingDownload.remove( lensOfMsgsPendingDownload
.at( idx ));
idsOfMsgsPendingDownload.remove(url.url());
idsOfMsgs.remove( id );
uidsOfMsgs.remove( uid );
}
else
kdDebug() << "KMAcctExpPop::slotData synchronization failure." << endl;
url.setPath(QString("/%1").arg(id));
if (uidsOfSeenMsgs.contains( uid ))
idsOfMsgsToDelete.append(url.url());
uidsOfNextSeenMsgs.append( uid );
}
}
}

@ -67,10 +67,6 @@ public:
bool leaveOnServer(void) const { return mLeaveOnServer; }
virtual void setLeaveOnServer(bool);
/** Retrieve all messages from server (TRUE) or unread messages only. */
bool retrieveAll(void) const { return mRetrieveAll; }
virtual void setRetrieveAll(bool);
/** Inherited methods. */
virtual const char* type(void) const;
virtual void readConfig(KConfig&);
@ -106,7 +102,6 @@ protected:
bool mUseSSL;
bool mStorePasswd;
bool mLeaveOnServer;
bool mRetrieveAll;
bool gotMsgs;
KIO::Job *job;

@ -1518,11 +1518,6 @@ KMAccountSettings::KMAccountSettings(QWidget *parent, const char *name,
mChkDelete->setChecked(!((KMAcctExpPop*)mAcct)->leaveOnServer());
grid->addMultiCellWidget(mChkDelete, 8, 8, 1, 2);
mChkRetrieveAll=new QCheckBox(i18n("Retrieve all mail from server"), this);
mChkRetrieveAll->setMinimumSize(mChkRetrieveAll->sizeHint());
mChkRetrieveAll->setChecked(((KMAcctExpPop*)mAcct)->retrieveAll());
grid->addMultiCellWidget(mChkRetrieveAll, 9, 9, 1, 2);
}
else
{
@ -1669,7 +1664,6 @@ void KMAccountSettings::accept()
((KMAcctExpPop*)mAcct)->setPasswd(mEdtPasswd->text(),
((KMAcctExpPop*)mAcct)->storePasswd());
((KMAcctExpPop*)mAcct)->setLeaveOnServer(!mChkDelete->isChecked());
((KMAcctExpPop*)mAcct)->setRetrieveAll(mChkRetrieveAll->isChecked());
}
kernel->acctMgr()->writeConfig(TRUE);

@ -130,7 +130,6 @@ private:
QComboBox *mFolders;
KMAccount *mAcct;
QCheckBox *mStorePasswd, *mChkDelete, *mChkInterval, *mChkExclude;
QCheckBox *mChkRetrieveAll;
};
#endif

Loading…
Cancel
Save