summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-05 13:37:07 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-12-05 13:37:07 -0600
commit066f3174aa735e9153c5f4236e5495d51c1a0818 (patch)
treea476566b943c976bd7e07ef2c6bd323b156e3a82 /tdecore/tdehw
parent6ddd04bacafe12003b229afc036dc4674df48d5f (diff)
downloadtdelibs-066f3174aa735e9153c5f4236e5495d51c1a0818.tar.gz
tdelibs-066f3174aa735e9153c5f4236e5495d51c1a0818.zip
Fix detection of laptop AC adapters
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp5
-rw-r--r--tdecore/tdehw/tdehardwaredevices.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index 48fce75e0..7ddd46da1 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -1,5 +1,5 @@
/* This file is part of the TDE libraries
- Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+ Copyright (C) 2012-2014 Timothy Pearson <kb9vqf@pearsoncomputing.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -2185,7 +2185,8 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
}
if (devicesubsystem == "power_supply") {
TQString powersupplyname(udev_device_get_property_value(dev, "POWER_SUPPLY_NAME"));
- if (powersupplyname.upper().startsWith("AC")) {
+ if ((devicedriver == "ac")
+ || (powersupplyname.upper().startsWith("AC"))) {
if (!device) device = new TDEMainsPowerDevice(TDEGenericDeviceType::PowerSupply);
}
else {
diff --git a/tdecore/tdehw/tdehardwaredevices.h b/tdecore/tdehw/tdehardwaredevices.h
index 594057b6e..6592b8b10 100644
--- a/tdecore/tdehw/tdehardwaredevices.h
+++ b/tdecore/tdehw/tdehardwaredevices.h
@@ -1,5 +1,5 @@
/* This file is part of the TDE libraries
- Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
+ Copyright (C) 2012-2014 Timothy Pearson <kb9vqf@pearsoncomputing.net>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public