[Bug 894123] [muon] updater: Apparently, desktop computers report having no A/C plug at all. (Maybe it doesn't count
Jonathan Thomas
echidnaman at kubuntu.org
Fri Nov 25 03:16:11 UTC 2011
Git commit 7c133dbe38c46201d9e9692066a2d25cfa51e292 by Jonathan Thomas.
Committed on 25/11/2011 at 04:14.
Pushed by jmthomas into branch 'master'.
Apparently, desktop computers report having no A/C plug at all. (Maybe it doesn't count
power supplies). At any rate, don't show the plug message if the list of plugs is empty.
CCMAIL:894123 at bugs.launchpad.net
M +7 -0 updater/MainWindow.cpp
http://commits.kde.org/muon/7c133dbe38c46201d9e9692066a2d25cfa51e292
diff --git a/updater/MainWindow.cpp b/updater/MainWindow.cpp
index 73e6cb1..d18c6ef 100644
--- a/updater/MainWindow.cpp
+++ b/updater/MainWindow.cpp
@@ -238,6 +238,7 @@ void MainWindow::setActionsEnabled(bool enabled)
m_undoAction->setEnabled(!m_backend->isUndoStackEmpty());
m_redoAction->setEnabled(!m_backend->isRedoStackEmpty());
m_revertAction->setEnabled(!m_backend->isUndoStackEmpty());
+ m_updaterWidget->setEnabled(true);
}
void MainWindow::checkForUpdates()
@@ -310,6 +311,12 @@ void MainWindow::closeHistoryDialog()
void MainWindow::checkPlugState()
{
const QList<Solid::Device> acAdapters = Solid::Device::listFromType(Solid::DeviceInterface::AcAdapter);
+
+ if (acAdapters.isEmpty()) {
+ updatePlugState(true);
+ return;
+ }
+
bool isPlugged = false;
foreach(Solid::Device device_ac, acAdapters) {
** Changed in: muon (Ubuntu)
Status: New => Fix Committed
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to muon in Ubuntu.
https://bugs.launchpad.net/bugs/894123
Title:
reccommends I plug in power adapter
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/muon/+bug/894123/+subscriptions
More information about the kubuntu-bugs
mailing list