author | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-02 12:21:11 (UTC) |
commit | b6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (unidiff) | |
tree | d3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/net/mail/editaccounts.cpp | |
parent | 0d59c780513da78033f4d9040475dee9db0256d4 (diff) | |
download | opie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2 |
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 60bffa5..edeb1de 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -191,342 +191,342 @@ void EditAccounts::slotDeleteAccount( Account *account ) | |||
191 | 191 | ||
192 | void EditAccounts::slotEditMail() | 192 | void EditAccounts::slotEditMail() |
193 | { | 193 | { |
194 | qDebug( "Edit Mail Account" ); | 194 | qDebug( "Edit Mail Account" ); |
195 | if ( !mailList->currentItem() ) | 195 | if ( !mailList->currentItem() ) |
196 | { | 196 | { |
197 | QMessageBox::information( this, tr( "Error" ), | 197 | QMessageBox::information( this, tr( "Error" ), |
198 | tr( "<p>Please select an account.</p>" ), | 198 | tr( "<p>Please select an account.</p>" ), |
199 | tr( "Ok" ) ); | 199 | tr( "Ok" ) ); |
200 | return; | 200 | return; |
201 | } | 201 | } |
202 | 202 | ||
203 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); | 203 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); |
204 | slotEditAccount( a ); | 204 | slotEditAccount( a ); |
205 | } | 205 | } |
206 | 206 | ||
207 | void EditAccounts::slotDeleteMail() | 207 | void EditAccounts::slotDeleteMail() |
208 | { | 208 | { |
209 | if ( !mailList->currentItem() ) | 209 | if ( !mailList->currentItem() ) |
210 | { | 210 | { |
211 | QMessageBox::information( this, tr( "Error" ), | 211 | QMessageBox::information( this, tr( "Error" ), |
212 | tr( "<p>Please select an account.</p>" ), | 212 | tr( "<p>Please select an account.</p>" ), |
213 | tr( "Ok" ) ); | 213 | tr( "Ok" ) ); |
214 | return; | 214 | return; |
215 | } | 215 | } |
216 | 216 | ||
217 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); | 217 | Account *a = ((AccountListItem *) mailList->currentItem())->getAccount(); |
218 | slotDeleteAccount( a ); | 218 | slotDeleteAccount( a ); |
219 | } | 219 | } |
220 | 220 | ||
221 | void EditAccounts::slotNewNews() | 221 | void EditAccounts::slotNewNews() |
222 | { | 222 | { |
223 | qDebug( "New News Account" ); | 223 | qDebug( "New News Account" ); |
224 | slotNewAccount( "NNTP" ); | 224 | slotNewAccount( "NNTP" ); |
225 | } | 225 | } |
226 | 226 | ||
227 | void EditAccounts::slotEditNews() | 227 | void EditAccounts::slotEditNews() |
228 | { | 228 | { |
229 | qDebug( "Edit News Account" ); | 229 | qDebug( "Edit News Account" ); |
230 | if ( !newsList->currentItem() ) | 230 | if ( !newsList->currentItem() ) |
231 | { | 231 | { |
232 | QMessageBox::information( this, tr( "Error" ), | 232 | QMessageBox::information( this, tr( "Error" ), |
233 | tr( "<p>Please select an account.</p>" ), | 233 | tr( "<p>Please select an account.</p>" ), |
234 | tr( "Ok" ) ); | 234 | tr( "Ok" ) ); |
235 | return; | 235 | return; |
236 | } | 236 | } |
237 | 237 | ||
238 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); | 238 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); |
239 | slotEditAccount( a ); | 239 | slotEditAccount( a ); |
240 | } | 240 | } |
241 | 241 | ||
242 | void EditAccounts::slotDeleteNews() | 242 | void EditAccounts::slotDeleteNews() |
243 | { | 243 | { |
244 | qDebug( "Delete News Account" ); | 244 | qDebug( "Delete News Account" ); |
245 | if ( !newsList->currentItem() ) | 245 | if ( !newsList->currentItem() ) |
246 | { | 246 | { |
247 | QMessageBox::information( this, tr( "Error" ), | 247 | QMessageBox::information( this, tr( "Error" ), |
248 | tr( "<p>Please select an account.</p>" ), | 248 | tr( "<p>Please select an account.</p>" ), |
249 | tr( "Ok" ) ); | 249 | tr( "Ok" ) ); |
250 | return; | 250 | return; |
251 | } | 251 | } |
252 | 252 | ||
253 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); | 253 | Account *a = ((AccountListItem *) newsList->currentItem())->getAccount(); |
254 | slotDeleteAccount( a ); | 254 | slotDeleteAccount( a ); |
255 | } | 255 | } |
256 | 256 | ||
257 | void EditAccounts::slotAdjustColumns() | 257 | void EditAccounts::slotAdjustColumns() |
258 | { | 258 | { |
259 | int currPage = configTab->currentPageIndex(); | 259 | int currPage = configTab->currentPageIndex(); |
260 | 260 | ||
261 | configTab->showPage( mailTab ); | 261 | configTab->showPage( mailTab ); |
262 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); | 262 | mailList->setColumnWidth( 0, mailList->visibleWidth() - 50 ); |
263 | mailList->setColumnWidth( 1, 50 ); | 263 | mailList->setColumnWidth( 1, 50 ); |
264 | 264 | ||
265 | configTab->showPage( newsTab ); | 265 | configTab->showPage( newsTab ); |
266 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); | 266 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); |
267 | 267 | ||
268 | configTab->setCurrentPage( currPage ); | 268 | configTab->setCurrentPage( currPage ); |
269 | } | 269 | } |
270 | 270 | ||
271 | void EditAccounts::accept() | 271 | void EditAccounts::accept() |
272 | { | 272 | { |
273 | settings->saveAccounts(); | 273 | settings->saveAccounts(); |
274 | 274 | ||
275 | QDialog::accept(); | 275 | QDialog::accept(); |
276 | } | 276 | } |
277 | 277 | ||
278 | /** | 278 | /** |
279 | * SelectMailType | 279 | * SelectMailType |
280 | */ | 280 | */ |
281 | 281 | ||
282 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) | 282 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) |
283 | : SelectMailTypeUI( parent, name, modal, flags ) | 283 | : SelectMailTypeUI( parent, name, modal, flags ) |
284 | { | 284 | { |
285 | selected = selection; | 285 | selected = selection; |
286 | selected->replace( 0, selected->length(), typeBox->currentText() ); | 286 | selected->replace( 0, selected->length(), typeBox->currentText() ); |
287 | connect( typeBox, SIGNAL( activated( const QString & ) ), SLOT( slotSelection( const QString & ) ) ); | 287 | connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) ); |
288 | } | 288 | } |
289 | 289 | ||
290 | void SelectMailType::slotSelection( const QString &sel ) | 290 | void SelectMailType::slotSelection( const QString &sel ) |
291 | { | 291 | { |
292 | selected->replace( 0, selected->length(), sel ); | 292 | selected->replace( 0, selected->length(), sel ); |
293 | } | 293 | } |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * IMAPconfig | 296 | * IMAPconfig |
297 | */ | 297 | */ |
298 | 298 | ||
299 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 299 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
300 | : IMAPconfigUI( parent, name, modal, flags ) | 300 | : IMAPconfigUI( parent, name, modal, flags ) |
301 | { | 301 | { |
302 | data = account; | 302 | data = account; |
303 | 303 | ||
304 | fillValues(); | 304 | fillValues(); |
305 | 305 | ||
306 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 306 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
307 | ComboBox1->insertItem( "Only if available", 0 ); | 307 | ComboBox1->insertItem( "Only if available", 0 ); |
308 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 308 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
309 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 309 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
310 | ComboBox1->insertItem( "Run command instead", 3 ); | 310 | ComboBox1->insertItem( "Run command instead", 3 ); |
311 | CommandEdit->hide(); | 311 | CommandEdit->hide(); |
312 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 312 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
313 | } | 313 | } |
314 | 314 | ||
315 | void IMAPconfig::slotConnectionToggle( int index ) | 315 | void IMAPconfig::slotConnectionToggle( int index ) |
316 | { | 316 | { |
317 | if ( index == 2 ) | 317 | if ( index == 2 ) |
318 | { | 318 | { |
319 | portLine->setText( IMAP_SSL_PORT ); | 319 | portLine->setText( IMAP_SSL_PORT ); |
320 | } | 320 | } |
321 | else if ( index == 3 ) | 321 | else if ( index == 3 ) |
322 | { | 322 | { |
323 | portLine->setText( IMAP_PORT ); | 323 | portLine->setText( IMAP_PORT ); |
324 | CommandEdit->show(); | 324 | CommandEdit->show(); |
325 | } | 325 | } |
326 | else | 326 | else |
327 | { | 327 | { |
328 | portLine->setText( IMAP_PORT ); | 328 | portLine->setText( IMAP_PORT ); |
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | void IMAPconfig::fillValues() | 332 | void IMAPconfig::fillValues() |
333 | { | 333 | { |
334 | accountLine->setText( data->getAccountName() ); | 334 | accountLine->setText( data->getAccountName() ); |
335 | serverLine->setText( data->getServer() ); | 335 | serverLine->setText( data->getServer() ); |
336 | portLine->setText( data->getPort() ); | 336 | portLine->setText( data->getPort() ); |
337 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 337 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
338 | userLine->setText( data->getUser() ); | 338 | userLine->setText( data->getUser() ); |
339 | passLine->setText( data->getPassword() ); | 339 | passLine->setText( data->getPassword() ); |
340 | prefixLine->setText(data->getPrefix()); | 340 | prefixLine->setText(data->getPrefix()); |
341 | } | 341 | } |
342 | 342 | ||
343 | void IMAPconfig::accept() | 343 | void IMAPconfig::accept() |
344 | { | 344 | { |
345 | data->setAccountName( accountLine->text() ); | 345 | data->setAccountName( accountLine->text() ); |
346 | data->setServer( serverLine->text() ); | 346 | data->setServer( serverLine->text() ); |
347 | data->setPort( portLine->text() ); | 347 | data->setPort( portLine->text() ); |
348 | data->setConnectionType( ComboBox1->currentItem() ); | 348 | data->setConnectionType( ComboBox1->currentItem() ); |
349 | data->setUser( userLine->text() ); | 349 | data->setUser( userLine->text() ); |
350 | data->setPassword( passLine->text() ); | 350 | data->setPassword( passLine->text() ); |
351 | data->setPrefix(prefixLine->text()); | 351 | data->setPrefix(prefixLine->text()); |
352 | 352 | ||
353 | QDialog::accept(); | 353 | QDialog::accept(); |
354 | } | 354 | } |
355 | 355 | ||
356 | /** | 356 | /** |
357 | * POP3config | 357 | * POP3config |
358 | */ | 358 | */ |
359 | 359 | ||
360 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 360 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
361 | : POP3configUI( parent, name, modal, flags ) | 361 | : POP3configUI( parent, name, modal, flags ) |
362 | { | 362 | { |
363 | data = account; | 363 | data = account; |
364 | fillValues(); | 364 | fillValues(); |
365 | 365 | ||
366 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 366 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
367 | ComboBox1->insertItem( "Only if available", 0 ); | 367 | ComboBox1->insertItem( "Only if available", 0 ); |
368 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 368 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
369 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 369 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
370 | ComboBox1->insertItem( "Run command instead", 3 ); | 370 | ComboBox1->insertItem( "Run command instead", 3 ); |
371 | CommandEdit->hide(); | 371 | CommandEdit->hide(); |
372 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 372 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
373 | } | 373 | } |
374 | 374 | ||
375 | void POP3config::slotConnectionToggle( int index ) | 375 | void POP3config::slotConnectionToggle( int index ) |
376 | { | 376 | { |
377 | // 2 is ssl connection | 377 | // 2 is ssl connection |
378 | if ( index == 2 ) | 378 | if ( index == 2 ) |
379 | { | 379 | { |
380 | portLine->setText( POP3_SSL_PORT ); | 380 | portLine->setText( POP3_SSL_PORT ); |
381 | } | 381 | } |
382 | else if ( index == 3 ) | 382 | else if ( index == 3 ) |
383 | { | 383 | { |
384 | portLine->setText( POP3_PORT ); | 384 | portLine->setText( POP3_PORT ); |
385 | CommandEdit->show(); | 385 | CommandEdit->show(); |
386 | } | 386 | } |
387 | else | 387 | else |
388 | { | 388 | { |
389 | portLine->setText( POP3_PORT ); | 389 | portLine->setText( POP3_PORT ); |
390 | } | 390 | } |
391 | } | 391 | } |
392 | 392 | ||
393 | void POP3config::fillValues() | 393 | void POP3config::fillValues() |
394 | { | 394 | { |
395 | accountLine->setText( data->getAccountName() ); | 395 | accountLine->setText( data->getAccountName() ); |
396 | serverLine->setText( data->getServer() ); | 396 | serverLine->setText( data->getServer() ); |
397 | portLine->setText( data->getPort() ); | 397 | portLine->setText( data->getPort() ); |
398 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 398 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
399 | userLine->setText( data->getUser() ); | 399 | userLine->setText( data->getUser() ); |
400 | passLine->setText( data->getPassword() ); | 400 | passLine->setText( data->getPassword() ); |
401 | } | 401 | } |
402 | 402 | ||
403 | void POP3config::accept() | 403 | void POP3config::accept() |
404 | { | 404 | { |
405 | data->setAccountName( accountLine->text() ); | 405 | data->setAccountName( accountLine->text() ); |
406 | data->setServer( serverLine->text() ); | 406 | data->setServer( serverLine->text() ); |
407 | data->setPort( portLine->text() ); | 407 | data->setPort( portLine->text() ); |
408 | data->setConnectionType( ComboBox1->currentItem() ); | 408 | data->setConnectionType( ComboBox1->currentItem() ); |
409 | data->setUser( userLine->text() ); | 409 | data->setUser( userLine->text() ); |
410 | data->setPassword( passLine->text() ); | 410 | data->setPassword( passLine->text() ); |
411 | 411 | ||
412 | QDialog::accept(); | 412 | QDialog::accept(); |
413 | } | 413 | } |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * SMTPconfig | 416 | * SMTPconfig |
417 | */ | 417 | */ |
418 | 418 | ||
419 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 419 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
420 | : SMTPconfigUI( parent, name, modal, flags ) | 420 | : SMTPconfigUI( parent, name, modal, flags ) |
421 | { | 421 | { |
422 | data = account; | 422 | data = account; |
423 | 423 | ||
424 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); | 424 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
425 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 425 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
426 | 426 | ||
427 | fillValues(); | 427 | fillValues(); |
428 | 428 | ||
429 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 429 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
430 | ComboBox1->insertItem( "Only if available", 0 ); | 430 | ComboBox1->insertItem( "Only if available", 0 ); |
431 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 431 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
432 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 432 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
433 | ComboBox1->insertItem( "Run command instead", 3 ); | 433 | ComboBox1->insertItem( "Run command instead", 3 ); |
434 | CommandEdit->hide(); | 434 | CommandEdit->hide(); |
435 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 435 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
436 | } | 436 | } |
437 | 437 | ||
438 | void SMTPconfig::slotConnectionToggle( int index ) | 438 | void SMTPconfig::slotConnectionToggle( int index ) |
439 | { | 439 | { |
440 | // 2 is ssl connection | 440 | // 2 is ssl connection |
441 | if ( index == 2 ) | 441 | if ( index == 2 ) |
442 | { | 442 | { |
443 | portLine->setText( SMTP_SSL_PORT ); | 443 | portLine->setText( SMTP_SSL_PORT ); |
444 | } | 444 | } |
445 | else if ( index == 3 ) | 445 | else if ( index == 3 ) |
446 | { | 446 | { |
447 | portLine->setText( SMTP_PORT ); | 447 | portLine->setText( SMTP_PORT ); |
448 | CommandEdit->show(); | 448 | CommandEdit->show(); |
449 | } | 449 | } |
450 | else | 450 | else |
451 | { | 451 | { |
452 | portLine->setText( SMTP_PORT ); | 452 | portLine->setText( SMTP_PORT ); |
453 | } | 453 | } |
454 | } | 454 | } |
455 | 455 | ||
456 | void SMTPconfig::fillValues() | 456 | void SMTPconfig::fillValues() |
457 | { | 457 | { |
458 | accountLine->setText( data->getAccountName() ); | 458 | accountLine->setText( data->getAccountName() ); |
459 | serverLine->setText( data->getServer() ); | 459 | serverLine->setText( data->getServer() ); |
460 | portLine->setText( data->getPort() ); | 460 | portLine->setText( data->getPort() ); |
461 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 461 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
462 | loginBox->setChecked( data->getLogin() ); | 462 | loginBox->setChecked( data->getLogin() ); |
463 | userLine->setText( data->getUser() ); | 463 | userLine->setText( data->getUser() ); |
464 | passLine->setText( data->getPassword() ); | 464 | passLine->setText( data->getPassword() ); |
465 | } | 465 | } |
466 | 466 | ||
467 | void SMTPconfig::accept() | 467 | void SMTPconfig::accept() |
468 | { | 468 | { |
469 | data->setAccountName( accountLine->text() ); | 469 | data->setAccountName( accountLine->text() ); |
470 | data->setServer( serverLine->text() ); | 470 | data->setServer( serverLine->text() ); |
471 | data->setPort( portLine->text() ); | 471 | data->setPort( portLine->text() ); |
472 | data->setConnectionType( ComboBox1->currentItem() ); | 472 | data->setConnectionType( ComboBox1->currentItem() ); |
473 | data->setLogin( loginBox->isChecked() ); | 473 | data->setLogin( loginBox->isChecked() ); |
474 | data->setUser( userLine->text() ); | 474 | data->setUser( userLine->text() ); |
475 | data->setPassword( passLine->text() ); | 475 | data->setPassword( passLine->text() ); |
476 | 476 | ||
477 | QDialog::accept(); | 477 | QDialog::accept(); |
478 | } | 478 | } |
479 | 479 | ||
480 | /** | 480 | /** |
481 | * NNTPconfig | 481 | * NNTPconfig |
482 | */ | 482 | */ |
483 | 483 | ||
484 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 484 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
485 | : NNTPconfigUI( parent, name, modal, flags ) | 485 | : NNTPconfigUI( parent, name, modal, flags ) |
486 | { | 486 | { |
487 | data = account; | 487 | data = account; |
488 | 488 | ||
489 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); | 489 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
490 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 490 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
491 | 491 | ||
492 | fillValues(); | 492 | fillValues(); |
493 | 493 | ||
494 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); | 494 | connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); |
495 | } | 495 | } |
496 | 496 | ||
497 | void NNTPconfig::slotSSL( bool enabled ) | 497 | void NNTPconfig::slotSSL( bool enabled ) |
498 | { | 498 | { |
499 | if ( enabled ) | 499 | if ( enabled ) |
500 | { | 500 | { |
501 | portLine->setText( NNTP_SSL_PORT ); | 501 | portLine->setText( NNTP_SSL_PORT ); |
502 | } | 502 | } |
503 | else | 503 | else |
504 | { | 504 | { |
505 | portLine->setText( NNTP_PORT ); | 505 | portLine->setText( NNTP_PORT ); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | void NNTPconfig::fillValues() | 509 | void NNTPconfig::fillValues() |
510 | { | 510 | { |
511 | accountLine->setText( data->getAccountName() ); | 511 | accountLine->setText( data->getAccountName() ); |
512 | serverLine->setText( data->getServer() ); | 512 | serverLine->setText( data->getServer() ); |
513 | portLine->setText( data->getPort() ); | 513 | portLine->setText( data->getPort() ); |
514 | sslBox->setChecked( data->getSSL() ); | 514 | sslBox->setChecked( data->getSSL() ); |
515 | loginBox->setChecked( data->getLogin() ); | 515 | loginBox->setChecked( data->getLogin() ); |
516 | userLine->setText( data->getUser() ); | 516 | userLine->setText( data->getUser() ); |
517 | passLine->setText( data->getPassword() ); | 517 | passLine->setText( data->getPassword() ); |
518 | } | 518 | } |
519 | 519 | ||
520 | void NNTPconfig::accept() | 520 | void NNTPconfig::accept() |
521 | { | 521 | { |
522 | data->setAccountName( accountLine->text() ); | 522 | data->setAccountName( accountLine->text() ); |
523 | data->setServer( serverLine->text() ); | 523 | data->setServer( serverLine->text() ); |
524 | data->setPort( portLine->text() ); | 524 | data->setPort( portLine->text() ); |
525 | data->setSSL( sslBox->isChecked() ); | 525 | data->setSSL( sslBox->isChecked() ); |
526 | data->setLogin( loginBox->isChecked() ); | 526 | data->setLogin( loginBox->isChecked() ); |
527 | data->setUser( userLine->text() ); | 527 | data->setUser( userLine->text() ); |
528 | data->setPassword( passLine->text() ); | 528 | data->setPassword( passLine->text() ); |
529 | 529 | ||
530 | QDialog::accept(); | 530 | QDialog::accept(); |
531 | } | 531 | } |
532 | 532 | ||