diff options
author | Michele Calgaro <[email protected]> | 2020-11-21 17:49:23 +0800 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-11-21 17:49:23 +0800 |
commit | d39c407bf49fab58fa53c20bb3d301ee6e709c32 (patch) | |
tree | 9bc93b5ecaf45943c3db3304f444a79eb1c780ed /tdeioslave/media/mediamanager/tdehardwarebackend.cpp | |
parent | 1b6c123de102f0152d296fba8771d348329ba95c (diff) | |
download | tdebase-d39c407bf49fab58fa53c20bb3d301ee6e709c32.tar.gz tdebase-d39c407bf49fab58fa53c20bb3d301ee6e709c32.zip |
1) tdehwdevicetray: added support for unmount/unlock/lock operations.
2) minor changes and improvements to user messages.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdeioslave/media/mediamanager/tdehardwarebackend.cpp')
-rw-r--r-- | tdeioslave/media/mediamanager/tdehardwarebackend.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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("<b>Unable to mount this device.</b>"); TQString errStr = mountResult.contains("errStr") ? mountResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("<p>Technical details:<br>").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 <b>%1</b> (%2) named <b>'%3'</b> and currently mounted at " + qerror = i18n("The device <b>%1</b> (%2) named <b>'%3'</b> and currently mounted at " "<b>%4</b> 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 <b>%1</b> (%2) named <b>'%3'</b> and currently mounted at " + qerror = i18n("The device <b>%1</b> (%2) named <b>'%3'</b> and currently mounted at " "<b>%4</b> 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("<b>Unable to unlock the device.</b>"); TQString errStr = unlockResult.contains("errStr") ? unlockResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("<p>Technical details:<br>").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("<b>Unable to lock the device.</b>"); TQString errStr = lockResult.contains("errStr") ? lockResult["errStr"].toString() : TQString::null; if (!errStr.isEmpty()) { qerror.append(i18n("<p>Technical details:<br>").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 += "<p>" + i18n("Unfortunately, the device <b>%1</b> (%2) named <b>'%3'</b> and " + qerror += "<p>" + i18n("The device <b>%1</b> (%2) named <b>'%3'</b> and " "currently mounted at <b>%4</b> could not be unmounted. ").arg( "system:/media/" + medium->name(), medium->deviceNode(), |