diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-15 03:03:58 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-15 03:03:58 -0500 |
commit | 41c013e06c430febb6a5353286573c968ca01440 (patch) | |
tree | 0fee1f29c1dc2ac11009aeef169cf9376303d22a /tdeioslave/media/mediamanager/tdehardwarebackend.cpp | |
parent | 9e4aad6b3bc3c1b4781a3c1cef6968640d4f6e67 (diff) | |
download | tdebase-41c013e06c430febb6a5353286573c968ca01440.tar.gz tdebase-41c013e06c430febb6a5353286573c968ca01440.zip |
Fix a number of issues with the media tdeioslave
This relates to Bug 1450
Add media disk space overlay and enable by default
Diffstat (limited to 'tdeioslave/media/mediamanager/tdehardwarebackend.cpp')
-rw-r--r-- | tdeioslave/media/mediamanager/tdehardwarebackend.cpp | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp index 31481b6e8..625b4e251 100644 --- a/tdeioslave/media/mediamanager/tdehardwarebackend.cpp +++ b/tdeioslave/media/mediamanager/tdehardwarebackend.cpp @@ -751,7 +751,7 @@ TQStringList TDEBackend::mountoptions(const TQString &name) value = config.readBoolEntry("automount", false); } else { - QString current_group = config.group(); + TQString current_group = config.group(); config.setGroup(drive_udi); value = config.readBoolEntry("automount", false); config.setGroup(current_group); @@ -1125,8 +1125,9 @@ TQString TDEBackend::mount(const Medium *medium) TQString TDEBackend::mount(const TQString &_udi) { const Medium* medium = m_mediaList.findById(_udi); - if (!medium) + if (!medium) { return i18n("No such medium: %1").arg(_udi); + } return mount(medium); } @@ -1135,11 +1136,13 @@ TQString TDEBackend::unmount(const TQString &_udi) { const Medium* medium = m_mediaList.findById(_udi); - if ( !medium ) + if ( !medium ) { return i18n("No such medium: %1").arg(_udi); + } - if (!medium->isMounted()) + if (!medium->isMounted()) { return TQString(); // that was easy + } TQString mountPoint = isInFstab(medium); if (!mountPoint.isNull()) @@ -1222,23 +1225,6 @@ TQString TDEBackend::unmount(const TQString &_udi) if (!checkDN.exists()) { m_mediaList.removeMedium(uid, true); } - else { - TQString mountedPath = sdevice->mountPath(); - if (!mountedPath.isNull()) { - // Because the TDE hardware backend is event driven it might take a little while for the device to show up as unmounted - // Wait up to 30 seconds for the mount to disappear... - for (int i=0;i<300;i++) { - mountedPath = sdevice->mountPath(); - if (mountedPath.isNull()) { - break; - } - tqApp->processEvents(50); - usleep(50000); - } - } - - ResetProperties(sdevice, false); - } return TQString(); } |