summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager
diff options
context:
space:
mode:
Diffstat (limited to 'kcontrol/hwmanager')
-rw-r--r--kcontrol/hwmanager/hwmanager.cpp20
-rw-r--r--kcontrol/hwmanager/hwmanager.h1
2 files changed, 20 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");
diff --git a/kcontrol/hwmanager/hwmanager.h b/kcontrol/hwmanager/hwmanager.h
index a7c9749a7..1847f4f33 100644
--- a/kcontrol/hwmanager/hwmanager.h
+++ b/kcontrol/hwmanager/hwmanager.h
@@ -60,6 +60,7 @@ k_dcop:
private slots:
void populateTreeView();
void populateTreeViewLeaf(DeviceIconItem *parent, bool show_by_connection, TQString selected_syspath);
+ void deviceChanged(TDEGenericDevice*);
private:
TDEHWManagerBase *base;