summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp112
1 files changed, 56 insertions, 56 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index ea92f7ee6..505bd6128 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -111,11 +111,11 @@ using KMail::TeeHtmlWriter;
#include <kasciistricmp.h>
#include <kurldrag.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <tqhbox.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqpaintdevicemetrics.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqsplitter.h>
#include <tqstyle.h>
@@ -150,7 +150,7 @@ NewByteArray& NewByteArray::appendNULL()
{
TQByteArray::detach();
uint len1 = size();
- if ( !TQByteArray::resize( len1 + 1 ) )
+ if ( !TQByteArray::tqresize( len1 + 1 ) )
return *this;
*(data() + len1) = '\0';
return *this;
@@ -162,7 +162,7 @@ NewByteArray& NewByteArray::operator+=( const char * newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = tqstrlen( newData );
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData, len2 );
return *this;
@@ -174,7 +174,7 @@ NewByteArray& NewByteArray::operator+=( const TQByteArray & newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = newData.size();
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
@@ -186,7 +186,7 @@ NewByteArray& NewByteArray::operator+=( const TQCString & newData )
TQByteArray::detach();
uint len1 = size();
uint len2 = newData.length(); // forget about the trailing 0x00 !
- if ( !TQByteArray::resize( len1 + len2 ) )
+ if ( !TQByteArray::tqresize( len1 + len2 ) )
return *this;
memcpy( data() + len1, newData.data(), len2 );
return *this;
@@ -207,7 +207,7 @@ void KMReaderWin::objectTreeToDecryptedMsg( partNode* node,
int recCount )
{
kdDebug(5006) << TQString("-------------------------------------------------" ) << endl;
- kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("KMReaderWin::objectTreeToDecryptedMsg( %1 ) START").tqarg( recCount ) << endl;
if( node ) {
kdDebug(5006) << node->typeString() << '/' << node->subTypeString() << endl;
@@ -309,10 +309,10 @@ kdDebug(5006) << " new Content-Type = " << headers->ContentType(
// B) Store the body of this part.
if( headers && bIsMultipart && dataNode->firstChild() ) {
-kdDebug(5006) << "is valid Multipart, processing children:" << endl;
+kdDebug(5006) << "is valid Multipart, processing tqchildren:" << endl;
TQCString boundary = headers->ContentType().Boundary().c_str();
curNode = dataNode->firstChild();
- // store children of multipart
+ // store tqchildren of multipart
while( curNode ) {
kdDebug(5006) << "--boundary" << endl;
if( resultingData.size() &&
@@ -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 replaced by one of it's tqchildren, therefor
// we set their doStoreHeaders to true.
objectTreeToDecryptedMsg( curNode,
resultingData,
@@ -336,7 +336,7 @@ kdDebug(5006) << "--boundary--" << endl;
resultingData += "\n--";
resultingData += boundary;
resultingData += "--\n\n";
-kdDebug(5006) << "Multipart processing children - DONE" << endl;
+kdDebug(5006) << "Multipart processing tqchildren - DONE" << endl;
} else if( part ){
// store simple part
kdDebug(5006) << "is Simple part or invalid Multipart, storing body data .. DONE" << endl;
@@ -360,7 +360,7 @@ kdDebug(5006) << " Root node will NOT be replaced." << endl
recCount + 1 );
}
}
- kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").arg( recCount ) << endl;
+ kdDebug(5006) << TQString("\nKMReaderWin::objectTreeToDecryptedMsg( %1 ) END").tqarg( recCount ) << endl;
}
@@ -1027,14 +1027,14 @@ 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() )
- newPresence = TQString::fromLatin1( "ENOIMRUNNING" );
+ newPresence = TQString::tqfromLatin1( "ENOIMRUNNING" );
n.firstChild().setNodeValue( newPresence );
// kdDebug( 5006 ) << "value of content is now " << n.firstChild().nodeValue().string() << endl;
}
@@ -1285,11 +1285,11 @@ void KMReaderWin::displaySplashPage( const TQString &info )
TQString location = locate("data", "kmail/about/main.html");
TQString content = KPIM::kFileToString(location);
- content = content.arg( locate( "data", "libtdepim/about/kde_infopage.css" ) );
+ content = content.tqarg( locate( "data", "libtdepim/about/kde_infopage.css" ) );
if ( kapp->reverseLayout() )
- content = content.arg( "@import \"%1\";" ).arg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) );
+ content = content.tqarg( "@import \"%1\";" ).tqarg( locate( "data", "libtdepim/about/kde_infopage_rtl.css" ) );
else
- content = content.arg( "" );
+ content = content.tqarg( "" );
mViewer->begin(KURL( location ));
@@ -1297,7 +1297,7 @@ void KMReaderWin::displaySplashPage( const TQString &info )
TQString appTitle = i18n("KMail");
TQString catchPhrase = ""; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
TQString quickDescription = i18n("The email client for the K Desktop Environment.");
- mViewer->write(content.arg(fontSize).arg(appTitle).arg(catchPhrase).arg(quickDescription).arg(info));
+ mViewer->write(content.tqarg(fontSize).tqarg(appTitle).tqarg(catchPhrase).tqarg(quickDescription).tqarg(info));
mViewer->end();
}
@@ -1345,41 +1345,41 @@ void KMReaderWin::displayAboutPage()
"<p>We hope that you will enjoy KMail.</p>\n"
"<p>Thank you,</p>\n"
"<p style='margin-bottom: 0px'>&nbsp; &nbsp; The KMail Team</p>")
- .arg(KMAIL_VERSION) // KMail version
- .arg("help:/kmail/index.html") // KMail help:// URL
- .arg("http://kontact.kde.org/kmail/") // KMail homepage URL
- .arg("1.8").arg("3.4"); // prior KMail and KDE version
+ .tqarg(KMAIL_VERSION) // KMail version
+ .tqarg("help:/kmail/index.html") // KMail help:// URL
+ .tqarg("http://kontact.kde.org/kmail/") // KMail homepage URL
+ .tqarg("1.8").tqarg("3.4"); // prior KMail and KDE version
TQString featureItems;
for ( int i = 0 ; i < numKMailNewFeatures ; i++ )
- featureItems += i18n("<li>%1</li>\n").arg( i18n( kmailNewFeatures[i] ) );
+ featureItems += i18n("<li>%1</li>\n").tqarg( i18n( kmailNewFeatures[i] ) );
- info = info.arg( featureItems );
+ info = info.tqarg( featureItems );
if( kmkernel->firstStart() ) {
- info = info.arg( i18n("<p>Please take a moment to fill in the KMail "
+ info = info.tqarg( i18n("<p>Please take a moment to fill in the KMail "
"configuration panel at Settings-&gt;Configure "
"KMail.\n"
"You need to create at least a default identity and "
"an incoming as well as outgoing mail account."
"</p>\n") );
} else {
- info = info.arg( TQString() );
+ info = info.tqarg( TQString() );
}
if ( ( numKMailChanges > 1 ) || ( numKMailChanges == 1 && strlen(kmailChanges[0]) > 0 ) ) {
TQString changesText =
i18n("<p><span style='font-size:125%; font-weight:bold;'>"
"Important changes</span> (compared to KMail %1):</p>\n")
- .arg("1.8");
+ .tqarg("1.8");
changesText += "<ul>\n";
for ( int i = 0 ; i < numKMailChanges ; i++ )
- changesText += i18n("<li>%1</li>\n").arg( i18n( kmailChanges[i] ) );
+ changesText += i18n("<li>%1</li>\n").tqarg( i18n( kmailChanges[i] ) );
changesText += "</ul>\n";
- info = info.arg( changesText );
+ info = info.tqarg( changesText );
}
else
- info = info.arg(""); // remove the %8
+ info = info.tqarg(""); // remove the %8
displaySplashPage( info );
}
@@ -1976,7 +1976,7 @@ void KMReaderWin::showAttachmentPopup( int id, const TQString & name, const TQPo
menu->insertItem(SmallIcon("edit"), i18n("Edit Attachment"), 8 );
if ( GlobalSettings::self()->allowAttachmentDeletion() && canChange )
menu->insertItem(SmallIcon("editdelete"), i18n("Delete Attachment"), 7 );
- if ( name.endsWith( ".xia", false ) &&
+ if ( name.tqendsWith( ".xia", false ) &&
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) )
menu->insertItem( i18n( "Decrypt With Chiasmus..." ), 6 );
menu->insertItem(i18n("Properties"), 5);
@@ -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( tqstyle().isA("KeramikStyle") )
- frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != mBox->lineWidth() )
@@ -2041,7 +2041,7 @@ void KMReaderWin::slotHandleAttachment( int choice )
if (!url.isValid() ) return;
urls.append( url );
KURLDrag* drag = new KURLDrag( urls, this );
- TQApplication::clipboard()->setData( drag, TQClipboard::Clipboard );
+ TQApplication::tqclipboard()->setData( drag, TQClipboard::Clipboard );
} else if ( choice == 10 ) { // Scroll To
scrollToAttachment( node );
}
@@ -2142,7 +2142,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
}
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- mMainWindow->setCaption(i18n("View Attachment: %1").arg(pname));
+ mMainWindow->setCaption(i18n("View Attachment: %1").tqarg(pname));
} else if (kasciistricmp(aMsgPart->typeStr(), "image")==0 ||
(kasciistricmp(aMsgPart->typeStr(), "application")==0 &&
kasciistricmp(aMsgPart->subtypeStr(), "postscript")==0))
@@ -2178,7 +2178,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
"\" border=\"0\">\n"
"</body></html>\n" );
htmlWriter()->end();
- setCaption( i18n("View Attachment: %1").arg( pname ) );
+ setCaption( i18n("View Attachment: %1").tqarg( pname ) );
show();
delete iio;
} else {
@@ -2198,7 +2198,7 @@ void KMReaderWin::setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
htmlWriter()->queue( "</pre>" );
htmlWriter()->queue("</body></html>");
htmlWriter()->flush();
- mMainWindow->setCaption(i18n("View Attachment: %1").arg(pname));
+ mMainWindow->setCaption(i18n("View Attachment: %1").tqarg(pname));
}
// ---Sven's view text, html and image attachments in html widget end ---
}
@@ -2267,7 +2267,7 @@ 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 */ );
@@ -2287,17 +2287,17 @@ void KMReaderWin::openAttachment( int id, const TQString & name )
if ( filenameText.isEmpty() )
filenameText = msgPart.name();
if ( offer ) {
- open_text = i18n("&Open with '%1'").arg( offer->name() );
+ open_text = i18n("&Open with '%1'").tqarg( offer->name() );
} else {
open_text = i18n("&Open With...");
}
const TQString text = i18n("Open attachment '%1'?\n"
"Note that opening an attachment may compromise "
"your system's security.")
- .arg( filenameText );
+ .tqarg( 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,12 +2828,12 @@ 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" ).tqarg( node->nodeId() ) );
// Remove any old color markings which might be there
const partNode *root = node->topLevelParent();
for ( int i = 0; i <= root->totalChildCount() + 1; i++ ) {
- DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).arg( i + 1 ) );
+ DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).tqarg( i + 1 ) );
if ( !attachmentDiv.isNull() )
attachmentDiv.removeAttribute( "style" );
}
@@ -2845,14 +2845,14 @@ void KMReaderWin::scrollToAttachment( const partNode *node )
// Now, color the div of the attachment in yellow, so that the user sees what happened.
// We created a special marked div for this in writeAttachmentMarkHeader() in ObjectTreeParser,
// find and modify that now.
- DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).arg( node->nodeId() ) );
+ DOM::Element attachmentDiv = doc.getElementById( TQString( "attachmentDiv%1" ).tqarg( node->nodeId() ) );
if ( attachmentDiv.isNull() ) {
kdWarning( 5006 ) << "Could not find attachment div for attachment " << node->nodeId() << endl;
return;
}
attachmentDiv.setAttribute( "style", TQString( "border:2px solid %1" )
- .arg( cssHelper()->pgpWarnColor().name() ) );
+ .tqarg( cssHelper()->pgpWarnColor().name() ) );
// Update rendering, otherwise the rendering is not updated when the user clicks on an attachment
// that causes scrolling and the open attachment dialog
@@ -2880,7 +2880,7 @@ void KMReaderWin::injectAttachments()
imgSrc.append( "attachmentQuicklistOpened.png" );
}
- TQString html = renderAttachments( mRootNode, TQApplication::palette().active().background() );
+ TQString html = renderAttachments( mRootNode, TQApplication::tqpalette().active().background() );
if ( html.isEmpty() )
return;
@@ -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,9 +2930,9 @@ 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"
- "vertical-align:middle; float:%3; %4\">").arg( bgColor.name() ).arg( margin )
- .arg( align ).arg( visibility );
+ html += TQString::tqfromLatin1("<div style=\"background:%1; %2"
+ "vertical-align:middle; float:%3; %4\">").tqarg( bgColor.name() ).tqarg( margin )
+ .tqarg( align ).tqarg( visibility );
html += subHtml;
if ( node->msgPart().typeStr().lower() == "message" || node == mRootNode )
html += "</div>";
@@ -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;\">" ).tqarg( 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() );