Index: ./tools/kptoolresizescale.cpp =================================================================== RCS file: /home/kde/kdegraphics/kolourpaint/tools/kptoolresizescale.cpp,v retrieving revision 1.27 diff -u -3 -p -r1.27 kptoolresizescale.cpp --- ./tools/kptoolresizescale.cpp 19 Jul 2004 03:25:57 -0000 1.27 +++ ./tools/kptoolresizescale.cpp 23 Jul 2004 13:08:27 -0000 @@ -1069,74 +1069,117 @@ bool kpToolResizeScaleDialog::isNoOp () // private slot virtual [base KDialogBase] void kpToolResizeScaleDialog::slotOk () { - QString selOrImageLowerCase, selOrImageTitleCase; + enum { eText, eSelection, eImage } actionTarget = eText; if (actOnSelection ()) { if (selection ()->isText ()) { - selOrImageLowerCase = i18n ("text box"); - selOrImageTitleCase = i18n ("Text Box"); + actionTarget = eText; } else { - selOrImageLowerCase = i18n ("selection"); - selOrImageTitleCase = i18n ("Selection"); + actionTarget = eSelection; } } else { - selOrImageLowerCase = i18n ("image"); - selOrImageTitleCase = i18n ("Image"); + actionTarget = eImage; } - - QString operationIngTitleCase, operationLowerCase; + QString operation, question; QString continueButtonText, caption; switch (type ()) { default: case kpToolResizeScaleCommand::Resize: - operationIngTitleCase = i18n ("Resizing"); - operationLowerCase = i18n ("resize"); - continueButtonText = i18n ("R&esize %1").arg (selOrImageTitleCase); - caption = i18n ("Resize %1?").arg (selOrImageTitleCase); + switch(actionTarget) + { + case eText : + operation = i18n ("Resizing the text box to %1x%2"); + continueButtonText = i18n ("R&esize Text Box"); + caption = i18n ("Resize Text Box?"); + question = i18n ("Are you sure you want to resize the text box?"); + break; + case eImage : + operation = i18n("Resizing the image to %1x%2"); + continueButtonText = i18n ("R&esize Image"); + caption = i18n ("Resize Image?"); + question = i18n ("Are you sure you want to resize the image?"); + break; + case eSelection : + operation = i18n("Resizing the selection to %1x%2"); + continueButtonText = i18n ("R&esize Selection"); + caption = i18n ("Resize Selection?"); + question = i18n ("Are you sure you want to resize the selection?"); + break; + } break; case kpToolResizeScaleCommand::Scale: - operationIngTitleCase = i18n ("Scaling"); - operationLowerCase = i18n ("scale"); - continueButtonText = i18n ("Scal&e %1").arg (selOrImageTitleCase); - caption = i18n ("Scale %1?").arg (selOrImageTitleCase); + switch(actionTarget) + { + case eText : + operation = i18n ("Scaling the text box to %1x%2"); + continueButtonText = i18n ("Scal&e Text Box"); + caption = i18n ("Scale Text Box?"); + question = i18n ("Are you sure you want to scale the text box?"); + break; + case eImage : + operation = i18n("Scaling the image to %1x%2"); + continueButtonText = i18n ("Scal&e Image"); + caption = i18n ("Scale Image?"); + question = i18n ("Are you sure you want to scale the image?"); + break; + case eSelection : + operation = i18n("Scaling the selection to %1x%2"); + continueButtonText = i18n ("Scal&e Selection"); + caption = i18n ("Scale Selection?"); + question = i18n ("Are you sure you want to scale the selection?"); + break; + } break; case kpToolResizeScaleCommand::SmoothScale: - operationIngTitleCase = i18n ("Smooth Scaling"); - operationLowerCase = i18n ("smooth scale"); - continueButtonText = i18n ("Smooth Scal&e %1").arg (selOrImageTitleCase); - caption = i18n ("Smooth Scale %1?").arg (selOrImageTitleCase); + switch(actionTarget) + { + case eText : + operation = i18n ("Smooth Scaling the text box to %1x%2"); + continueButtonText = i18n ("Smooth Scal&e Text Box"); + caption = i18n ("Smooth Scale Text Box?"); + question = i18n ("Are you sure you want to smooth scale the text box?"); + break; + case eImage : + operation = i18n("Smooth Scaling the image to %1x%2"); + continueButtonText = i18n ("Smooth Scal&e Image"); + caption = i18n ("Smooth Scale Image?"); + question = i18n ("Are you sure you want to smooth scale the image?"); + break; + case eSelection : + operation = i18n("Smooth Scaling the selection to %1x%2"); + continueButtonText = i18n ("Smooth Scal&e Selection"); + caption = i18n ("Smooth Scale Selection?"); + question = i18n ("Are you sure you want to smooth scale the selection?"); + break; + } break; } + operation = operation.arg (imageWidth ()).arg (imageHeight ()); if (kpTool::warnIfBigImageSize (originalWidth (), originalHeight (), imageWidth (), imageHeight (), - i18n ("

%1 the %2 to" - " %3x%4 may take a substantial amount of memory." + i18n ("

%1." + " This may take a substantial amount of memory." " This can reduce system" " responsiveness and cause other application resource" " problems.

" - "

Are you sure want to %5 the" - " %6?

") - .arg (operationIngTitleCase) - .arg (selOrImageLowerCase) - .arg (imageWidth ()) - .arg (imageHeight ()) - .arg (operationLowerCase) - .arg (selOrImageLowerCase), + "

%2

") + .arg(operation) + .arg(question), caption, continueButtonText, this))