-rw-r--r-- | kmicromail/editaccounts.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp index 7ad4ec8..c931e45 100644 --- a/kmicromail/editaccounts.cpp +++ b/kmicromail/editaccounts.cpp @@ -57,144 +57,144 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool mailList->addColumn( i18n( "Account" ) ); mailList->addColumn( i18n( "Type" ) ); newsList->addColumn( i18n( "Account" ) ); connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); connect( newNews, SIGNAL( clicked() ), SLOT( slotNewNews() ) ); connect( editNews, SIGNAL( clicked() ), SLOT( slotEditNews() ) ); connect( deleteNews, SIGNAL( clicked() ), SLOT( slotDeleteNews() ) ); slotFillLists(); } void EditAccounts::slotFillLists() { mailList->clear(); newsList->clear(); QList<Account> accounts = settings->getAccounts(); Account *it; for ( it = accounts.first(); it; it = accounts.next() ) { if ( it->getType()==MAILLIB::A_NNTP ) { (void) new AccountListItem( newsList, it ); } else { (void) new AccountListItem( mailList, it ); } } } void EditAccounts::slotNewMail() { QString *selection = new QString(); SelectMailType selType( selection, this, 0, true ); selType.show(); if ( QDialog::Accepted == selType.exec() ) { slotNewAccount( *selection ); } } void EditAccounts::slotNewAccount( const QString &type ) { - if ( type.compare( "IMAP" ) == 0 ) + if ( type.compare( i18n("IMAP") ) == 0 ) { IMAPaccount *account = new IMAPaccount(); IMAPconfig imap( account, this, 0, true ); imap.showMaximized(); if ( QDialog::Accepted == imap.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } - else if ( type.compare( "POP3" ) == 0 ) + else if ( type.compare( i18n("POP3") ) == 0 ) { POP3account *account = new POP3account(); POP3config pop3( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } - else if ( type.compare( "SMTP" ) == 0 ) + else if ( type.compare( i18n("SMTP") ) == 0 ) { SMTPaccount *account = new SMTPaccount(); SMTPconfig smtp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } - else if ( type.compare( "NNTP" ) == 0 ) + else if ( type.compare( i18n("NNTP") ) == 0 ) { NNTPaccount *account = new NNTPaccount(); NNTPconfig nntp( account, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &nntp ) ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } } void EditAccounts::slotEditAccount( Account *account ) { if ( account->getType() == MAILLIB::A_IMAP ) { IMAPaccount *imapAcc = static_cast<IMAPaccount *>(account); IMAPconfig imap( imapAcc, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &imap ) ) { slotFillLists(); } } else if ( account->getType()==MAILLIB::A_POP3 ) { POP3account *pop3Acc = static_cast<POP3account *>(account); POP3config pop3( pop3Acc, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &pop3 ) ) { slotFillLists(); } } else if ( account->getType()==MAILLIB::A_SMTP ) { SMTPaccount *smtpAcc = static_cast<SMTPaccount *>(account); SMTPconfig smtp( smtpAcc, this, 0, true, WStyle_ContextHelp ); if ( QDialog::Accepted == KApplication::execDialog( &smtp ) ) { slotFillLists(); } } else if ( account->getType()==MAILLIB::A_NNTP) { NNTPaccount *nntpAcc = static_cast<NNTPaccount *>(account); |