summaryrefslogtreecommitdiffstats
path: root/kcontrol/hwmanager
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-09 16:39:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-09 16:39:31 -0600
commite88baf8334b8ff7ce92e555cbaffee949672d4b8 (patch)
treecaac57be5b2bb29eef81ffb58341829e2571ebb3 /kcontrol/hwmanager
parent477e956a04dfb244814f274e98a8d6f4beb84f3f (diff)
downloadtdebase-e88baf8334b8ff7ce92e555cbaffee949672d4b8.tar.gz
tdebase-e88baf8334b8ff7ce92e555cbaffee949672d4b8.zip
Automatically deactivate disconnected display devices
Notify user on display add/remove/change Add advanced display configuration option to krandr menu Add option to autohide kicker panels on inactive Xinerama screens and enable by default Update hwmanager treeview on device change
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;