diff options
author | Timothy Pearson <[email protected]> | 2012-04-01 19:00:01 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-04-01 19:00:01 -0500 |
commit | 480a63959b1162b197260c7ee6c294563ce0845e (patch) | |
tree | 93463303b3ae06a1541686ff95d36919cf7318ca /kioslave/media/libmediacommon | |
parent | ccc23cb9fdd1a24e258833a4c8724f2b49635bde (diff) | |
download | tdebase-480a63959b1162b197260c7ee6c294563ce0845e.tar.gz tdebase-480a63959b1162b197260c7ee6c294563ce0845e.zip |
Repair encrypted device handling in TDE media backend
Repair Zip drive handling in same
Diffstat (limited to 'kioslave/media/libmediacommon')
-rw-r--r-- | kioslave/media/libmediacommon/medium.cpp | 8 | ||||
-rw-r--r-- | kioslave/media/libmediacommon/medium.h | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp index 9fa7ab253..ca618494e 100644 --- a/kioslave/media/libmediacommon/medium.cpp +++ b/kioslave/media/libmediacommon/medium.cpp @@ -40,6 +40,7 @@ Medium::Medium(const TQString &id, const TQString &name) m_properties+= TQString::null; /* ICON_NAME */ m_properties+= "false"; /* ENCRYPTED */ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */ + m_properties+= "false"; /* HIDDEN */ loadUserLabel(); @@ -63,6 +64,7 @@ Medium::Medium() m_properties+= TQString::null; /* ICON_NAME */ m_properties+= TQString::null; /* ENCRYPTED */ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */ + m_properties+= "false"; /* HIDDEN */ m_halmounted = false; } @@ -88,6 +90,7 @@ const Medium Medium::create(const TQStringList &properties) m.m_properties[ICON_NAME] = properties[ICON_NAME]; m.m_properties[ENCRYPTED] = properties[ENCRYPTED]; m.m_properties[CLEAR_DEVICE_UDI] = properties[CLEAR_DEVICE_UDI]; + m.m_properties[HIDDEN] = properties[HIDDEN]; } return m; @@ -134,6 +137,11 @@ void Medium::setEncrypted(bool state) m_properties[ENCRYPTED] = ( state ? "true" : "false" ); } +void Medium::setHidden(bool state) +{ + m_properties[HIDDEN] = ( state ? "true" : "false" ); +} + void Medium::setUserLabel(const TQString &label) { KConfig cfg("mediamanagerrc"); diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h index b0eb86c33..78da6d09c 100644 --- a/kioslave/media/libmediacommon/medium.h +++ b/kioslave/media/libmediacommon/medium.h @@ -1,5 +1,5 @@ /* This file is part of the KDE Project - Copyright (c) 2004 K�vin Ottens <ervin ipsquad net> + Copyright (c) 2004 K�vin Ottens <ervin ipsquad net> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -43,7 +43,8 @@ public: static const uint ICON_NAME = 11; static const uint ENCRYPTED = 12; static const uint CLEAR_DEVICE_UDI = 13; - static const uint PROPERTIES_COUNT = 14; + static const uint HIDDEN = 14; + static const uint PROPERTIES_COUNT = 15; static const TQString SEPARATOR; Medium(const TQString &id, const TQString &name); @@ -66,6 +67,7 @@ public: TQString iconName() const { return m_properties[ICON_NAME]; } bool isEncrypted() const { return m_properties[ENCRYPTED]=="true"; }; TQString clearDeviceUdi() const { return m_properties[CLEAR_DEVICE_UDI]; }; + bool hidden() const { return m_properties[HIDDEN]=="true"; }; bool needMounting() const; bool needDecryption() const; @@ -76,6 +78,7 @@ public: void setLabel(const TQString &label); void setUserLabel(const TQString &label); void setEncrypted(bool state); + void setHidden(bool state); bool mountableState(bool mounted); void mountableState(const TQString &deviceNode, |