summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp29
1 files changed, 15 insertions, 14 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
@@ -17,10 +17,10 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool
qDebug( "New Account Configuration Widget" );
settings = s;
-
+
mailList->addColumn( tr( "Account" ) );
mailList->addColumn( tr( "Type" ) );
newsList->addColumn( tr( "Account" ) );
-
+
connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) );
connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) );
@@ -71,5 +71,5 @@ void EditAccounts::slotNewAccount( const QString &type )
account->save();
slotFillLists();
- } else {
+ } else {
account->remove();
}
@@ -95,4 +95,5 @@ void EditAccounts::slotNewAccount( const QString &type )
account->save();
slotFillLists();
+
} else {
account->remove();
@@ -148,5 +149,5 @@ void EditAccounts::slotEditAccount( Account *account )
void EditAccounts::slotDeleteAccount( Account *account )
{
- if ( QMessageBox::information( this, tr( "Question" ),
+ if ( QMessageBox::information( this, tr( "Question" ),
tr( "<p>Do you really want to delete the selected Account?</p>" ),
tr( "Yes" ), tr( "No" ) ) == 0 ) {
@@ -160,5 +161,5 @@ void EditAccounts::slotEditMail()
qDebug( "Edit Mail Account" );
if ( !mailList->currentItem() ) {
- QMessageBox::information( this, tr( "Error" ),
+ QMessageBox::information( this, tr( "Error" ),
tr( "<p>Please select an account.</p>" ),
tr( "Ok" ) );
@@ -173,10 +174,10 @@ void EditAccounts::slotDeleteMail()
{
if ( !mailList->currentItem() ) {
- QMessageBox::information( this, tr( "Error" ),
+ QMessageBox::information( this, tr( "Error" ),
tr( "<p>Please select an account.</p>" ),
tr( "Ok" ) );
return;
}
-
+
Account *a = ((AccountListItem *) mailList->currentItem())->getAccount();
slotDeleteAccount( a );
@@ -193,5 +194,5 @@ void EditAccounts::slotEditNews()
qDebug( "Edit News Account" );
if ( !newsList->currentItem() ) {
- QMessageBox::information( this, tr( "Error" ),
+ QMessageBox::information( this, tr( "Error" ),
tr( "<p>Please select an account.</p>" ),
tr( "Ok" ) );
@@ -207,10 +208,10 @@ void EditAccounts::slotDeleteNews()
qDebug( "Delete News Account" );
if ( !newsList->currentItem() ) {
- QMessageBox::information( this, tr( "Error" ),
+ QMessageBox::information( this, tr( "Error" ),
tr( "<p>Please select an account.</p>" ),
tr( "Ok" ) );
return;
}
-
+
Account *a = ((AccountListItem *) newsList->currentItem())->getAccount();
slotDeleteAccount( a );
@@ -220,5 +221,5 @@ void EditAccounts::slotAdjustColumns()
{
int currPage = configTab->currentPageIndex();
-
+
configTab->showPage( mailTab );
mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 );
@@ -234,5 +235,5 @@ void EditAccounts::accept()
{
settings->saveAccounts();
-
+
QDialog::accept();
}
@@ -263,5 +264,5 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name,
{
data = account;
-
+
fillValues();
@@ -430,5 +431,5 @@ NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name,
connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) );
connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) );
-
+
fillValues();