[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/pim/mailody/src
From:       Tom Albers <tomalbers () kde ! nl>
Date:       2007-01-27 19:30:15
Message-ID: 1169926215.154780.15179.nullmailer () svn ! kde ! org
[Download RAW message or body]

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<TotalView*>(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(  "&nbsp;" );
+    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());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic