author | harlekin <harlekin> | 2003-12-17 00:18:06 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-17 00:18:06 (UTC) |
commit | fb054f9c69224e14f446f405098bd5166377f58d (patch) (unidiff) | |
tree | 6c729398a7f69eedf5554aa3c2509784eb9806df /noncore/net/mail/editaccounts.cpp | |
parent | 30e3e50ecb912e93faeeafbfff36f8032a904b84 (diff) | |
download | opie-fb054f9c69224e14f446f405098bd5166377f58d.zip opie-fb054f9c69224e14f446f405098bd5166377f58d.tar.gz opie-fb054f9c69224e14f446f405098bd5166377f58d.tar.bz2 |
new account, changed account etc are there now without a restart ,)
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 29 |
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 | |||
@@ -16,12 +16,12 @@ EditAccounts::EditAccounts( Settings *s, QWidget *parent, const char *name, bool | |||
16 | { | 16 | { |
17 | qDebug( "New Account Configuration Widget" ); | 17 | qDebug( "New Account Configuration Widget" ); |
18 | settings = s; | 18 | settings = s; |
19 | 19 | ||
20 | mailList->addColumn( tr( "Account" ) ); | 20 | mailList->addColumn( tr( "Account" ) ); |
21 | mailList->addColumn( tr( "Type" ) ); | 21 | mailList->addColumn( tr( "Type" ) ); |
22 | 22 | ||
23 | newsList->addColumn( tr( "Account" ) ); | 23 | newsList->addColumn( tr( "Account" ) ); |
24 | 24 | ||
25 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); | 25 | connect( newMail, SIGNAL( clicked() ), SLOT( slotNewMail() ) ); |
26 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); | 26 | connect( editMail, SIGNAL( clicked() ), SLOT( slotEditMail() ) ); |
27 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); | 27 | connect( deleteMail, SIGNAL( clicked() ), SLOT( slotDeleteMail() ) ); |
@@ -70,7 +70,7 @@ void EditAccounts::slotNewAccount( const QString &type ) | |||
70 | settings->addAccount( account ); | 70 | settings->addAccount( account ); |
71 | account->save(); | 71 | account->save(); |
72 | slotFillLists(); | 72 | slotFillLists(); |
73 | } else { | 73 | } else { |
74 | account->remove(); | 74 | account->remove(); |
75 | } | 75 | } |
76 | } else if ( type.compare( "POP3" ) == 0 ) { | 76 | } else if ( type.compare( "POP3" ) == 0 ) { |
@@ -94,6 +94,7 @@ void EditAccounts::slotNewAccount( const QString &type ) | |||
94 | settings->addAccount( account ); | 94 | settings->addAccount( account ); |
95 | account->save(); | 95 | account->save(); |
96 | slotFillLists(); | 96 | slotFillLists(); |
97 | |||
97 | } else { | 98 | } else { |
98 | account->remove(); | 99 | account->remove(); |
99 | } | 100 | } |
@@ -147,7 +148,7 @@ void EditAccounts::slotEditAccount( Account *account ) | |||
147 | 148 | ||
148 | void EditAccounts::slotDeleteAccount( Account *account ) | 149 | void EditAccounts::slotDeleteAccount( Account *account ) |
149 | { | 150 | { |
150 | if ( QMessageBox::information( this, tr( "Question" ), | 151 | if ( QMessageBox::information( this, tr( "Question" ), |
151 | tr( "<p>Do you really want to delete the selected Account?</p>" ), | 152 | tr( "<p>Do you really want to delete the selected Account?</p>" ), |
152 | tr( "Yes" ), tr( "No" ) ) == 0 ) { | 153 | tr( "Yes" ), tr( "No" ) ) == 0 ) { |
153 | settings->delAccount( account ); | 154 | settings->delAccount( account ); |
@@ -159,7 +160,7 @@ void EditAccounts::slotEditMail() | |||
159 | { | 160 | { |
160 | qDebug( "Edit Mail Account" ); | 161 | qDebug( "Edit Mail Account" ); |
161 | if ( !mailList->currentItem() ) { | 162 | if ( !mailList->currentItem() ) { |
162 | QMessageBox::information( this, tr( "Error" ), | 163 | QMessageBox::information( this, tr( "Error" ), |
163 | tr( "<p>Please select an account.</p>" ), | 164 | tr( "<p>Please select an account.</p>" ), |
164 | tr( "Ok" ) ); | 165 | tr( "Ok" ) ); |
165 | return; | 166 | return; |
@@ -172,12 +173,12 @@ void EditAccounts::slotEditMail() | |||
172 | void EditAccounts::slotDeleteMail() | 173 | void EditAccounts::slotDeleteMail() |
173 | { | 174 | { |
174 | if ( !mailList->currentItem() ) { | 175 | if ( !mailList->currentItem() ) { |
175 | QMessageBox::information( this, tr( "Error" ), | 176 | QMessageBox::information( this, tr( "Error" ), |
176 | tr( "<p>Please select an account.</p>" ), | 177 | tr( "<p>Please select an account.</p>" ), |
177 | tr( "Ok" ) ); | 178 | tr( "Ok" ) ); |
178 | return; | 179 | return; |
179 | } | 180 | } |
180 | 181 | ||
181 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); | 182 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); |
182 | slotDeleteAccount( a ); | 183 | slotDeleteAccount( a ); |
183 | } | 184 | } |
@@ -192,7 +193,7 @@ void EditAccounts::slotEditNews() | |||
192 | { | 193 | { |
193 | qDebug( "Edit News Account" ); | 194 | qDebug( "Edit News Account" ); |
194 | if ( !newsList->currentItem() ) { | 195 | if ( !newsList->currentItem() ) { |
195 | QMessageBox::information( this, tr( "Error" ), | 196 | QMessageBox::information( this, tr( "Error" ), |
196 | tr( "<p>Please select an account.</p>" ), | 197 | tr( "<p>Please select an account.</p>" ), |
197 | tr( "Ok" ) ); | 198 | tr( "Ok" ) ); |
198 | return; | 199 | return; |
@@ -206,12 +207,12 @@ void EditAccounts::slotDeleteNews() | |||
206 | { | 207 | { |
207 | qDebug( "Delete News Account" ); | 208 | qDebug( "Delete News Account" ); |
208 | if ( !newsList->currentItem() ) { | 209 | if ( !newsList->currentItem() ) { |
209 | QMessageBox::information( this, tr( "Error" ), | 210 | QMessageBox::information( this, tr( "Error" ), |
210 | tr( "<p>Please select an account.</p>" ), | 211 | tr( "<p>Please select an account.</p>" ), |
211 | tr( "Ok" ) ); | 212 | tr( "Ok" ) ); |
212 | return; | 213 | return; |
213 | } | 214 | } |
214 | 215 | ||
215 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); | 216 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); |
216 | slotDeleteAccount( a ); | 217 | slotDeleteAccount( a ); |
217 | } | 218 | } |
@@ -219,7 +220,7 @@ void EditAccounts::slotDeleteNews() | |||
219 | void EditAccounts::slotAdjustColumns() | 220 | void EditAccounts::slotAdjustColumns() |
220 | { | 221 | { |
221 | int currPage = configTab->currentPageIndex(); | 222 | int currPage = configTab->currentPageIndex(); |
222 | 223 | ||
223 | configTab->showPage( mailTab ); | 224 | configTab->showPage( mailTab ); |
224 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); | 225 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); |
225 | mailList->setColumnWidth( 1, 50 ); | 226 | mailList->setColumnWidth( 1, 50 ); |
@@ -233,7 +234,7 @@ void EditAccounts::slotAdjustColumns() | |||
233 | void EditAccounts::accept() | 234 | void EditAccounts::accept() |
234 | { | 235 | { |
235 | settings->saveAccounts(); | 236 | settings->saveAccounts(); |
236 | 237 | ||
237 | QDialog::accept(); | 238 | QDialog::accept(); |
238 | } | 239 | } |
239 | 240 | ||
@@ -262,7 +263,7 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, | |||
262 | : IMAPconfigUI( parent, name, modal, flags ) | 263 | : IMAPconfigUI( parent, name, modal, flags ) |
263 | { | 264 | { |
264 | data = account; | 265 | data = account; |
265 | 266 | ||
266 | fillValues(); | 267 | fillValues(); |
267 | 268 | ||
268 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); | 269 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); |
@@ -429,7 +430,7 @@ NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, | |||
429 | 430 | ||
430 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); | 431 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); |
431 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 432 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); |
432 | 433 | ||
433 | fillValues(); | 434 | fillValues(); |
434 | 435 | ||
435 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); | 436 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); |