author | alwin <alwin> | 2004-03-06 12:36:55 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-06 12:36:55 (UTC) |
commit | a66fd5afde517e9a61e74fc17df617297f134c96 (patch) (side-by-side diff) | |
tree | 7bb9819c087516f6b0f3399bdec6d5ce225201e5 /noncore/net/mail/accountitem.cpp | |
parent | 5b49d47174925c1e2415641b77269b753688f5f1 (diff) | |
download | opie-a66fd5afde517e9a61e74fc17df617297f134c96.zip opie-a66fd5afde517e9a61e74fc17df617297f134c96.tar.gz opie-a66fd5afde517e9a61e74fc17df617297f134c96.tar.bz2 |
standalone dlg for (un-)subscribing newsgroups.
May be integrated into the standard nntp-settings-dialog, too.
Diffstat (limited to 'noncore/net/mail/accountitem.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/accountitem.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/noncore/net/mail/accountitem.cpp b/noncore/net/mail/accountitem.cpp index e925d8d..0d636a4 100644 --- a/noncore/net/mail/accountitem.cpp +++ b/noncore/net/mail/accountitem.cpp @@ -1,10 +1,11 @@ #include "accountitem.h" #include "accountview.h" #include "newmaildir.h" +#include "nntpgroupsdlg.h" #include "defines.h" /* OPIE */ #include <libmailwrapper/mailtypes.h> #include <libmailwrapper/abstractmail.h> #include <libmailwrapper/mailwrapper.h> @@ -281,21 +282,30 @@ QPopupMenu * NNTPviewItem::getContextMenu() if (m) { if (!account->getOffline()) { m->insertItem(QObject::tr("Disconnect",contextName),0); m->insertItem(QObject::tr("Set offline",contextName),1); + m->insertItem(QObject::tr("(Un-)Subscribe groups",contextName),2); } else { m->insertItem(QObject::tr("Set online",contextName),1); } } return m; } +void NNTPviewItem::subscribeGroups() +{ + NNTPGroupsDlg dlg(account); + if (QPEApplication::execDialog(&dlg)== QDialog::Accepted ){ + refresh(); + } +} + void NNTPviewItem::disconnect() { QListViewItem *child = firstChild(); while ( child ) { QListViewItem *tmp = child; @@ -325,12 +335,15 @@ void NNTPviewItem::contextMenuSelected(int which) case 0: disconnect(); break; case 1: setOnOffline(); break; + case 2: + subscribeGroups(); + break; } } NNTPfolderItem::~NNTPfolderItem() {} @@ -364,13 +377,13 @@ RecBody NNTPfolderItem::fetchBody(const RecMail&aMail) QPopupMenu * NNTPfolderItem::getContextMenu() { QPopupMenu *m = new QPopupMenu(0); if (m) { m->insertItem(QObject::tr("Refresh header list",contextName),0); - m->insertItem(QObject::tr("Move/Copie all mails",contextName),1); + m->insertItem(QObject::tr("Copy all postings",contextName),1); } return m; } void NNTPfolderItem::downloadMails() { |