summaryrefslogtreecommitdiffstats
path: root/kioslave/media
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 09:14:57 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-03 09:14:57 +0000
commit27856879bf962f178d88e79144e37a47e731b122 (patch)
treea3bd3f489b755cd2941e7c53b90d12d6bfd4fbe3 /kioslave/media
parentc5228d52f504d6d2c0fefdd625ec08ebb8e91f85 (diff)
downloadtdebase-27856879bf962f178d88e79144e37a47e731b122.tar.gz
tdebase-27856879bf962f178d88e79144e37a47e731b122.zip
* Massive import of OpenSUSE patches, primarily for bugfixes
* Added some infrastructure created by OpenSUSE to allow for future addition of the Kickoff menu as an option * Minor Slackware compilation fixes git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1171255 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/media')
-rw-r--r--kioslave/media/mediaimpl.cpp7
-rw-r--r--kioslave/media/mediamanager/halbackend.cpp8
2 files changed, 15 insertions, 0 deletions
diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp
index fb9e01480..b55b37e5d 100644
--- a/kioslave/media/mediaimpl.cpp
+++ b/kioslave/media/mediaimpl.cpp
@@ -281,6 +281,13 @@ bool MediaImpl::ensureMediumMounted(Medium &medium)
return m_lastErrorCode==0;
}
+ if (medium.id().isEmpty())
+ {
+ m_lastErrorCode = KIO::ERR_COULD_NOT_MOUNT;
+ m_lastErrorMessage = i18n("No such medium.");
+ return false;
+ }
+
return true;
}
diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp
index b6763ee84..7b56d46ad 100644
--- a/kioslave/media/mediamanager/halbackend.cpp
+++ b/kioslave/media/mediamanager/halbackend.cpp
@@ -35,6 +35,7 @@
#include <kmountpoint.h>
#include <kmessagebox.h>
#include <kio/job.h>
+#include <kprotocolinfo.h>
#include <kstandarddirs.h>
#include <kprocess.h>
@@ -623,6 +624,13 @@ void HALBackend::setVolumeProperties(Medium* medium)
case LIBHAL_DRIVE_TYPE_PORTABLE_AUDIO_PLAYER:
{
medium->setIconName("ipod" + MOUNT_ICON_SUFFIX);
+
+ if (libhal_device_get_property_QString(m_halContext, driveUdi.latin1(), "info.product") == "iPod" &&
+ KProtocolInfo::isKnownProtocol( TQString("ipod") ) )
+ {
+ medium->unmountableState( "ipod:/" );
+ medium->mountableState( libhal_volume_is_mounted(halVolume) );
+ }
break;
}
case LIBHAL_DRIVE_TYPE_CAMERA: