summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /kmail/kmreaderwin.cpp
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 21be5a44a..0fce722d3 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -161,7 +161,7 @@ NewByteArray& NewByteArray::operator+=( const char * newData )
return *this;
TQByteArray::detach();
uint len1 = size();
- uint len2 = qstrlen( newData );
+ uint len2 = tqstrlen( newData );
if ( !TQByteArray::resize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData, len2 );
@@ -281,14 +281,14 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node,
kdDebug(5006) << "dataNode == curNode: Save curNode without replacing it." << endl;
// A) Store the headers of this part IF curNode is not the root node
- // AND we are not replacing a node that already *has* replaced
+ // AND we are not replacing a node that already *has* tqreplaced
// the root node in previous recursion steps of this function...
if( headers ) {
if( dataNode->parentNode() && !weAreReplacingTheRootNode ) {
kdDebug(5006) << "dataNode is NOT replacing the root node: Store the headers." << endl;
resultingData += headers->AsString().c_str();
} else if( weAreReplacingTheRootNode && part && part->hasHeaders() ){
-kdDebug(5006) << "dataNode replace the root node: Do NOT store the headers but change" << endl;
+kdDebug(5006) << "dataNode tqreplace the root node: Do NOT store the headers but change" << endl;
kdDebug(5006) << " the Message's headers accordingly." << endl;
kdDebug(5006) << " old Content-Type = " << rootHeaders.ContentType().AsString().c_str() << endl;
kdDebug(5006) << " new Content-Type = " << headers->ContentType( ).AsString().c_str() << endl;
@@ -323,7 +323,7 @@ kdDebug(5006) << "--boundary" << endl;
resultingData += boundary;
resultingData += "\n";
// note: We are processing a harmless multipart that is *not*
- // to be replaced by one of it's children, therefor
+ // to be tqreplaced by one of it's children, therefor
// we set their doStoreHeaders to true.
objectTreeToDecryptedMsg( curNode,
resultingData,
@@ -347,11 +347,11 @@ kdDebug(5006) << "is Simple part or invalid Multipart, storing body data .. DONE
kdDebug(5006) << "dataNode != curNode: Replace curNode by dataNode." << endl;
bool rootNodeReplaceFlag = weAreReplacingTheRootNode || !curNode->parentNode();
if( rootNodeReplaceFlag ) {
-kdDebug(5006) << " Root node will be replaced." << endl;
+kdDebug(5006) << " Root node will be tqreplaced." << endl;
} else {
-kdDebug(5006) << " Root node will NOT be replaced." << endl;
+kdDebug(5006) << " Root node will NOT be tqreplaced." << endl;
}
- // store special data to replace the current part
+ // store special data to tqreplace the current part
// (e.g. decrypted data or embedded RfC 822 data)
objectTreeToDecryptedMsg( dataNode,
resultingData,
@@ -1017,24 +1017,24 @@ void KMReaderWin::initHtmlWidget(void)
connect(mViewer,TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)),
TQT_SLOT(slotUrlPopup(const TQString &, const TQPoint &)));
connect( kmkernel->imProxy(), TQT_SIGNAL( sigContactPresenceChanged( const TQString & ) ),
- this, TQT_SLOT( contactStatusChanged( const TQString & ) ) );
+ this, TQT_SLOT( contacStatusChanged( const TQString & ) ) );
connect( kmkernel->imProxy(), TQT_SIGNAL( sigPresenceInfoExpired() ),
this, TQT_SLOT( updateReaderWin() ) );
}
-void KMReaderWin::contactStatusChanged( const TQString &uid)
+void KMReaderWin::contacStatusChanged( const TQString &uid)
{
// kdDebug( 5006 ) << k_funcinfo << " got a presence change for " << uid << endl;
// get the list of nodes for this contact from the htmlView
DOM::NodeList presenceNodes = mViewer->htmlDocument()
- .getElementsByName( DOM::DOMString( TQString::fromLatin1("presence-") + uid ) );
+ .getElementsByName( DOM::DOMString( TQString::tqfromLatin1("presence-") + uid ) );
for ( unsigned int i = 0; i < presenceNodes.length(); ++i ) {
DOM::Node n = presenceNodes.item( i );
kdDebug( 5006 ) << "name is " << n.nodeName().string() << endl;
kdDebug( 5006 ) << "value of content was " << n.firstChild().nodeValue().string() << endl;
TQString newPresence = kmkernel->imProxy()->presenceString( uid );
if ( newPresence.isNull() ) // KHTML crashes if you setNodeValue( TQString::null )
- newPresence = TQString::fromLatin1( "ENOIMRUNNING" );
+ newPresence = TQString::tqfromLatin1( "ENOIMRUNNING" );
n.firstChild().setNodeValue( newPresence );
// kdDebug( 5006 ) << "value of content is now " << n.firstChild().nodeValue().string() << endl;
}
@@ -1423,7 +1423,7 @@ void KMReaderWin::updateReaderWin()
{
TQScrollView * scrollview = static_cast<TQScrollView *>(mViewer->widget());
scrollview->setContentsPos( 0,
- qRound( scrollview->contentsHeight() * mSavedRelativePosition ) );
+ tqRound( scrollview->contentsHeight() * mSavedRelativePosition ) );
mSavedRelativePosition = 0;
}
}
@@ -1653,7 +1653,7 @@ kdDebug(5006) << "KMReaderWin - composing unencrypted message" << endl;
if( emitReplaceMsgByUnencryptedVersion ) {
kdDebug(5006) << "KMReaderWin - invoce saving in decrypted form:" << endl;
- emit replaceMsgByUnencryptedVersion();
+ emit tqreplaceMsgByUnencryptedVersion();
} else {
kdDebug(5006) << "KMReaderWin - finished parsing and displaying of message." << endl;
showHideMimeTree( rootNodeCntType == DwMime::kTypeText &&
@@ -1805,7 +1805,7 @@ void KMReaderWin::slotTouchMessage()
SerNumList serNums;
serNums.append( message()->getMsgSerNum() );
- KMCommand *command = new KMSetStatusCommand( KMMsgStatusRead, serNums );
+ KMCommand *command = new KMSeStatusCommand( KMMsgStatusRead, serNums );
command->start();
// should we send an MDN?
@@ -1892,7 +1892,7 @@ void KMReaderWin::slotUrlOn(const TQString &aUrl)
}
if ( aUrl.stripWhiteSpace().isEmpty() ) {
- KPIM::BroadcastStatus::instance()->reset();
+ KPIM::BroadcasStatus::instance()->reset();
mHoveredUrl = KURL();
mLastClickImagePath = TQString();
return;
@@ -1903,7 +1903,7 @@ void KMReaderWin::slotUrlOn(const TQString &aUrl)
const TQString msg = URLHandlerManager::instance()->statusBarMessage( url, this );
kdWarning( msg.isEmpty(), 5006 ) << "KMReaderWin::slotUrlOn(): Unhandled URL hover!" << endl;
- KPIM::BroadcastStatus::instance()->setTransientStatusMsg( msg );
+ KPIM::BroadcasStatus::instance()->setTransienStatusMsg( msg );
}
@@ -2000,9 +2000,9 @@ void KMReaderWin::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != mBox->lineWidth() )
@@ -2050,13 +2050,13 @@ void KMReaderWin::slotHandleAttachment( int choice )
//-----------------------------------------------------------------------------
void KMReaderWin::slotFind()
{
- mViewer->findText();
+ mViewer->tqfindText();
}
//-----------------------------------------------------------------------------
void KMReaderWin::slotFindNext()
{
- mViewer->findTextNext();
+ mViewer->tqfindTextNext();
}
//-----------------------------------------------------------------------------
@@ -2190,8 +2190,8 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
// A TQString cannot handle binary data. So if it's shorter than the
// attachment, we assume the attachment is binary:
if( str.length() < (unsigned) aMsgPart->decodedSize() ) {
- str.prepend( i18n("[KMail: Attachment contains binary data. Trying to show first character.]",
- "[KMail: Attachment contains binary data. Trying to show first %n characters.]",
+ str.prepend( i18n("[KMail: Attachment tqcontains binary data. Trying to show first character.]",
+ "[KMail: Attachment tqcontains binary data. Trying to show first %n characters.]",
str.length()) + TQChar('\n') );
}
htmlWriter()->queue( TQStyleSheet::escape( str ) );
@@ -2267,16 +2267,16 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
// determine the MIME type of the attachment
KMimeType::Ptr mimetype;
// prefer the value of the Content-Type header
- mimetype = KMimeType::mimeType( TQString::fromLatin1( contentTypeStr ) );
+ mimetype = KMimeType::mimeType( TQString::tqfromLatin1( contentTypeStr ) );
if ( mimetype->name() == "application/octet-stream" ) {
// consider the filename if Content-Type is application/octet-stream
- mimetype = KMimeType::findByPath( name, 0, true /* no disk access */ );
+ mimetype = KMimeType::tqfindByPath( name, 0, true /* no disk access */ );
}
if ( ( mimetype->name() == "application/octet-stream" )
&& msgPart.isComplete() ) {
// consider the attachment's contents if neither the Content-Type header
// nor the filename give us a clue
- mimetype = KMimeType::findByFileContent( name );
+ mimetype = KMimeType::tqfindByFileContent( name );
}
KService::Ptr offer =
@@ -2297,7 +2297,7 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
.arg( filenameText );
const int choice = KMessageBox::questionYesNoCancel( this, text,
i18n("Open Attachment?"), KStdGuiItem::saveAs(), open_text,
- TQString::fromLatin1("askSave") + mimetype->name() ); // dontAskAgainName
+ TQString::tqfromLatin1("askSave") + mimetype->name() ); // dontAskAgainName
if( choice == KMessageBox::Yes ) { // Save
mAtmUpdate = true;
@@ -2738,7 +2738,7 @@ void KMReaderWin::fillCommandInfo( partNode *node, KMMessage **msg, int *nodeId
void KMReaderWin::slotDeleteAttachment(partNode * node)
{
if ( KMessageBox::warningContinueCancel( this,
- i18n("Deleting an attachment might invalidate any digital signature on this message."),
+ i18n("Deleting an attachment might tqinvalidate any digital signature on this message."),
i18n("Delete Attachment"), KStdGuiItem::del(), "DeleteAttachmentSignatureWarning" )
!= KMessageBox::Continue ) {
return;
@@ -2794,7 +2794,7 @@ void KMReaderWin::disconnectMsgAdded()
void KMReaderWin::slotEditAttachment(partNode * node)
{
if ( KMessageBox::warningContinueCancel( this,
- i18n("Modifying an attachment might invalidate any digital signature on this message."),
+ i18n("Modifying an attachment might tqinvalidate any digital signature on this message."),
i18n("Edit Attachment"), KGuiItem( i18n("Edit"), "edit" ), "EditAttachmentSignatureWarning" )
!= KMessageBox::Continue ) {
return;
@@ -2828,7 +2828,7 @@ void KMReaderWin::scrollToAttachment( const partNode *node )
DOM::Document doc = mViewer->htmlDocument();
// The anchors for this are created in ObjectTreeParser::parseObjectTree()
- mViewer->gotoAnchor( TQString::fromLatin1( "att%1" ).arg( node->nodeId() ) );
+ mViewer->gotoAnchor( TQString::tqfromLatin1( "att%1" ).arg( node->nodeId() ) );
// Remove any old color markings which might be there
const partNode *root = node->topLevelParent();
@@ -2889,7 +2889,7 @@ void KMReaderWin::injectAttachments()
link += "<div style=\"text-align: left;\"><a href=\"" + urlHandle + "\"><img src=\"" +
imgpath + imgSrc + "\"/></a></div>";
html.prepend( link );
- html.prepend( TQString::fromLatin1( "<div style=\"float:left;\">%1&nbsp;</div>" ).
+ html.prepend( TQString::tqfromLatin1( "<div style=\"float:left;\">%1&nbsp;</div>" ).
arg( i18n( "Attachments:" ) ) );
} else {
link += "<div style=\"text-align: right;\"><a href=\"" + urlHandle + "\"><img src=\"" +
@@ -2930,7 +2930,7 @@ TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor
if ( headerStyle() == HeaderStyle::enterprise() )
align = "right";
if ( node->msgPart().typeStr().lower() == "message" || node == mRootNode )
- html += TQString::fromLatin1("<div style=\"background:%1; %2"
+ html += TQString::tqfromLatin1("<div style=\"background:%1; %2"
"vertical-align:middle; float:%3; %4\">").arg( bgColor.name() ).arg( margin )
.arg( align ).arg( visibility );
html += subHtml;
@@ -2941,11 +2941,11 @@ TQString KMReaderWin::renderAttachments(partNode * node, const TQColor &bgColor
partNode::AttachmentDisplayInfo info = node->attachmentDisplayInfo();
if ( info.displayInHeader ) {
html += "<div style=\"float:left;\">";
- html += TQString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
+ html += TQString::tqfromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( bgColor.name() );
TQString fileName = writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
TQString href = node->asHREF( "header" );
- html += TQString::fromLatin1( "<a href=\"" ) + href +
- TQString::fromLatin1( "\">" );
+ html += TQString::tqfromLatin1( "<a href=\"" ) + href +
+ TQString::tqfromLatin1( "\">" );
html += "<img style=\"vertical-align:middle;\" src=\"" + info.icon + "\"/>&nbsp;";
if ( headerStyle() == HeaderStyle::enterprise() ) {
TQFont bodyFont = mCSSHelper->bodyFont( isFixedFont() );