summaryrefslogtreecommitdiffstats
path: root/tdeioslave/media/libmediacommon/medium.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-28 13:17:42 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-11-28 13:17:42 -0600
commit2c1d4ad359e90360708cffe70c298b264b302e49 (patch)
tree02f179c7d5f201f39c3036190142fa95c2288641 /tdeioslave/media/libmediacommon/medium.cpp
parenta7c3b934973a9435120596a6a577ab62e6fee348 (diff)
downloadtdebase-2c1d4ad359e90360708cffe70c298b264b302e49.tar.gz
tdebase-2c1d4ad359e90360708cffe70c298b264b302e49.zip
Hide udev hidden devices via the hidden file mechanism
This resolves Bug 2211
Diffstat (limited to 'tdeioslave/media/libmediacommon/medium.cpp')
-rw-r--r--tdeioslave/media/libmediacommon/medium.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tdeioslave/media/libmediacommon/medium.cpp b/tdeioslave/media/libmediacommon/medium.cpp
index ca526ea49..77e32ba0f 100644
--- a/tdeioslave/media/libmediacommon/medium.cpp
+++ b/tdeioslave/media/libmediacommon/medium.cpp
@@ -42,6 +42,7 @@ Medium::Medium(const TQString id, TQString uuid, const TQString name)
m_properties+= "false"; /* ENCRYPTED */
m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
m_properties+= "false"; /* HIDDEN */
+ m_properties+= "false"; /* SOFT_HIDDEN */
loadUserLabel();
@@ -67,6 +68,7 @@ Medium::Medium()
m_properties+= TQString::null; /* ENCRYPTED */
m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
m_properties+= "false"; /* HIDDEN */
+ m_properties+= "false"; /* SOFT_HIDDEN */
m_halmounted = false;
}
@@ -94,6 +96,7 @@ const Medium Medium::create(const TQStringList &properties)
m.m_properties[ENCRYPTED] = properties[ENCRYPTED];
m.m_properties[CLEAR_DEVICE_UDI] = properties[CLEAR_DEVICE_UDI];
m.m_properties[HIDDEN] = properties[HIDDEN];
+ m.m_properties[SOFT_HIDDEN] = properties[SOFT_HIDDEN];
}
return m;
@@ -145,6 +148,11 @@ void Medium::setHidden(bool state)
m_properties[HIDDEN] = ( state ? "true" : "false" );
}
+void Medium::setSoftHidden(bool state)
+{
+ m_properties[SOFT_HIDDEN] = ( state ? "true" : "false" );
+}
+
void Medium::setUserLabel(const TQString &label)
{
TDEConfig cfg("mediamanagerrc");