author | alwin <alwin> | 2004-03-06 12:36:55 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-03-06 12:36:55 (UTC) |
commit | a66fd5afde517e9a61e74fc17df617297f134c96 (patch) (unidiff) | |
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,8 +1,9 @@ | |||
1 | 1 | ||
2 | #include "accountitem.h" | 2 | #include "accountitem.h" |
3 | #include "accountview.h" | 3 | #include "accountview.h" |
4 | #include "newmaildir.h" | 4 | #include "newmaildir.h" |
5 | #include "nntpgroupsdlg.h" | ||
5 | #include "defines.h" | 6 | #include "defines.h" |
6 | 7 | ||
7 | /* OPIE */ | 8 | /* OPIE */ |
8 | #include <libmailwrapper/mailtypes.h> | 9 | #include <libmailwrapper/mailtypes.h> |
@@ -283,8 +284,9 @@ QPopupMenu * NNTPviewItem::getContextMenu() | |||
283 | if (!account->getOffline()) | 284 | if (!account->getOffline()) |
284 | { | 285 | { |
285 | m->insertItem(QObject::tr("Disconnect",contextName),0); | 286 | m->insertItem(QObject::tr("Disconnect",contextName),0); |
286 | m->insertItem(QObject::tr("Set offline",contextName),1); | 287 | m->insertItem(QObject::tr("Set offline",contextName),1); |
288 | m->insertItem(QObject::tr("(Un-)Subscribe groups",contextName),2); | ||
287 | } | 289 | } |
288 | else | 290 | else |
289 | { | 291 | { |
290 | m->insertItem(QObject::tr("Set online",contextName),1); | 292 | m->insertItem(QObject::tr("Set online",contextName),1); |
@@ -292,8 +294,16 @@ QPopupMenu * NNTPviewItem::getContextMenu() | |||
292 | } | 294 | } |
293 | return m; | 295 | return m; |
294 | } | 296 | } |
295 | 297 | ||
298 | void NNTPviewItem::subscribeGroups() | ||
299 | { | ||
300 | NNTPGroupsDlg dlg(account); | ||
301 | if (QPEApplication::execDialog(&dlg)== QDialog::Accepted ){ | ||
302 | refresh(); | ||
303 | } | ||
304 | } | ||
305 | |||
296 | void NNTPviewItem::disconnect() | 306 | void NNTPviewItem::disconnect() |
297 | { | 307 | { |
298 | QListViewItem *child = firstChild(); | 308 | QListViewItem *child = firstChild(); |
299 | while ( child ) | 309 | while ( child ) |
@@ -327,8 +337,11 @@ void NNTPviewItem::contextMenuSelected(int which) | |||
327 | break; | 337 | break; |
328 | case 1: | 338 | case 1: |
329 | setOnOffline(); | 339 | setOnOffline(); |
330 | break; | 340 | break; |
341 | case 2: | ||
342 | subscribeGroups(); | ||
343 | break; | ||
331 | } | 344 | } |
332 | } | 345 | } |
333 | 346 | ||
334 | NNTPfolderItem::~NNTPfolderItem() | 347 | NNTPfolderItem::~NNTPfolderItem() |
@@ -366,9 +379,9 @@ QPopupMenu * NNTPfolderItem::getContextMenu() | |||
366 | QPopupMenu *m = new QPopupMenu(0); | 379 | QPopupMenu *m = new QPopupMenu(0); |
367 | if (m) | 380 | if (m) |
368 | { | 381 | { |
369 | m->insertItem(QObject::tr("Refresh header list",contextName),0); | 382 | m->insertItem(QObject::tr("Refresh header list",contextName),0); |
370 | m->insertItem(QObject::tr("Move/Copie all mails",contextName),1); | 383 | m->insertItem(QObject::tr("Copy all postings",contextName),1); |
371 | } | 384 | } |
372 | return m; | 385 | return m; |
373 | } | 386 | } |
374 | 387 | ||