summaryrefslogtreecommitdiffstats
path: root/kioslave/media/libmediacommon
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-09-02 02:41:08 -0500
committerTimothy Pearson <[email protected]>2012-09-02 02:41:08 -0500
commitd36f60966edf14f1420b8226951f6f26cd48c731 (patch)
tree3d88b60e0a0c0a011234a321253bb90fc3c47111 /kioslave/media/libmediacommon
parent96bfcec9d751b7255163e548b0bbb91b7c7b3332 (diff)
downloadtdebase-d36f60966edf14f1420b8226951f6f26cd48c731.tar.gz
tdebase-d36f60966edf14f1420b8226951f6f26cd48c731.zip
Fix TDEHWLib media backend user device labels
Diffstat (limited to 'kioslave/media/libmediacommon')
-rw-r--r--kioslave/media/libmediacommon/medium.cpp9
-rw-r--r--kioslave/media/libmediacommon/medium.h36
2 files changed, 25 insertions, 20 deletions
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp
index ca618494e..031e56788 100644
--- a/kioslave/media/libmediacommon/medium.cpp
+++ b/kioslave/media/libmediacommon/medium.cpp
@@ -23,9 +23,10 @@
const TQString Medium::SEPARATOR = "---";
-Medium::Medium(const TQString &id, const TQString &name)
+Medium::Medium(const TQString id, TQString uuid, const TQString name)
{
m_properties+= id; /* ID */
+ m_properties+= uuid; /* UUID */
m_properties+= name; /* NAME */
m_properties+= name; /* LABEL */
m_properties+= TQString::null; /* USER_LABEL */
@@ -50,6 +51,7 @@ Medium::Medium(const TQString &id, const TQString &name)
Medium::Medium()
{
m_properties+= TQString::null; /* ID */
+ m_properties+= TQString::null; /* UUID */
m_properties+= TQString::null; /* NAME */
m_properties+= TQString::null; /* LABEL */
m_properties+= TQString::null; /* USER_LABEL */
@@ -76,6 +78,7 @@ const Medium Medium::create(const TQStringList &properties)
if ( properties.size() >= PROPERTIES_COUNT )
{
m.m_properties[ID] = properties[ID];
+ m.m_properties[UUID] = properties[UUID];
m.m_properties[NAME] = properties[NAME];
m.m_properties[LABEL] = properties[LABEL];
m.m_properties[USER_LABEL] = properties[USER_LABEL];
@@ -147,7 +150,7 @@ void Medium::setUserLabel(const TQString &label)
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- TQString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[UUID];
if ( label.isNull() )
{
@@ -166,7 +169,7 @@ void Medium::loadUserLabel()
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- TQString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[UUID];
if ( cfg.hasKey(entry_name) )
{
diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h
index 78da6d09c..e45dccbfd 100644
--- a/kioslave/media/libmediacommon/medium.h
+++ b/kioslave/media/libmediacommon/medium.h
@@ -29,31 +29,33 @@ class Medium
public:
typedef TQValueList<Medium> MList;
- static const uint ID = 0;
- static const uint NAME = 1;
- static const uint LABEL = 2;
- static const uint USER_LABEL = 3;
- static const uint MOUNTABLE = 4;
- static const uint DEVICE_NODE = 5;
- static const uint MOUNT_POINT = 6;
- static const uint FS_TYPE = 7;
- static const uint MOUNTED = 8;
- static const uint BASE_URL = 9;
- static const uint MIME_TYPE = 10;
- static const uint ICON_NAME = 11;
- static const uint ENCRYPTED = 12;
- static const uint CLEAR_DEVICE_UDI = 13;
- static const uint HIDDEN = 14;
- static const uint PROPERTIES_COUNT = 15;
+ static const uint ID = 0;
+ static const uint UUID = 1;
+ static const uint NAME = 2;
+ static const uint LABEL = 3;
+ static const uint USER_LABEL = 4;
+ static const uint MOUNTABLE = 5;
+ static const uint DEVICE_NODE = 6;
+ static const uint MOUNT_POINT = 7;
+ static const uint FS_TYPE = 8;
+ static const uint MOUNTED = 9;
+ static const uint BASE_URL = 10;
+ static const uint MIME_TYPE = 11;
+ static const uint ICON_NAME = 12;
+ static const uint ENCRYPTED = 13;
+ static const uint CLEAR_DEVICE_UDI = 14;
+ static const uint HIDDEN = 15;
+ static const uint PROPERTIES_COUNT = 16;
static const TQString SEPARATOR;
- Medium(const TQString &id, const TQString &name);
+ Medium(const TQString id, TQString uuid, const TQString name);
static const Medium create(const TQStringList &properties);
static MList createList(const TQStringList &properties);
const TQStringList &properties() const { return m_properties; }
TQString id() const { return m_properties[ID]; }
+ TQString uuid() const { return m_properties[UUID]; }
TQString name() const { return m_properties[NAME]; }
TQString label() const { return m_properties[LABEL]; }
TQString userLabel() const { return m_properties[USER_LABEL]; }