|
|
|
@ -36,7 +36,7 @@
|
|
|
|
|
#include <tqtimer.h>
|
|
|
|
|
#include <tqstylesheet.h>
|
|
|
|
|
|
|
|
|
|
// KHTML::DOM includes
|
|
|
|
|
// TDEHTML::DOM includes
|
|
|
|
|
#include <dom/dom_doc.h>
|
|
|
|
|
#include <dom/dom_text.h>
|
|
|
|
|
#include <dom/dom_element.h>
|
|
|
|
@ -214,7 +214,7 @@ private:
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, const char *name)
|
|
|
|
|
: KHTMLPart( parent, name ), d( new Private )
|
|
|
|
|
: TDEHTMLPart( parent, name ), d( new Private )
|
|
|
|
|
{
|
|
|
|
|
d->manager = mgr;
|
|
|
|
|
|
|
|
|
@ -228,7 +228,7 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession *mgr, TQWidget *parent, co
|
|
|
|
|
setMetaRefreshEnabled( false );
|
|
|
|
|
setOnlyLocalReferences( true );
|
|
|
|
|
|
|
|
|
|
// Write the template to KHTMLPart
|
|
|
|
|
// Write the template to TDEHTMLPart
|
|
|
|
|
writeTemplate();
|
|
|
|
|
|
|
|
|
|
view()->setFocusPolicy( TQ_NoFocus );
|
|
|
|
@ -834,7 +834,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
|
|
|
|
|
long startOffset, endOffset;
|
|
|
|
|
selection( startNode, startOffset, endNode, endOffset );
|
|
|
|
|
|
|
|
|
|
//BEGIN: copied from KHTMLPart::selectedText
|
|
|
|
|
//BEGIN: copied from TDEHTMLPart::selectedText
|
|
|
|
|
|
|
|
|
|
bool hasNewLine = true;
|
|
|
|
|
DOM::Node n = startNode;
|
|
|
|
@ -858,7 +858,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
|
|
|
|
|
unsigned short id = n.elementId();
|
|
|
|
|
switch(id)
|
|
|
|
|
{
|
|
|
|
|
case ID_IMG: //here is the main difference with KHTMLView::selectedText
|
|
|
|
|
case ID_IMG: //here is the main difference with TDEHTMLView::selectedText
|
|
|
|
|
{
|
|
|
|
|
DOM::HTMLElement e = n;
|
|
|
|
|
if( !e.isNull() && e.hasAttribute( "title" ) )
|
|
|
|
@ -936,7 +936,7 @@ void ChatMessagePart::copy(bool justselection /* default false */)
|
|
|
|
|
|
|
|
|
|
text=text.mid(start, end-start);
|
|
|
|
|
|
|
|
|
|
//END: copied from KHTMLPart::selectedText
|
|
|
|
|
//END: copied from TDEHTMLPart::selectedText
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if(text.isEmpty()) return;
|
|
|
|
@ -974,7 +974,7 @@ void ChatMessagePart::print()
|
|
|
|
|
|
|
|
|
|
void ChatMessagePart::tdehtmlDrawContentsEvent( tdehtml::DrawContentsEvent * event) //virtual
|
|
|
|
|
{
|
|
|
|
|
KHTMLPart::tdehtmlDrawContentsEvent(event);
|
|
|
|
|
TDEHTMLPart::tdehtmlDrawContentsEvent(event);
|
|
|
|
|
//copy(true /*selection only*/); not needed anymore.
|
|
|
|
|
}
|
|
|
|
|
void ChatMessagePart::slotCloseView( bool force )
|
|
|
|
|