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

List:       kde-commits
Subject:    kdenetwork/kopete/kopete/chatwindow
From:       John Tapsell <john () geola ! co ! uk>
Date:       2005-01-29 14:30:22
Message-ID: 20050129143022.B6E971CE9F () office ! kde ! org
[Download RAW message or body]

CVS commit by johnflux: 


* Fix copy-to-clipboard in kopete.
* Simplify the code a little bit.


  M +6 -8      chatmessagepart.cpp   1.18


--- kdenetwork/kopete/kopete/chatwindow/chatmessagepart.cpp  #1.17:1.18
@@ -659,5 +659,7 @@ void ChatMessagePart::copy(bool justsele
 #if KDE_IS_VERSION(3,3,90)
         htmltext = selectedTextAsHTML();
-        text=Kopete::Message::unescape( htmltext ).stripWhiteSpace();
+        text = selectedText();
+        //selectedText is now sufficent
+//      text=Kopete::Message::unescape( htmltext ).stripWhiteSpace();
         // Message::unsescape will replace image by his title attribute
         // stripWhiteSpace is for removing the newline added by the <!DOCTYPE> and \
other xml things of RangeImpl::toHTML @@ -777,5 +779,5 @@ void \
ChatMessagePart::copy(bool justsele  
 #ifndef QT_NO_MIMECLIPBOARD
-        if(justselection)
+        if(!justselection)
         {
         QTextDrag *textdrag = new QTextDrag(text, 0L);
@@ -789,10 +791,6 @@ void ChatMessagePart::copy(bool justsele
         }
         QApplication::clipboard()->setData( drag, QClipboard::Clipboard );
-        QApplication::clipboard()->setText( text, QClipboard::Selection );           \
                
-    } else
-        {
-        QApplication::clipboard()->setText( text, QClipboard::Selection );           \
  }
-
+    QApplication::clipboard()->setText( text, QClipboard::Selection );          
 #else
         if(!justselection)
@@ -882,5 +880,5 @@ void ChatMessagePart::khtmlDrawContentsE
 {
         KHTMLPart::khtmlDrawContentsEvent(event);
-        copy(true /*selection only*/);
+        //copy(true /*selection only*/); not needed anymore.
 }
 void ChatMessagePart::slotCloseView( bool force )


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

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