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