From d39c407bf49fab58fa53c20bb3d301ee6e709c32 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 21 Nov 2020 17:49:23 +0800 Subject: 1) tdehwdevicetray: added support for unmount/unlock/lock operations. 2) minor changes and improvements to user messages. Signed-off-by: Michele Calgaro --- tdeioslave/media/mediamanager/tdehardwarebackend.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tdeioslave/media') diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp index b7dc942ba..31b8fa3a9 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp @@ -1279,7 +1279,7 @@ TQStringVariantMap TDEBackend::mount(const Medium *medium) TQStringVariantMap mountResult = sdevice->mountDevice(diskLabel, valids); TQString mountedPath = mountResult.contains("mountPath") ? mountResult["mountPath"].toString() : TQString::null; if (mountedPath.isEmpty()) { - qerror = i18n("Unable to mount this device."); + qerror = i18n("Unable to mount this device."); TQString errStr = mountResult.contains("errStr") ? mountResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("

Technical details:
").append(errStr)); @@ -1380,7 +1380,7 @@ TQStringVariantMap TDEBackend::unmount(const TQString &id) TQStringVariantMap unmountResult = sdevice->unmountDevice(); if (unmountResult["result"].toBool() == false) { // Unmount failed! - qerror = i18n("Unfortunately, the device %1 (%2) named '%3' and currently mounted at " + qerror = i18n("The device %1 (%2) named '%3' and currently mounted at " "%4 could not be unmounted. ").arg("system:/media/" + medium->name(), medium->deviceNode(), medium->prettyLabel(), medium->prettyBaseURL().pathOrURL()); TQString errStr = unmountResult.contains("errStr") ? unmountResult["errStr"].toString() : TQString::null; @@ -1402,7 +1402,7 @@ TQStringVariantMap TDEBackend::unmount(const TQString &id) unmountResult = sdevice->unmountDevice(); if (unmountResult["result"].toBool() == false) { // Unmount failed! - qerror = i18n("Unfortunately, the device %1 (%2) named '%3' and currently mounted at " + qerror = i18n("The device %1 (%2) named '%3' and currently mounted at " "%4 could not be unmounted. ").arg("system:/media/" + medium->name(), medium->deviceNode(), medium->prettyLabel(), medium->prettyBaseURL().pathOrURL()); TQString errStr = unmountResult.contains("errStr") ? unmountResult["errStr"].toString() : TQString::null; @@ -1464,7 +1464,7 @@ TQStringVariantMap TDEBackend::unlock(const TQString &id, const TQString &passwo TQStringVariantMap unlockResult = sdevice->unlockDevice(password); if (unlockResult["result"].toBool() == false) { - TQString qerror = i18n("Unable to unlock the device."); + TQString qerror = i18n("Unable to unlock the device."); TQString errStr = unlockResult.contains("errStr") ? unlockResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("

Technical details:
").append(errStr)); @@ -1513,7 +1513,7 @@ TQStringVariantMap TDEBackend::lock(const TQString &id) TQStringVariantMap lockResult = sdevice->lockDevice(); if (lockResult["result"].toBool() == false) { - TQString qerror = i18n("Unable to lock the device."); + TQString qerror = i18n("Unable to lock the device."); TQString errStr = lockResult.contains("errStr") ? lockResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("

Technical details:
").append(errStr)); @@ -1538,7 +1538,7 @@ void TDEBackend::slotResult(TDEIO::Job *job) if (job->error() == TDEIO::ERR_COULD_NOT_UNMOUNT) { TQString proclist(listUsingProcesses(medium)); - qerror += "

" + i18n("Unfortunately, the device %1 (%2) named '%3' and " + qerror += "

" + i18n("The device %1 (%2) named '%3' and " "currently mounted at %4 could not be unmounted. ").arg( "system:/media/" + medium->name(), medium->deviceNode(), -- cgit v1.2.1