-rw-r--r-- | kmicromail/accountview.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp index c9c4a0f..3ad3e9b 100644 --- a/kmicromail/accountview.cpp +++ b/kmicromail/accountview.cpp @@ -69,64 +69,82 @@ void AccountView::populate( QList<Account> list ) { if ( it->getType() == MAILLIB::A_IMAP ) { IMAPaccount *imap = static_cast<IMAPaccount *>(it); imapAccounts.append(new IMAPviewItem( imap, this )); } else if ( it->getType() == MAILLIB::A_POP3 ) { POP3account *pop3 = static_cast<POP3account *>(it); /* must not be hold 'cause it isn't required */ (void) new POP3viewItem( pop3, this ); } else if ( it->getType() == MAILLIB::A_NNTP ) { NNTPaccount *nntp = static_cast<NNTPaccount *>(it); /* must not be hold 'cause it isn't required */ (void) new NNTPviewItem( nntp, this ); } } } void AccountView::refresh(QListViewItem *item) { if ( item ) { m_currentItem = item; QValueList<RecMailP> headerlist; AccountViewItem *view = static_cast<AccountViewItem *>(item); view->refresh(headerlist); emit refreshMailview(headerlist); } } +void AccountView::refreshOutgoing() +{ + m_currentItem = currentItem(); + if ( !m_currentItem ) return; + AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); + QString bName = view->getFolder()->getDisplayName(); + if (bName.startsWith("/")&&bName.length()>1) + { + bName.replace(0,1,""); + } + int pos = bName.findRev("/"); + if (pos > 0) + { + bName.replace(0,pos+1,""); + } + if ( bName.lower() == "outgoing" ) + refreshCurrent(); +} void AccountView::refreshCurrent() { m_currentItem = currentItem(); if ( !m_currentItem ) return; QValueList<RecMailP> headerlist; AccountViewItem *view = static_cast<AccountViewItem *>(m_currentItem); view->refresh(headerlist); emit refreshMailview(headerlist); } void AccountView::refreshAll() { } RecBodyP AccountView::fetchBody(const RecMailP&aMail) { QListViewItem*item = selectedItem (); if (!item) return new RecBody(); AccountViewItem *view = static_cast<AccountViewItem *>(item); return view->fetchBody(aMail); } void AccountView::setupFolderselect(Selectstore*sels) { #ifndef DESKTOP_VERSION sels->showMaximized(); #else sels->show(); #endif QStringList sFolders; |