author | harlekin <harlekin> | 2004-03-06 00:20:22 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2004-03-06 00:20:22 (UTC) |
commit | 7b10be8e0ed88afe9e8964e6b5f1fe449cee3609 (patch) (side-by-side diff) | |
tree | 149f8aecef57768cd4cf9e0c35778a711c5b6cf4 /noncore/net/mail/editaccounts.cpp | |
parent | 6afcd375a640d5c6888bc111cd1d80a08f554136 (diff) | |
download | opie-7b10be8e0ed88afe9e8964e6b5f1fe449cee3609.zip opie-7b10be8e0ed88afe9e8964e6b5f1fe449cee3609.tar.gz opie-7b10be8e0ed88afe9e8964e6b5f1fe449cee3609.tar.bz2 |
save selected newsgroups
Diffstat (limited to 'noncore/net/mail/editaccounts.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 16 |
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 @@ -8,4 +8,5 @@ /* QT */ #include <qt.h> +#include <qstringlist.h> #include <libmailwrapper/nntpwrapper.h> @@ -512,8 +513,11 @@ void NNTPconfig::slotGetNG() { for ( current=clist_begin(list);current!=NULL;current=clist_next(current) ) { group = ( newsnntp_group_description* ) current->data; - qDebug( group->grp_name ); + // qDebug( group->grp_name ); - QCheckListItem *item; - item = new QCheckListItem( ListViewGroups, ( QString )group->grp_name, QCheckListItem::CheckBox ); + QCheckListItem *item; + item = new QCheckListItem( ListViewGroups, ( QString )group->grp_name, QCheckListItem::CheckBox ); + if ( subscribedGroups.contains( ( QString )group->grp_name ) >= 1 ) { + item->setSelected( true ); + } } } @@ -540,4 +544,5 @@ void NNTPconfig::fillValues() userLine->setText( data->getUser() ); passLine->setText( data->getPassword() ); + subscribedGroups = data->getGroups(); } @@ -554,7 +559,10 @@ void NNTPconfig::save() QListViewItemIterator list_it( ListViewGroups ); for ( ; list_it.current(); ++list_it ) { + QStringList groupList; if ( list_it.current()->isSelected() ) { - qDebug( list_it.current()->text(0) ); + qDebug(list_it.current()->text(0) ); + groupList.append( list_it.current()->text(0) ); } + data->setGroups( groupList ); } } |