-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 16 | ||||
-rw-r--r-- | noncore/net/mail/editaccounts.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/settings.h | 4 |
4 files changed, 19 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 | |||
@@ -9,2 +9,3 @@ | |||
9 | #include <qt.h> | 9 | #include <qt.h> |
10 | #include <qstringlist.h> | ||
10 | 11 | ||
@@ -513,6 +514,9 @@ void NNTPconfig::slotGetNG() { | |||
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 | } |
@@ -541,2 +545,3 @@ void NNTPconfig::fillValues() | |||
541 | passLine->setText( data->getPassword() ); | 545 | passLine->setText( data->getPassword() ); |
546 | subscribedGroups = data->getGroups(); | ||
542 | } | 547 | } |
@@ -555,5 +560,8 @@ void NNTPconfig::save() | |||
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 | } |
diff --git a/noncore/net/mail/editaccounts.h b/noncore/net/mail/editaccounts.h index 438a984..a9eb19f 100644 --- a/noncore/net/mail/editaccounts.h +++ b/noncore/net/mail/editaccounts.h | |||
@@ -145,2 +145,3 @@ protected slots: | |||
145 | private: | 145 | private: |
146 | QStringList subscribedGroups; | ||
146 | void save(); | 147 | void save(); |
diff --git a/noncore/net/mail/libmailwrapper/settings.cpp b/noncore/net/mail/libmailwrapper/settings.cpp index 65ca387..f64c17d 100644 --- a/noncore/net/mail/libmailwrapper/settings.cpp +++ b/noncore/net/mail/libmailwrapper/settings.cpp | |||
@@ -412,2 +412,3 @@ void NNTPaccount::read() | |||
412 | password = conf->readEntryCrypt( "Password" ); | 412 | password = conf->readEntryCrypt( "Password" ); |
413 | subscribedGroups = conf->readListEntry( "Subscribed", ',' ); | ||
413 | delete conf; | 414 | delete conf; |
@@ -429,2 +430,3 @@ void NNTPaccount::save() | |||
429 | conf->writeEntryCrypt( "Password", password ); | 430 | conf->writeEntryCrypt( "Password", password ); |
431 | conf->writeEntry( "Subscribed" , subscribedGroups, ',' ); | ||
430 | conf->write(); | 432 | conf->write(); |
diff --git a/noncore/net/mail/libmailwrapper/settings.h b/noncore/net/mail/libmailwrapper/settings.h index 8d7df92..1feedbf 100644 --- a/noncore/net/mail/libmailwrapper/settings.h +++ b/noncore/net/mail/libmailwrapper/settings.h | |||
@@ -128,2 +128,5 @@ public: | |||
128 | 128 | ||
129 | void setGroups( QStringList list ) { subscribedGroups = list; } | ||
130 | QStringList getGroups() { return subscribedGroups; } | ||
131 | |||
129 | private: | 132 | private: |
@@ -131,2 +134,3 @@ private: | |||
131 | bool login; | 134 | bool login; |
135 | QStringList subscribedGroups; | ||
132 | 136 | ||