summaryrefslogtreecommitdiff
path: root/noncore/net/mail/editaccounts.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/editaccounts.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp
index 2a1acc0..215380d 100644
--- a/noncore/net/mail/editaccounts.cpp
+++ b/noncore/net/mail/editaccounts.cpp
@@ -7,6 +7,7 @@
7 7
8/* QT */ 8/* QT */
9#include <qt.h> 9#include <qt.h>
10#include <qstringlist.h>
10 11
11#include <libmailwrapper/nntpwrapper.h> 12#include <libmailwrapper/nntpwrapper.h>
12 13
@@ -511,10 +512,13 @@ void NNTPconfig::slotGetNG() {
511 current = list->first; 512 current = list->first;
512 for ( current=clist_begin(list);current!=NULL;current=clist_next(current) ) { 513 for ( current=clist_begin(list);current!=NULL;current=clist_next(current) ) {
513 group = ( newsnntp_group_description* ) current->data; 514 group = ( newsnntp_group_description* ) current->data;
514 qDebug( group->grp_name ); 515 // qDebug( group->grp_name );
515 516
516 QCheckListItem *item; 517 QCheckListItem *item;
517 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 ) {
520 item->setSelected( true );
521 }
518 } 522 }
519} 523}
520 524
@@ -539,6 +543,7 @@ void NNTPconfig::fillValues()
539 loginBox->setChecked( data->getLogin() ); 543 loginBox->setChecked( data->getLogin() );
540 userLine->setText( data->getUser() ); 544 userLine->setText( data->getUser() );
541 passLine->setText( data->getPassword() ); 545 passLine->setText( data->getPassword() );
546 subscribedGroups = data->getGroups();
542} 547}
543 548
544void NNTPconfig::save() 549void NNTPconfig::save()
@@ -553,9 +558,12 @@ void NNTPconfig::save()
553 558
554 QListViewItemIterator list_it( ListViewGroups ); 559 QListViewItemIterator list_it( ListViewGroups );
555 for ( ; list_it.current(); ++list_it ) { 560 for ( ; list_it.current(); ++list_it ) {
561 QStringList groupList;
556 if ( list_it.current()->isSelected() ) { 562 if ( list_it.current()->isSelected() ) {
557 qDebug( list_it.current()->text(0) ); 563 qDebug(list_it.current()->text(0) );
564 groupList.append( list_it.current()->text(0) );
558 } 565 }
566 data->setGroups( groupList );
559 } 567 }
560} 568}
561 569