summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager/hwmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/hwmanager/hwmanager.cpp')
-rw-r--r--kcontrol/hwmanager/hwmanager.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/kcontrol/hwmanager/hwmanager.cpp b/kcontrol/hwmanager/hwmanager.cpp
index 36dc89b3e..936a8ab38 100644
--- a/kcontrol/hwmanager/hwmanager.cpp
+++ b/kcontrol/hwmanager/hwmanager.cpp
@@ -90,7 +90,7 @@ TDEHWManager::TDEHWManager(TQWidget *parent, const char *name, const TQStringLis
connect(hwdevices, TQT_SIGNAL(hardwareAdded(TDEGenericDevice*)), this, TQT_SLOT(populateTreeView()));
connect(hwdevices, TQT_SIGNAL(hardwareRemoved(TDEGenericDevice*)), this, TQT_SLOT(populateTreeView()));
-// connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(populateTreeView()));
+ connect(hwdevices, TQT_SIGNAL(hardwareUpdated(TDEGenericDevice*)), this, TQT_SLOT(deviceChanged(TDEGenericDevice*)));
load();
@@ -188,6 +188,24 @@ void TDEHWManager::populateTreeViewLeaf(DeviceIconItem *parent, bool show_by_con
}
}
+void TDEHWManager::deviceChanged(TDEGenericDevice* device) {
+ TQListViewItemIterator it(base->deviceTree);
+ while (it.current()) {
+ DeviceIconItem* item = dynamic_cast<DeviceIconItem*>(it.current());
+ if (item) {
+ TDEGenericDevice* candidate = item->device();
+ if (candidate) {
+ if (candidate->systemPath() == device->systemPath()) {
+ if (item->text(0) != device->friendlyName()) {
+ item->setText(0, device->friendlyName());
+ }
+ }
+ }
+ }
+ ++it;
+ }
+}
+
TQString TDEHWManager::quickHelp() const
{
return i18n("<h1>TDE Hardware Device Manager</h1> This module allows you to configure hardware devices on your system");