From kde-commits Sat Jan 27 19:30:15 2007 From: Tom Albers Date: Sat, 27 Jan 2007 19:30:15 +0000 To: kde-commits Subject: playground/pim/mailody/src Message-Id: <1169926215.154780.15179.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=116992622323409 SVN commit 627708 by toma: clear the view when you delete a message. wish of werner. M +4 -0 mainwindow.cpp M +13 -0 messageview.cpp M +10 -0 messageview.h --- trunk/playground/pim/mailody/src/mainwindow.cpp #627707:627708 @@ -982,6 +982,10 @@ if (m_hideDeletedAction->isChecked()) slotHideDeleted(); + // clear the view. + TotalView* i = static_cast(m_tabWidget->currentPage()); + i->clearView(); + if ( lvibelow && (amountDeleted == 1 || m_headerList->selectedItems( false ).count() == 0)) { --- trunk/playground/pim/mailody/src/messageview.cpp #627707:627708 @@ -83,6 +83,12 @@ } +void TotalView::clearView() +{ + m_headers->hide(); + m_body->clearView(); +} + // --------------------- Headers ------------------------------- HeaderView::HeaderView( QWidget* parent) @@ -603,6 +609,13 @@ delete p; } +void MessageView::clearView() +{ + begin(); + write( " " ); + end(); } +} + #include "messageview.moc" --- trunk/playground/pim/mailody/src/messageview.h #627707:627708 @@ -76,6 +76,11 @@ */ void setMsg(MessageData* msg); + /** + * this will hide the headers and clear the body. + */ + void clearView(); + private: MessageData* m_msg; HeaderView* m_headers; @@ -208,6 +213,11 @@ */ void setViewSource(); + /** + * this will clear the body. + */ + void clearView(); + protected: virtual void urlSelected (const QString&, int, int, const QString &, KParts::URLArgs args=KParts::URLArgs());