-rw-r--r-- | noncore/net/mail/nntpgroups.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/nntpgroups.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/nntpgroupsui.ui | 49 |
3 files changed, 52 insertions, 6 deletions
diff --git a/noncore/net/mail/nntpgroups.cpp b/noncore/net/mail/nntpgroups.cpp index 97b1985..8741c4b 100644 --- a/noncore/net/mail/nntpgroups.cpp +++ b/noncore/net/mail/nntpgroups.cpp @@ -5,2 +5,3 @@ #include <qlistview.h> +#include <qlineedit.h> @@ -23,3 +24,5 @@ void NNTPGroups::slotGetNG() NNTPwrapper tmp( m_Account ); - QStringList list = tmp.listAllNewsgroups(); + QString filter = Groupfilteredit->text(); + QStringList list = tmp.listAllNewsgroups(filter); + subscribedGroupsNotListed = subscribedGroups; for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { @@ -29,2 +32,3 @@ void NNTPGroups::slotGetNG() item->setOn( true ); + subscribedGroupsNotListed.remove((*it)); } @@ -55,2 +59,3 @@ void NNTPGroups::storeValues() } + subscribedGroups+=subscribedGroupsNotListed; m_Account->setGroups( subscribedGroups ); diff --git a/noncore/net/mail/nntpgroups.h b/noncore/net/mail/nntpgroups.h index 8cc2e8b..e5b7c35 100644 --- a/noncore/net/mail/nntpgroups.h +++ b/noncore/net/mail/nntpgroups.h @@ -29,3 +29,3 @@ protected: NNTPaccount*m_Account; - QStringList subscribedGroups; + QStringList subscribedGroups,subscribedGroupsNotListed; }; diff --git a/noncore/net/mail/nntpgroupsui.ui b/noncore/net/mail/nntpgroupsui.ui index 93f487b..2902731 100644 --- a/noncore/net/mail/nntpgroupsui.ui +++ b/noncore/net/mail/nntpgroupsui.ui @@ -13,4 +13,4 @@ <y>0</y> - <width>356</width> - <height>406</height> + <width>254</width> + <height>330</height> </rect> @@ -30,3 +30,3 @@ <name>margin</name> - <number>2</number> + <number>1</number> </property> @@ -34,3 +34,3 @@ <name>spacing</name> - <number>2</number> + <number>1</number> </property> @@ -62,2 +62,43 @@ <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout1</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>filterlabel</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Groupfilter:</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>Groupfilteredit</cstring> + </property> + <property> + <name>whatsThis</name> + <string>Enter a filter string here. +Then hit "get newsgroup list" again and only groups starting +with that filter will be listet.</string> + </property> + </widget> + </hbox> + </widget> + <widget> <class>QPushButton</class> |