author | alwin <alwin> | 2005-03-07 23:12:51 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-07 23:12:51 (UTC) |
commit | 2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce (patch) (unidiff) | |
tree | d0ff8c035e34a83fbc935c8f3f6ab926ed432559 /noncore/net/mail/accountview.cpp | |
parent | a1fab1e1abd009a6a64c7ea3957bdb5587f4be81 (diff) | |
download | opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.zip opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.gz opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.bz2 |
beauty
hopefull some speedups
obsolete stuff removed
fixed a crasher
Diffstat (limited to 'noncore/net/mail/accountview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/accountview.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index 0fe8475..c747a8b 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -38,49 +38,48 @@ void AccountView::slotContextMenu(int id) | |||
38 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | 38 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); |
39 | if (!view) return; | 39 | if (!view) return; |
40 | view->contextMenuSelected(id); | 40 | view->contextMenuSelected(id); |
41 | } | 41 | } |
42 | 42 | ||
43 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) | 43 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) |
44 | { | 44 | { |
45 | if (button==1) {return;} | 45 | if (button==1) {return;} |
46 | if (!item) return; | 46 | if (!item) return; |
47 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 47 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
48 | QPopupMenu*m = view->getContextMenu(); | 48 | QPopupMenu*m = view->getContextMenu(); |
49 | if (!m) return; | 49 | if (!m) return; |
50 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); | 50 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); |
51 | m->setFocus(); | 51 | m->setFocus(); |
52 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); | 52 | m->exec( QPoint( QCursor::pos().x(), QCursor::pos().y()) ); |
53 | delete m; | 53 | delete m; |
54 | } | 54 | } |
55 | 55 | ||
56 | void AccountView::populate( QList<Account> list ) | 56 | void AccountView::populate( QList<Account> list ) |
57 | { | 57 | { |
58 | clear(); | 58 | clear(); |
59 | 59 | ||
60 | imapAccounts.clear(); | 60 | imapAccounts.clear(); |
61 | mhAccounts.clear(); | 61 | mhAccounts.clear(); |
62 | |||
63 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); | 62 | mhAccounts.append(new MHviewItem(AbstractMail::defaultLocalfolder(),this)); |
64 | 63 | ||
65 | Account *it; | 64 | Account *it; |
66 | for ( it = list.first(); it; it = list.next() ) { | 65 | for ( it = list.first(); it; it = list.next() ) { |
67 | if ( it->getType() == MAILLIB::A_IMAP ) { | 66 | if ( it->getType() == MAILLIB::A_IMAP ) { |
68 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); | 67 | IMAPaccount *imap = static_cast<IMAPaccount *>(it); |
69 | odebug << "added IMAP " + imap->getAccountName() << oendl; | 68 | odebug << "added IMAP " + imap->getAccountName() << oendl; |
70 | imapAccounts.append(new IMAPviewItem( imap, this )); | 69 | imapAccounts.append(new IMAPviewItem( imap, this )); |
71 | } else if ( it->getType() == MAILLIB::A_POP3 ) { | 70 | } else if ( it->getType() == MAILLIB::A_POP3 ) { |
72 | POP3account *pop3 = static_cast<POP3account *>(it); | 71 | POP3account *pop3 = static_cast<POP3account *>(it); |
73 | odebug << "added POP3 " + pop3->getAccountName() << oendl; | 72 | odebug << "added POP3 " + pop3->getAccountName() << oendl; |
74 | /* must not be hold 'cause it isn't required */ | 73 | /* must not be hold 'cause it isn't required */ |
75 | (void) new POP3viewItem( pop3, this ); | 74 | (void) new POP3viewItem( pop3, this ); |
76 | } else if ( it->getType() == MAILLIB::A_NNTP ) { | 75 | } else if ( it->getType() == MAILLIB::A_NNTP ) { |
77 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); | 76 | NNTPaccount *nntp = static_cast<NNTPaccount *>(it); |
78 | odebug << "added NNTP " + nntp->getAccountName() << oendl; | 77 | odebug << "added NNTP " + nntp->getAccountName() << oendl; |
79 | /* must not be hold 'cause it isn't required */ | 78 | /* must not be hold 'cause it isn't required */ |
80 | (void) new NNTPviewItem( nntp, this ); | 79 | (void) new NNTPviewItem( nntp, this ); |
81 | } else if ( it->getType() == MAILLIB::A_MH ) { | 80 | } else if ( it->getType() == MAILLIB::A_MH ) { |
82 | } | 81 | } |
83 | } | 82 | } |
84 | } | 83 | } |
85 | 84 | ||
86 | void AccountView::refresh(QListViewItem *item) | 85 | void AccountView::refresh(QListViewItem *item) |