[kde-freebsd] [kdelibs/KDE/4.7] solid/solid/backends/hal: Fix icons and descriptions of CDs/DVDs on FreeBSD
Alberto Villa
avilla at FreeBSD.org
Wed Aug 31 01:13:56 UTC 2011
Git commit 1ee4981b0e73dec9038a7e90ea5025c2ba360624 by Alberto Villa.
Committed on 31/08/2011 at 03:05.
Pushed by avilla into branch 'KDE/4.7'.
Fix icons and descriptions of CDs/DVDs on FreeBSD
HAL on FreeBSD is stricter than on Linux, and marks them as
storage.cdrom/volume.disc instead of only storage/volume. Checks for
those categories as well.
CCMAIL: kde at FreeBSD.org
M +4 -4 solid/solid/backends/hal/haldevice.cpp
http://commits.kde.org/kdelibs/1ee4981b0e73dec9038a7e90ea5025c2ba360624
diff --git a/solid/solid/backends/hal/haldevice.cpp b/solid/solid/backends/hal/haldevice.cpp
index 3a7eba5..528b183 100644
--- a/solid/solid/backends/hal/haldevice.cpp
+++ b/solid/solid/backends/hal/haldevice.cpp
@@ -199,7 +199,7 @@ QString HalDevice::icon() const
return "computer";
}
- } else if (category=="storage") {
+ } else if (category=="storage" || category=="storage.cdrom") {
if (prop("storage.drive_type").toString()=="floppy") {
return "media-floppy";
@@ -222,7 +222,7 @@ QString HalDevice::icon() const
return "drive-harddisk";
- } else if (category=="volume") {
+ } else if (category=="volume" || category=="volume.disc") {
QStringList capabilities = prop("info.capabilities").toStringList();
@@ -350,9 +350,9 @@ QString HalDevice::description() const
{
QString category = prop("info.category").toString();
- if (category=="storage") {
+ if (category=="storage" || category=="storage.cdrom") {
return storageDescription();
- } else if (category=="volume") {
+ } else if (category=="volume" || category=="volume.disc") {
return volumeDescription();
} else if (category=="net.80211") {
return QObject::tr("WLAN Interface");
More information about the kde-freebsd
mailing list