summaryrefslogtreecommitdiffstats
path: root/kmail/kmcommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r--kmail/kmcommands.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 1fe29b6b3..3f83fad61 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -216,7 +216,7 @@ KMMessage *KMCommand::retrievedMessage() const
return mRetrievedMsgs.getFirst();
}
-TQWidget *KMCommand::tqparentWidget() const
+TQWidget *KMCommand::parentWidget() const
{
return mParent;
}
@@ -558,7 +558,7 @@ KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url,
KMCommand::Result KMMailtoAddAddrBookCommand::execute()
{
KAddrBookExternal::addEmail( KMMessage::decodeMailtoUrl( mUrl.path() ),
- tqparentWidget() );
+ parentWidget() );
return OK;
}
@@ -573,7 +573,7 @@ KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url,
KMCommand::Result KMMailtoOpenAddrBookCommand::execute()
{
KAddrBookExternal::openEmail( KMMessage::decodeMailtoUrl( mUrl.path() ),
- tqparentWidget() );
+ parentWidget() );
return OK;
}
@@ -633,10 +633,10 @@ KMCommand::Result KMUrlSaveCommand::execute()
if ( mUrl.isEmpty() )
return OK;
KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), TQString(),
- tqparentWidget() );
+ parentWidget() );
if ( saveUrl.isEmpty() )
return Canceled;
- if ( KIO::NetAccess::exists( saveUrl, false, tqparentWidget() ) )
+ if ( KIO::NetAccess::exists( saveUrl, false, parentWidget() ) )
{
if (KMessageBox::warningContinueCancel(0,
i18n("<qt>File <b>%1</b> exists.<br>Do you want to replace it?</qt>")
@@ -1006,7 +1006,7 @@ KMCommand::Result KMOpenMsgCommand::execute()
{
if ( mUrl.isEmpty() ) {
mUrl = KFileDialog::getOpenURL( ":OpenMessage", "message/rfc822 application/mbox",
- tqparentWidget(), i18n("Open Message") );
+ parentWidget(), i18n("Open Message") );
}
if ( mUrl.isEmpty() ) {
setDeletesItself( false );
@@ -1043,7 +1043,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) {
startOfMessage = mMsgString.tqfind( '\n' );
if ( startOfMessage == -1 ) {
- KMessageBox::sorry( tqparentWidget(),
+ KMessageBox::sorry( parentWidget(),
i18n( "The file does not contain a message." ) );
setResult( Failed );
emit completed( this );
@@ -1071,7 +1071,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
dwMsg->Parse();
// check whether we have a message ( no headers => this isn't a message )
if ( dwMsg->Headers().NumFields() == 0 ) {
- KMessageBox::sorry( tqparentWidget(),
+ KMessageBox::sorry( parentWidget(),
i18n( "The file does not contain a message." ) );
delete dwMsg; dwMsg = 0;
setResult( Failed );
@@ -1452,7 +1452,7 @@ KMCommand::Result KMRedirectCommand::execute()
if ( !msg || !msg->codec() )
return Failed;
- RedirectDialog dlg( tqparentWidget(), "redirect", true,
+ RedirectDialog dlg( parentWidget(), "redirect", true,
kmkernel->msgSender()->sendImmediate() );
if (dlg.exec()==TQDialog::Rejected) return Failed;
@@ -1650,7 +1650,7 @@ KMCommand::Result KMSeStatusCommand::execute()
TQValueListIterator<TQ_UINT32> it;
int idx = -1;
KMFolder *folder = 0;
- bool tqparentqStatus = false;
+ bool parentqStatus = false;
// Toggle actions on threads toggle the whole thread
// depending on the state of the tqparent.
@@ -1660,9 +1660,9 @@ KMCommand::Result KMSeStatusCommand::execute()
if (folder) {
msg = folder->getMsgBase(idx);
if (msg && (msg->status()&mtqStatus))
- tqparentqStatus = true;
+ parentqStatus = true;
else
- tqparentqStatus = false;
+ parentqStatus = false;
}
}
TQMap< KMFolder*, TQValueList<int> > folderMap;
@@ -1678,7 +1678,7 @@ KMCommand::Result KMSeStatusCommand::execute()
mytqStatus = true;
else
mytqStatus = false;
- if (mytqStatus != tqparentqStatus)
+ if (mytqStatus != parentqStatus)
continue;
}
}
@@ -1994,7 +1994,7 @@ KMCommand::Result KMCopyCommand::execute()
msg = srcFolder->getMsg(idx);
// corrupt IMAP cache, see FolderStorage::getMsg()
if ( msg == 0 ) {
- KMessageBox::error( tqparentWidget(), i18n("Corrupt IMAP cache detected in folder %1. "
+ KMessageBox::error( parentWidget(), i18n("Corrupt IMAP cache detected in folder %1. "
"Copying of messages aborted.").tqarg( srcFolder->prettyURL() ) );
deleteLater();
return Failed;
@@ -2534,7 +2534,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
// considered attachments
if ( it.key()->msgPart().fileName().stripWhiteSpace().isEmpty() &&
( it.key()->msgPart().name().stripWhiteSpace().isEmpty() ||
- !it.key()->tqparentNode() ) ) {
+ !it.key()->parentNode() ) ) {
PartNodeMessageMap::iterator delIt = it;
++it;
mAttachmentMap.remove( delIt );
@@ -2555,7 +2555,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( mAttachmentMap.count() > 1 ) {
// get the dir
dirUrl = KDirSelectDialog::selectDirectory( TQString(), false,
- tqparentWidget(),
+ parentWidget(),
i18n("Save Attachments To") );
if ( !dirUrl.isValid() ) {
setResult( Canceled );
@@ -2577,7 +2577,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' );
if ( s.isEmpty() )
s = i18n("filename for an unnamed attachment", "attachment.1");
- url = KFileDialog::getSaveURL( s, TQString(), tqparentWidget(),
+ url = KFileDialog::getSaveURL( s, TQString(), parentWidget(),
TQString() );
if ( url.isEmpty() ) {
setResult( Canceled );
@@ -2641,8 +2641,8 @@ void KMSaveAttachmentsCommand::slotSaveAll()
}
- if ( KIO::NetAccess::exists( curUrl, false, tqparentWidget() ) ) {
- if ( KMessageBox::warningContinueCancel( tqparentWidget(),
+ if ( KIO::NetAccess::exists( curUrl, false, parentWidget() ) ) {
+ if ( KMessageBox::warningContinueCancel( parentWidget(),
i18n( "A file named %1 already exists. Do you want to overwrite it?" )
.tqarg( curUrl.fileName() ),
i18n( "File Already Exists" ), i18n("&Overwrite") ) == KMessageBox::Cancel) {
@@ -2666,7 +2666,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveEncrypted = false;
bool bEncryptedParts = node->encryptionState() != KMMsgNotEncrypted;
if( bEncryptedParts )
- if( KMessageBox::questionYesNo( tqparentWidget(),
+ if( KMessageBox::questionYesNo( parentWidget(),
i18n( "The part %1 of the message is encrypted. Do you want to keep the encryption when saving?" ).
arg( url.fileName() ),
i18n( "KMail Question" ), i18n("Keep Encryption"), i18n("Do Not Keep") ) ==
@@ -2675,7 +2675,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveWithSig = true;
if( node->signatureState() != KMMsgNotSigned )
- if( KMessageBox::questionYesNo( tqparentWidget(),
+ if( KMessageBox::questionYesNo( parentWidget(),
i18n( "The part %1 of the message is signed. Do you want to keep the signature when saving?" ).
arg( url.fileName() ),
i18n( "KMail Question" ), i18n("Keep Signature"), i18n("Do Not Keep") ) !=
@@ -2749,7 +2749,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
file.setName( url.path() );
if ( !file.open( IO_WriteOnly ) )
{
- KMessageBox::error( tqparentWidget(),
+ KMessageBox::error( parentWidget(),
i18n( "%2 is detailed error description",
"Could not write the file %1:\n%2" )
.tqarg( file.name() )
@@ -2773,9 +2773,9 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
if ( !url.isLocalFile() )
{
tf.close();
- if ( !KIO::NetAccess::upload( tf.name(), url, tqparentWidget() ) )
+ if ( !KIO::NetAccess::upload( tf.name(), url, parentWidget() ) )
{
- KMessageBox::error( tqparentWidget(),
+ KMessageBox::error( parentWidget(),
i18n( "Could not write the file %1." )
.tqarg( url.path() ),
i18n( "KMail Error" ) );
@@ -3015,7 +3015,7 @@ KMCommand::Result KMIMChatCommand::execute()
apology = apology.tqarg( names );
}
- KMessageBox::sorry( tqparentWidget(), apology );
+ KMessageBox::sorry( parentWidget(), apology );
return Failed;
}
}
@@ -3196,13 +3196,13 @@ void KMHandleAttachmentCommand::atmSave()
parts.append( mNode );
// save, do not leave encoded
KMSaveAttachmentsCommand *command =
- new KMSaveAttachmentsCommand( tqparentWidget(), parts, mMsg, false );
+ new KMSaveAttachmentsCommand( parentWidget(), parts, mMsg, false );
command->start();
}
void KMHandleAttachmentCommand::atmProperties()
{
- KMMsgPartDialogCompat dlg( tqparentWidget() , 0, true );
+ KMMsgPartDialogCompat dlg( parentWidget() , 0, true );
KMMessagePart& msgPart = mNode->msgPart();
dlg.setMsgPart( &msgPart );
dlg.exec();
@@ -3229,12 +3229,12 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !listjob.get() ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
if ( listjob->exec() ) {
- listjob->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Backend Error" ) );
+ listjob->showErrorDialog( parentWidget(), i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3243,7 +3243,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-obtain-keys\" function did not return a "
"string list. Please report this bug." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3252,11 +3252,11 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
const TQString msg = i18n( "No keys have been found. Please check that a "
"valid key path has been set in the Chiasmus "
"configuration." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- ChiasmusKeySelector selectorDlg( tqparentWidget(), i18n( "Chiasmus Decryption Key Selection" ),
+ ChiasmusKeySelector selectorDlg( parentWidget(), i18n( "Chiasmus Decryption Key Selection" ),
keys, GlobalSettings::chiasmusDecryptionKey(),
GlobalSettings::chiasmusDecryptionOptions() );
if ( selectorDlg.exec() != TQDialog::Accepted )
@@ -3270,7 +3270,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !job ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3281,13 +3281,13 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
!job->setProperty( "input", input ) ) {
const TQString msg = i18n( "The \"x-decrypt\" function does not accept "
"the expected parameters. Please report this bug." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
setDeletesItself( true ); // the job below is async, we have to cleanup ourselves
if ( job->start() ) {
- job->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Decryption Error" ) );
+ job->showErrorDialog( parentWidget(), i18n( "Chiasmus Decryption Error" ) );
return;
}
@@ -3313,7 +3313,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
if ( err.isCanceled() )
return;
if ( err ) {
- job->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Decryption Error" ) );
+ job->showErrorDialog( parentWidget(), i18n( "Chiasmus Decryption Error" ) );
return;
}
@@ -3321,21 +3321,21 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
const TQString msg = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-decrypt\" function did not return a "
"byte array. Please report this bug." );
- KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
+ KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString(), tqparentWidget() );
+ const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString(), parentWidget() );
if ( url.isEmpty() )
return;
- bool overwrite = KMail::Util::checkOverwrite( url, tqparentWidget() );
+ bool overwrite = KMail::Util::checkOverwrite( url, parentWidget() );
if ( !overwrite )
return;
d.setDisabled( true ); // we got this far, don't delete yet
KIO::Job * uploadJob = KIO::storedPut( result.toByteArray(), url, -1, overwrite, false /*resume*/ );
- uploadJob->setWindow( tqparentWidget() );
+ uploadJob->setWindow( parentWidget() );
connect( uploadJob, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) );
}
@@ -3500,7 +3500,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify()
KMail::EditorWatcher *watcher =
new KMail::EditorWatcher( KURL( mTempFile.file()->name() ),
part.typeStr() + "/" + part.subtypeStr(),
- false, this, tqparentWidget() );
+ false, this, parentWidget() );
connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) );
if ( !watcher->start() )
return Failed;
@@ -3529,16 +3529,16 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
DwBodyPart *dwpart = msg->findPart( mPartIndex );
KMMessage::bodyPart( dwpart, &part, true );
- DwBody *tqparentNode = dynamic_cast<DwBody*>( dwpart->Parent() );
- assert( tqparentNode );
- tqparentNode->RemoveBodyPart( dwpart );
+ DwBody *parentNode = dynamic_cast<DwBody*>( dwpart->Parent() );
+ assert( parentNode );
+ parentNode->RemoveBodyPart( dwpart );
KMMessagePart att;
att.duplicate( part );
att.setBodyEncodedBinary( data );
DwBodyPart* newDwPart = msg->createDWBodyPart( &att );
- tqparentNode->AddBodyPart( newDwPart );
+ parentNode->AddBodyPart( newDwPart );
msg->getTopLevelPart()->Assemble();
KMMessage *newMsg = new KMMessage();