Commit 61b65eb2 authored by Aurélien Gâteau's avatar Aurélien Gâteau
Browse files

Show a specific text for file dialog ok button when used in file operation.

BUG:172012

svn path=/trunk/KDE/kdegraphics/gwenview/; revision=872703
parent bea5bd12
......@@ -26,6 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
#include <kfiledialog.h>
#include <kfileitem.h>
#include <kinputdialog.h>
#include <kpushbutton.h>
#include <kio/copyjob.h>
#include <kio/deletejob.h>
#include <kio/job.h>
......@@ -59,20 +60,23 @@ static void copyMoveOrLink(Operation operation, const KUrl::List& urlList, QWidg
KUrl("kfiledialog:///<copyMoveOrLink>"),
QString() /* filter */,
parent);
dialog.setOperationMode(KFileDialog::Saving);
switch (operation) {
case COPY:
dialog.setCaption(i18n("Copy To"));
dialog.okButton()->setText(i18nc("@action:button", "Copy"));
break;
case MOVE:
dialog.setCaption(i18n("Move To"));
dialog.okButton()->setText(i18nc("@action:button", "Move"));
break;
case LINK:
dialog.setCaption(i18n("Link To"));
dialog.okButton()->setText(i18nc("@action:button", "Link"));
break;
default:
Q_ASSERT(0);
}
dialog.setOperationMode(KFileDialog::Saving);
if (urlList.count() == 1) {
dialog.setMode(KFile::File);
dialog.setSelection(urlList[0].fileName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment