author | harlekin <harlekin> | 2004-03-06 00:44:40 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-03-06 00:44:40 (UTC) |
commit | 4aea85aa2e205040da3ebdf50debde8b296e3c61 (patch) (unidiff) | |
tree | 424ee07b5886d70d45cc5d3b5c9ed6d32fd06d5f /noncore/net | |
parent | 7b10be8e0ed88afe9e8964e6b5f1fe449cee3609 (diff) | |
download | opie-4aea85aa2e205040da3ebdf50debde8b296e3c61.zip opie-4aea85aa2e205040da3ebdf50debde8b296e3c61.tar.gz opie-4aea85aa2e205040da3ebdf50debde8b296e3c61.tar.bz2 |
ups, works now .-)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/nntpwrapper.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 215380d..b8aad11 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -512,17 +512,17 @@ void NNTPconfig::slotGetNG() { | |||
512 | current = list->first; | 512 | current = list->first; |
513 | for ( current=clist_begin(list);current!=NULL;current=clist_next(current) ) { | 513 | for ( current=clist_begin(list);current!=NULL;current=clist_next(current) ) { |
514 | group = ( newsnntp_group_description* ) current->data; | 514 | group = ( newsnntp_group_description* ) current->data; |
515 | // qDebug( group->grp_name ); | 515 | // qDebug( group->grp_name ); |
516 | 516 | ||
517 | QCheckListItem *item; | 517 | QCheckListItem *item; |
518 | item = new QCheckListItem( ListViewGroups, ( QString )group->grp_name, QCheckListItem::CheckBox ); | 518 | item = new QCheckListItem( ListViewGroups, ( QString )group->grp_name, QCheckListItem::CheckBox ); |
519 | if ( subscribedGroups.contains( ( QString )group->grp_name ) >= 1 ) { | 519 | if ( subscribedGroups.contains( ( QString )group->grp_name ) >= 1 ) { |
520 | item->setSelected( true ); | 520 | item->setOn( true ); |
521 | } | 521 | } |
522 | } | 522 | } |
523 | } | 523 | } |
524 | 524 | ||
525 | void NNTPconfig::slotSSL( bool enabled ) | 525 | void NNTPconfig::slotSSL( bool enabled ) |
526 | { | 526 | { |
527 | if ( enabled ) | 527 | if ( enabled ) |
528 | { | 528 | { |
@@ -552,24 +552,27 @@ void NNTPconfig::save() | |||
552 | data->setServer( serverLine->text() ); | 552 | data->setServer( serverLine->text() ); |
553 | data->setPort( portLine->text() ); | 553 | data->setPort( portLine->text() ); |
554 | data->setSSL( sslBox->isChecked() ); | 554 | data->setSSL( sslBox->isChecked() ); |
555 | data->setLogin( loginBox->isChecked() ); | 555 | data->setLogin( loginBox->isChecked() ); |
556 | data->setUser( userLine->text() ); | 556 | data->setUser( userLine->text() ); |
557 | data->setPassword( passLine->text() ); | 557 | data->setPassword( passLine->text() ); |
558 | 558 | ||
559 | QListViewItemIterator list_it( ListViewGroups ); | 559 | QListViewItemIterator list_it( ListViewGroups ); |
560 | for ( ; list_it.current(); ++list_it ) { | 560 | |
561 | QStringList groupList; | 561 | QStringList groupList; |
562 | if ( list_it.current()->isSelected() ) { | 562 | for ( ; list_it.current(); ++list_it ) { |
563 | |||
564 | if ( ( (QCheckListItem*)list_it.current() )->isOn() ) { | ||
563 | qDebug(list_it.current()->text(0) ); | 565 | qDebug(list_it.current()->text(0) ); |
564 | groupList.append( list_it.current()->text(0) ); | 566 | groupList.append( list_it.current()->text(0) ); |
565 | } | 567 | } |
566 | data->setGroups( groupList ); | 568 | |
567 | } | 569 | } |
570 | data->setGroups( groupList ); | ||
568 | } | 571 | } |
569 | 572 | ||
570 | void NNTPconfig::accept() | 573 | void NNTPconfig::accept() |
571 | { | 574 | { |
572 | save(); | 575 | save(); |
573 | QDialog::accept(); | 576 | QDialog::accept(); |
574 | } | 577 | } |
575 | 578 | ||
diff --git a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp index 2d6f9a3..ecdf848 100644 --- a/noncore/net/mail/libmailwrapper/nntpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/nntpwrapper.cpp | |||
@@ -119,17 +119,17 @@ void NNTPwrapper::login() | |||
119 | uint16_t port; | 119 | uint16_t port; |
120 | int err = NEWSNNTP_NO_ERROR; | 120 | int err = NEWSNNTP_NO_ERROR; |
121 | 121 | ||
122 | server = account->getServer().latin1(); | 122 | server = account->getServer().latin1(); |
123 | port = account->getPort().toUInt(); | 123 | port = account->getPort().toUInt(); |
124 | 124 | ||
125 | user = pass = 0; | 125 | user = pass = 0; |
126 | 126 | ||
127 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 127 | if ( ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) && account->getLogin() ) { |
128 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); | 128 | LoginDialog login( account->getUser(), account->getPassword(), NULL, 0, true ); |
129 | login.show(); | 129 | login.show(); |
130 | if ( QDialog::Accepted == login.exec() ) { | 130 | if ( QDialog::Accepted == login.exec() ) { |
131 | // ok | 131 | // ok |
132 | User = login.getUser().latin1(); | 132 | User = login.getUser().latin1(); |
133 | Pass = login.getPassword().latin1(); | 133 | Pass = login.getPassword().latin1(); |
134 | } else { | 134 | } else { |
135 | // cancel | 135 | // cancel |