-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 1 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.cpp | 5 | ||||
-rw-r--r-- | noncore/net/mail/opiemail.h | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 1c80adb..1246037 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp @@ -81,32 +81,33 @@ void EditAccounts::slotNewAccount( const QString &type ) if ( QDialog::Accepted == pop3.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } else if ( type.compare( "SMTP" ) == 0 ) { qDebug( "-> config SMTP" ); SMTPaccount *account = new SMTPaccount(); SMTPconfig smtp( account, this, 0, true ); smtp.showMaximized(); if ( QDialog::Accepted == smtp.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); + } else { account->remove(); } } else if ( type.compare( "NNTP" ) == 0 ) { qDebug( "-> config NNTP" ); NNTPaccount *account = new NNTPaccount(); NNTPconfig nntp( account, this, 0, true ); nntp.showMaximized(); if ( QDialog::Accepted == nntp.exec() ) { settings->addAccount( account ); account->save(); slotFillLists(); } else { account->remove(); } } diff --git a/noncore/net/mail/opiemail.cpp b/noncore/net/mail/opiemail.cpp index 93f3bb7..740e4cf 100644 --- a/noncore/net/mail/opiemail.cpp +++ b/noncore/net/mail/opiemail.cpp @@ -34,17 +34,22 @@ void OpieMail::slotSearchMails() { qDebug( "Search Mails" ); } void OpieMail::slotEditSettings() { qDebug( "Edit Settings" ); } void OpieMail::slotEditAccounts() { qDebug( "Edit Accounts" ); EditAccounts eaDialog( settings, this, 0, true ); eaDialog.showMaximized(); eaDialog.slotAdjustColumns(); eaDialog.exec(); + if ( settings ) delete settings; + settings = new Settings(); + + folderView->populate( settings->getAccounts() ); } + diff --git a/noncore/net/mail/opiemail.h b/noncore/net/mail/opiemail.h index 7bcd818..ba60297 100644 --- a/noncore/net/mail/opiemail.h +++ b/noncore/net/mail/opiemail.h @@ -1,26 +1,27 @@ #ifndef OPIEMAIL_H #define OPIEMAIL_H #include "mainwindow.h" #include "settings.h" class OpieMail : public MainWindow { Q_OBJECT public: OpieMail( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); static QString appName() { return QString::fromLatin1("opiemail"); } -protected slots: + +public slots: void slotComposeMail(); +protected slots: void slotSendQueued(); void slotSearchMails(); void slotEditSettings(); void slotEditAccounts(); - private: Settings *settings; }; #endif |