From 862bdeba2edc78649c813a70b5e837ea729920fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 8 Aug 2013 12:40:21 +0200 Subject: [PATCH] - up to 4.11.0 --- kde4-kdebase-workspace-multibattery.patch | 2389 --------------------- kde4-kdebase-workspace.spec | 87 +- 2 files changed, 22 insertions(+), 2454 deletions(-) delete mode 100644 kde4-kdebase-workspace-multibattery.patch diff --git a/kde4-kdebase-workspace-multibattery.patch b/kde4-kdebase-workspace-multibattery.patch deleted file mode 100644 index 970fb96..0000000 --- a/kde4-kdebase-workspace-multibattery.patch +++ /dev/null @@ -1,2389 +0,0 @@ -diff --git a/plasma/generic/dataengines/powermanagement/powermanagementengine.cpp b/plasma/generic/dataengines/powermanagement/powermanagementengine.cpp -index 33a6e03..f3a918a 100644 ---- a/plasma/generic/dataengines/powermanagement/powermanagementengine.cpp -+++ b/plasma/generic/dataengines/powermanagement/powermanagementengine.cpp -@@ -34,6 +34,7 @@ - #include - - #include -+#include - #include - #include - #include -@@ -58,23 +59,39 @@ PowermanagementEngine::~PowermanagementEngine() - - void PowermanagementEngine::init() - { -- connect(Solid::DeviceNotifier::instance(), SIGNAL(deviceRemoved(QString)), -- this, SLOT(deviceRemoved(QString))); - connect(Solid::DeviceNotifier::instance(), SIGNAL(deviceAdded(QString)), - this, SLOT(deviceAdded(QString))); -+ connect(Solid::DeviceNotifier::instance(), SIGNAL(deviceRemoved(QString)), -+ this, SLOT(deviceRemoved(QString))); - -+ // FIXME This check doesn't work, connect seems to always return true, hence the hack below - if (QDBusConnection::sessionBus().interface()->isServiceRegistered("org.kde.Solid.PowerManagement")) { - if (!QDBusConnection::sessionBus().connect("org.kde.Solid.PowerManagement", -- "/org/kde/Solid/PowerManagement", -- "org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/BrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.BrightnessControl", - "brightnessChanged", this, - SLOT(screenBrightnessChanged(int)))) { - kDebug() << "error connecting to Brightness changes via dbus"; -- } -- else { -+ brightnessControlsAvailableChanged(false); -+ } else { - sourceRequestEvent("PowerDevil"); - screenBrightnessChanged(0); -+ brightnessControlsAvailableChanged(true); - } -+ -+ if (!QDBusConnection::sessionBus().connect("org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/KeyboardBrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl", -+ "keyboardBrightnessChanged", this, -+ SLOT(keyboardBrightnessChanged(int)))) { -+ kDebug() << "error connecting to Keyboard Brightness changes via dbus"; -+ keyboardBrightnessControlsAvailableChanged(false); -+ } else { -+ sourceRequestEvent("PowerDevil"); -+ keyboardBrightnessChanged(0); -+ keyboardBrightnessControlsAvailableChanged(true); -+ } -+ - if (!QDBusConnection::sessionBus().connect("org.kde.Solid.PowerManagement", - "/org/kde/Solid/PowerManagement", - "org.kde.Solid.PowerManagement", -@@ -114,27 +131,32 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name) - foreach (const Solid::Device &deviceBattery, listBattery) { - const Solid::Battery* battery = deviceBattery.as(); - -- if (battery && (battery->type() == Solid::Battery::PrimaryBattery || -- battery->type() == Solid::Battery::UpsBattery)) { -- const QString source = QString("Battery%1").arg(index++); -+ const QString source = QString("Battery%1").arg(index++); - -- batterySources << source; -- m_batterySources[deviceBattery.udi()] = source; -+ batterySources << source; -+ m_batterySources[deviceBattery.udi()] = source; - -- connect(battery, SIGNAL(chargeStateChanged(int,QString)), this, -- SLOT(updateBatteryChargeState(int,QString))); -- connect(battery, SIGNAL(chargePercentChanged(int,QString)), this, -- SLOT(updateBatteryChargePercent(int,QString))); -- connect(battery, SIGNAL(plugStateChanged(bool,QString)), this, -- SLOT(updateBatteryPlugState(bool,QString))); -+ connect(battery, SIGNAL(chargeStateChanged(int,QString)), this, -+ SLOT(updateBatteryChargeState(int,QString))); -+ connect(battery, SIGNAL(chargePercentChanged(int,QString)), this, -+ SLOT(updateBatteryChargePercent(int,QString))); -+ connect(battery, SIGNAL(plugStateChanged(bool,QString)), this, -+ SLOT(updateBatteryPlugState(bool,QString))); - -- // Set initial values -- updateBatteryChargeState(battery->chargeState(), deviceBattery.udi()); -- updateBatteryChargePercent(battery->chargePercent(), deviceBattery.udi()); -- updateBatteryPlugState(battery->isPlugged(), deviceBattery.udi()); -- } -+ // Set initial values -+ updateBatteryChargeState(battery->chargeState(), deviceBattery.udi()); -+ updateBatteryChargePercent(battery->chargePercent(), deviceBattery.udi()); -+ updateBatteryPlugState(battery->isPlugged(), deviceBattery.udi()); -+ updateBatteryPowerSupplyState(battery->isPowerSupply(), deviceBattery.udi()); -+ -+ setData(source, "Vendor", deviceBattery.vendor()); -+ setData(source, "Product", deviceBattery.product()); -+ setData(source, "Capacity", battery->capacity()); -+ setData(source, "Type", batteryType(battery)); - } - -+ updateBatteryNames(); -+ - setData("Battery", "Has Battery", !batterySources.isEmpty()); - if (!batterySources.isEmpty()) { - setData("Battery", "Sources", batterySources); -@@ -180,14 +202,30 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name) - //kDebug() << "Sleepstate \"" << sleepstate << "\" supported."; - } - } else if (name == "PowerDevil") { -- QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -- "/org/kde/Solid/PowerManagement", -- "org.kde.Solid.PowerManagement", -- "brightness"); -- QDBusPendingReply reply = QDBusConnection::sessionBus().asyncCall(msg); -- QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); -- QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), -- this, SLOT(screenBrightnessReply(QDBusPendingCallWatcher*))); -+ QDBusMessage msg; -+ QDBusPendingReply reply; -+ -+ if (m_brightnessControlsAvailable) { -+ msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/BrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.BrightnessControl", -+ "brightness"); -+ reply = QDBusConnection::sessionBus().asyncCall(msg); -+ QDBusPendingCallWatcher *screenWatcher = new QDBusPendingCallWatcher(reply, this); -+ QObject::connect(screenWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), -+ this, SLOT(screenBrightnessReply(QDBusPendingCallWatcher*))); -+ } -+ -+ if (m_keyboardBrightnessControlsAvailable) { -+ msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/KeyboardBrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl", -+ "keyboardBrightness"); -+ reply = QDBusConnection::sessionBus().asyncCall(msg); -+ QDBusPendingCallWatcher *keyboardWatcher = new QDBusPendingCallWatcher(reply, this); -+ QObject::connect(keyboardWatcher, SIGNAL(finished(QDBusPendingCallWatcher*)), -+ this, SLOT(keyboardBrightnessReply(QDBusPendingCallWatcher*))); -+ } - //any info concerning lock screen/screensaver goes here - } else if (name == "UserActivity") { - setData("UserActivity", "IdleTime", KIdleTime::instance()->idleTime()); -@@ -198,6 +236,37 @@ bool PowermanagementEngine::sourceRequestEvent(const QString &name) - return true; - } - -+QString PowermanagementEngine::batteryType(const Solid::Battery* battery) -+{ -+ switch(battery->type()) { -+ case Solid::Battery::PrimaryBattery: -+ return QLatin1String("Battery"); -+ break; -+ case Solid::Battery::UpsBattery: -+ return QLatin1String("Ups"); -+ break; -+ case Solid::Battery::MonitorBattery: -+ return QLatin1String("Monitor"); -+ break; -+ case Solid::Battery::MouseBattery: -+ return QLatin1String("Mouse"); -+ break; -+ case Solid::Battery::KeyboardBattery: -+ return QLatin1String("Keyboad"); -+ break; -+ case Solid::Battery::PdaBattery: -+ return QLatin1String("Pda"); -+ break; -+ case Solid::Battery::PhoneBattery: -+ return QLatin1String("Phone"); -+ break; -+ default: -+ return QLatin1String("Unknown"); -+ } -+ -+ return QLatin1String("Unknown"); -+} -+ - bool PowermanagementEngine::updateSourceEvent(const QString &source) - { - if (source == "UserActivity") { -@@ -243,6 +312,45 @@ void PowermanagementEngine::updateBatteryChargePercent(int newValue, const QStri - setData(source, "Percent", newValue); - } - -+void PowermanagementEngine::updateBatteryPowerSupplyState(bool newState, const QString& udi) -+{ -+ const QString source = m_batterySources[udi]; -+ setData(source, "Is Power Supply", newState); -+} -+ -+void PowermanagementEngine::updateBatteryNames() -+{ -+ uint unnamedBatteries = 0; -+ foreach (QString source, m_batterySources) { -+ DataContainer *batteryDataContainer = containerForSource(source); -+ if (batteryDataContainer) { -+ const QString batteryVendor = batteryDataContainer->data()["Vendor"].toString(); -+ const QString batteryProduct = batteryDataContainer->data()["Product"].toString(); -+ -+ // Don't show battery name for primary power supply batteries. They usually have cryptic serial number names. -+ const QString batteryType = batteryDataContainer->data()["Type"].toString(); -+ bool batteryIsPowerSupply = batteryDataContainer->data()["Is Power Supply"].toBool(); -+ bool showBatteryName = batteryType != QLatin1String("Battery") || -+ (batteryType != QLatin1String("Battery") && !batteryIsPowerSupply); -+ -+ if (!batteryProduct.isEmpty() && batteryProduct != "Unknown Battery" && showBatteryName) { -+ if (!batteryVendor.isEmpty()) { -+ setData(source, "Pretty Name", QString(batteryVendor + ' ' + batteryProduct)); -+ } else { -+ setData(source, "Pretty Name", batteryProduct); -+ } -+ } else { -+ ++unnamedBatteries; -+ if (unnamedBatteries > 1) { -+ setData(source, "Pretty Name", i18nc("Placeholder is the battery number", "Battery %1", unnamedBatteries)); -+ } else { -+ setData(source, "Pretty Name", i18n("Battery")); -+ } -+ } -+ } -+ } -+} -+ - void PowermanagementEngine::updateAcPlugState(bool newState) - { - setData("AC Adapter", "Plugged in", newState); -@@ -273,8 +381,7 @@ void PowermanagementEngine::deviceAdded(const QString& udi) - if (device.isValid()) { - const Solid::Battery* battery = device.as(); - -- if (battery && (battery->type() == Solid::Battery::PrimaryBattery || -- battery->type() == Solid::Battery::UpsBattery)) { -+ if (battery) { - int index = 0; - QStringList sourceNames(m_batterySources.values()); - while (sourceNames.contains(QString("Battery%1").arg(index))) { -@@ -291,14 +398,24 @@ void PowermanagementEngine::deviceAdded(const QString& udi) - SLOT(updateBatteryChargePercent(int,QString))); - connect(battery, SIGNAL(plugStateChanged(bool,QString)), this, - SLOT(updateBatteryPlugState(bool,QString))); -+ connect(battery, SIGNAL(powerSupplyStateChanged(bool,QString)), this, -+ SLOT(updateBatteryPowerSupplyState(bool,QString))); - - // Set initial values - updateBatteryChargeState(battery->chargeState(), device.udi()); - updateBatteryChargePercent(battery->chargePercent(), device.udi()); - updateBatteryPlugState(battery->isPlugged(), device.udi()); -+ updateBatteryPowerSupplyState(battery->isPowerSupply(), device.udi()); -+ -+ setData(source, "Vendor", device.vendor()); -+ setData(source, "Product", device.product()); -+ setData(source, "Capacity", battery->capacity()); -+ setData(source, "Type", batteryType(battery)); - - setData("Battery", "Sources", sourceNames); - setData("Battery", "Has Battery", !sourceNames.isEmpty()); -+ -+ updateBatteryNames(); - } - } - } -@@ -309,6 +426,18 @@ void PowermanagementEngine::batteryRemainingTimeChanged(qulonglong time) - setData("Battery", "Remaining msec", time); - } - -+void PowermanagementEngine::brightnessControlsAvailableChanged(bool available) -+{ -+ setData("PowerDevil", "Screen Brightness Available", available); -+ m_brightnessControlsAvailable = available; -+} -+ -+void PowermanagementEngine::keyboardBrightnessControlsAvailableChanged(bool available) -+{ -+ setData("PowerDevil", "Keyboard Brightness Available", available); -+ m_keyboardBrightnessControlsAvailable = available; -+} -+ - void PowermanagementEngine::batteryRemainingTimeReply(QDBusPendingCallWatcher *watcher) - { - QDBusPendingReply reply = *watcher; -@@ -327,11 +456,18 @@ void PowermanagementEngine::screenBrightnessChanged(int brightness) - setData("PowerDevil", "Screen Brightness", brightness); - } - -+void PowermanagementEngine::keyboardBrightnessChanged(int brightness) -+{ -+ setData("PowerDevil", "Keyboard Brightness", brightness); -+} -+ - void PowermanagementEngine::screenBrightnessReply(QDBusPendingCallWatcher *watcher) - { - QDBusPendingReply reply = *watcher; - if (reply.isError()) { - kDebug() << "Error getting screen brightness: " << reply.error().message(); -+ // FIXME Because the above check doesn't work, we unclaim backlight support as soon as it fails -+ brightnessControlsAvailableChanged(false); - } else { - screenBrightnessChanged(reply.value()); - } -@@ -339,6 +475,20 @@ void PowermanagementEngine::screenBrightnessReply(QDBusPendingCallWatcher *watch - watcher->deleteLater(); - } - -+void PowermanagementEngine::keyboardBrightnessReply(QDBusPendingCallWatcher *watcher) -+{ -+ QDBusPendingReply reply = *watcher; -+ if (reply.isError()) { -+ kDebug() << "Error getting keyboard brightness: " << reply.error().message(); -+ // FIXME Because the above check doesn't work, we unclaim backlight support as soon as it fails -+ keyboardBrightnessControlsAvailableChanged(false); -+ } else { -+ keyboardBrightnessChanged(reply.value()); -+ } -+ -+ watcher->deleteLater(); -+} -+ - K_EXPORT_PLASMA_DATAENGINE(powermanagement, PowermanagementEngine) - - #include "powermanagementengine.moc" -diff --git a/plasma/generic/dataengines/powermanagement/powermanagementengine.h b/plasma/generic/dataengines/powermanagement/powermanagementengine.h -index 512bf6e..dafb6c2 100644 ---- a/plasma/generic/dataengines/powermanagement/powermanagementengine.h -+++ b/plasma/generic/dataengines/powermanagement/powermanagementengine.h -@@ -54,21 +54,32 @@ private slots: - void updateBatteryChargeState(int newState, const QString& udi); - void updateBatteryPlugState(bool newState, const QString& udi); - void updateBatteryChargePercent(int newValue, const QString& udi); -+ void updateBatteryPowerSupplyState(bool newState, const QString& udi); - void updateAcPlugState(bool newState); -+ void updateBatteryNames(); -+ - void deviceRemoved(const QString& udi); - void deviceAdded(const QString& udi); - void batteryRemainingTimeChanged(qulonglong time); - void batteryRemainingTimeReply(QDBusPendingCallWatcher*); - void screenBrightnessChanged(int brightness); -+ void keyboardBrightnessChanged(int brightness); - void screenBrightnessReply(QDBusPendingCallWatcher *watcher); -+ void keyboardBrightnessReply(QDBusPendingCallWatcher *watcher); -+ void brightnessControlsAvailableChanged(bool available); -+ void keyboardBrightnessControlsAvailableChanged(bool available); - - private: -+ QString batteryType(const Solid::Battery *battery); - QStringList basicSourceNames() const; - - QStringList m_sources; - - QHash m_batterySources; // - -+ bool m_brightnessControlsAvailable; -+ bool m_keyboardBrightnessControlsAvailable; -+ - }; - - -diff --git a/plasma/generic/dataengines/powermanagement/powermanagementjob.cpp b/plasma/generic/dataengines/powermanagement/powermanagementjob.cpp -index 1b0b8a0..06156d9 100644 ---- a/plasma/generic/dataengines/powermanagement/powermanagementjob.cpp -+++ b/plasma/generic/dataengines/powermanagement/powermanagementjob.cpp -@@ -94,6 +94,10 @@ void PowerManagementJob::start() - setScreenBrightness(parameters().value("brightness").toInt()); - setResult(true); - return; -+ } else if (operation == "setKeyboardBrightness") { -+ setKeyboardBrightness(parameters().value("brightness").toInt()); -+ setResult(true); -+ return; - } - - kDebug() << "don't know what to do with " << operation; -@@ -103,8 +107,8 @@ void PowerManagementJob::start() - bool PowerManagementJob::suspend(const SuspendType &type) - { - QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -- "/org/kde/Solid/PowerManagement", -- "org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/SuspendSession", -+ "org.kde.Solid.PowerManagement.Actions.SuspendSession", - callForType(type)); - QDBusConnection::sessionBus().asyncCall(msg); - return true; -@@ -130,13 +134,23 @@ QString PowerManagementJob::callForType(const SuspendType &type) - void PowerManagementJob::setScreenBrightness(int value) - { - QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -- "/org/kde/Solid/PowerManagement", -- "org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/BrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.BrightnessControl", - "setBrightness"); - msg << value; - QDBusConnection::sessionBus().asyncCall(msg); - } - -+void PowerManagementJob::setKeyboardBrightness(int value) -+{ -+ QDBusMessage msg = QDBusMessage::createMethodCall("org.kde.Solid.PowerManagement", -+ "/org/kde/Solid/PowerManagement/Actions/KeyboardBrightnessControl", -+ "org.kde.Solid.PowerManagement.Actions.KeyboardBrightnessControl", -+ "setKeyboardBrightness"); -+ msg << value; -+ QDBusConnection::sessionBus().asyncCall(msg); -+} -+ - void PowerManagementJob::requestShutDown() - { - KWorkSpace::requestShutDown(); -diff --git a/plasma/generic/dataengines/powermanagement/powermanagementjob.h b/plasma/generic/dataengines/powermanagement/powermanagementjob.h -index 3b974ab..c1c7bf4 100644 ---- a/plasma/generic/dataengines/powermanagement/powermanagementjob.h -+++ b/plasma/generic/dataengines/powermanagement/powermanagementjob.h -@@ -1,6 +1,6 @@ - /* - * Copyright 2011 Sebastian Kügler -- * -+ * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License version 2 as - * published by the Free Software Foundation -@@ -41,6 +41,7 @@ class PowerManagementJob : public Plasma::ServiceJob - void requestShutDown(); - QString callForType(const SuspendType &type); - void setScreenBrightness(int value); -+ void setKeyboardBrightness(int value); - }; - - #endif // POWERMANAGEMENTJOB_H -diff --git a/plasma/generic/dataengines/powermanagement/powermanagementservice.operations b/plasma/generic/dataengines/powermanagement/powermanagementservice.operations -index 533c00a..c9abbf9 100644 ---- a/plasma/generic/dataengines/powermanagement/powermanagementservice.operations -+++ b/plasma/generic/dataengines/powermanagement/powermanagementservice.operations -@@ -37,4 +37,9 @@ - - - -+ -+ -+ -+ -+ - -diff --git a/plasma/generic/applets/batterymonitor/contents/code/logic.js b/plasma/generic/applets/batterymonitor/contents/code/logic.js -index 974694a..d1c08c1 100644 ---- a/plasma/generic/applets/batterymonitor/contents/code/logic.js -+++ b/plasma/generic/applets/batterymonitor/contents/code/logic.js -@@ -18,74 +18,178 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - --var ram = 0 --var disk = 1 -+var powermanagementDisabled = false; - - function updateCumulative() { - var sum = 0; -+ var count = 0; - var charged = true; -+ var plugged = false; - for (var i=0; i 0) { -- batteries.cumulativePercent = Math.round(sum/batteries.count); -+ if (count > 0) { -+ batteries.cumulativePercent = Math.round(sum/count); - } else { -- batteries.cumulativePercent = 0; -+ // We don't have any power supply batteries -+ // Use the lowest value from any battery -+ if (batteries.count > 0) { -+ var b = lowestBattery(); -+ batteries.cumulativePercent = b["Percent"]; -+ } else { -+ batteries.cumulativePercent = 0; -+ } - } -+ batteries.cumulativePluggedin = plugged; - batteries.allCharged = charged; - } - --function stringForState(batteryData) { -- var pluggedIn = batteryData["Plugged in"]; -- var percent = batteryData["Percent"]; -- var state = batteryData["State"]; -- -- if (pluggedIn) { -- if (state == "NoCharge") { -- return i18n("%1% (charged)", percent); -- } else if (state == "Discharging") { -- return i18n("%1% (discharging)", percent); -- } else {//charging -- return i18n("%1% (charging)", percent); -+function plasmoidStatus() { -+ var status = "PassiveStatus"; -+ if (powermanagementDisabled) { -+ status = "ActiveStatus"; -+ } -+ -+ if (batteries.cumulativePluggedin) { -+ if (batteries.cumulativePercent <= 10) { -+ status = "NeedsAttentionStatus"; -+ } else if (!batteries.allCharged) { -+ status = "ActiveStatus"; - } -+ } else if (batteries.count > 0) { // in case your mouse gets low -+ if (batteries.cumulativePercent && batteries.cumulativePercent <= 10) { -+ status = "NeedsAttentionStatus"; -+ } -+ } -+ return status; -+} -+ -+function lowestBattery() { -+ if (batteries.count == 0) { -+ return; - } - -- return i18nc("Battery is not plugged in", "Not present"); -+ var lowestPercent = 100; -+ var lowestBattery; -+ for(var i=0; i= 90) { -+ fill = "100"; -+ } else if (p >= 70) { -+ fill = "080"; -+ } else if (p >= 50) { -+ fill = "060"; -+ } else if (p >= 30) { -+ fill = "040"; -+ } else if (p >= 10) { -+ fill = "caution"; -+ } else { -+ fill = "low"; - } - -- text += i18nc("tooltip: placeholder is the battery ID", "Battery %1:", i+1); -+ if (pluggedIn && batteryData["Is Power Supply"]) { -+ return "battery-charging-" + fill; -+ } else { -+ if (p < 5) { -+ return "dialog-warning" -+ } -+ return "battery-" + fill; -+ } -+ } -+} -+ -+function updateTooltip() { -+ var image = ""; -+ var text = ""; -+ if (batteries.count == 0) { -+ image = "battery-missing"; -+ if (!powermanagementDisabled) { -+ text = i18n("No batteries available"); - } -+ } else { -+ var hasPowerSupply = false; - -- text += " "; -- text += stringForState(pmSource.data["Battery"+i]); -- } -+ text = ""; -+ for(var i=0; i"; -+ text += ""; -+ text += ""; -+ -+ if (b["Is Power Supply"]) { hasPowerSupply = true; } -+ } -+ text += "
"; -+ if (b["Plugged in"]) { -+ text += i18nc("Placeholder is battery percentage", "%1%", b["Percent"]); -+ } else { -+ text += i18n("N/A") -+ } -+ text += "
"; - -- if (text != "") { -- text += "
"; -+ if (hasPowerSupply) { -+ var b = []; -+ b["Type"] = "Battery"; -+ b["Percent"] = batteries.cumulativePercent; -+ image = iconForBattery(b, pmSource.data["AC Adapter"]["Plugged in"] ? true : false); -+ } else { -+ var b = lowestBattery(); -+ image = iconForBattery(b, false); -+ } - } - -- if (pmSource.data["AC Adapter"]) { -- text += i18nc("tooltip", "AC Adapter:") + " "; -- text += pmSource.data["AC Adapter"]["Plugged in"] ? i18nc("tooltip", "Plugged in") : i18nc("tooltip", "Not plugged in"); -+ if (powermanagementDisabled) { -+ text += i18n("Power management is disabled"); - } - batteries.tooltipText = text; -+ batteries.tooltipImage = image; - } - - function updateBrightness() { -@@ -94,16 +198,26 @@ function updateBrightness() { - return; - } - dialogItem.disableBrightnessUpdate = true; -- dialogItem.screenBrightness = pmSource.data["PowerDevil"]["Screen Brightness"]; -+ if (pmSource.data["PowerDevil"]["Screen Brightness"]) { -+ dialogItem.screenBrightness = pmSource.data["PowerDevil"]["Screen Brightness"]; -+ } -+ if (pmSource.data["PowerDevil"]["Keyboard Brightness"]) { -+ dialogItem.keyboardBrightness = pmSource.data["PowerDevil"]["Keyboard Brightness"]; -+ } - dialogItem.disableBrightnessUpdate = false; - } - --function callForType(type) { -- if (type == ram) { -- return "suspendToRam"; -- } else if (type == disk) { -- return "suspendToDisk"; -- } -+// TODO: give translated and formatted string with KGlobal::locale()->prettyFormatDuration(msec); -+function formatDuration(msec) { -+ if (msec == 0 || msec === undefined) -+ return ""; -+ -+ var time = new Date(msec); -+ var hours = time.getUTCHours(); -+ var minutes = time.getUTCMinutes(); - -- return "suspendHybrid"; -+ var str = ""; -+ if (hours > 0) str += i18np("1 hour ", "%1 hours ", hours); -+ if (minutes > 0) str += i18np("1 minute", "%1 minutes", minutes); -+ return str; - } -diff --git a/plasma/generic/applets/batterymonitor/contents/code/platform.js b/plasma/generic/applets/batterymonitor/contents/code/platform.js -deleted file mode 100644 -index 59af3af..0000000 ---- a/plasma/generic/applets/batterymonitor/contents/code/platform.js -+++ /dev/null -@@ -1,9 +0,0 @@ -- --function shouldOfferSuspend(pmSource) { -- return pmSource.data["Sleep States"]["Suspend"]; --} -- --function shouldOfferHibernate(pmSource) { -- return pmSource.data["Sleep States"]["Hibernate"]; --} -- -diff --git a/plasma/generic/applets/batterymonitor/contents/config/main.xml b/plasma/generic/applets/batterymonitor/contents/config/main.xml -index fc31b3e..5e9e31d 100644 ---- a/plasma/generic/applets/batterymonitor/contents/config/main.xml -+++ b/plasma/generic/applets/batterymonitor/contents/config/main.xml -@@ -6,12 +6,6 @@ - - - -- -- false -- -- -- false -- - - false - -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml b/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml -new file mode 100644 -index 0000000..c2216f8 ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml -@@ -0,0 +1,87 @@ -+/* -+ * Copyright 2012-2013 Daniel Nicoletti -+ * Copyright 2013 Kai Uwe Broulik -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Library General Public License as -+ * published by the Free Software Foundation; either version 2 or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the -+ * Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 -+ -+Item { -+ id: brightnessItem -+ clip: true -+ width: parent.width -+ height: acIcon.height + padding.margins.top + padding.margins.bottom -+ -+ property bool pluggedIn -+ property bool showTime -+ property string remainingString -+ -+ QIconItem { -+ id: acIcon -+ width: theme.iconSizes.dialog -+ height: width -+ anchors { -+ top: parent.top -+ topMargin: padding.margins.top -+ left: parent.left -+ leftMargin: padding.margins.left -+ } -+ -+ icon: pluggedIn ? QIcon("battery-charging-low") : QIcon("battery-low") -+ } -+ -+ Components.Label { -+ id: acLabel -+ anchors { -+ top: acIcon.top -+ left: acIcon.right -+ leftMargin: 6 -+ } -+ height: paintedHeight -+ text: i18n("AC Adapter") -+ } -+ -+ Components.Label { -+ id: acStatus -+ anchors { -+ top: showTime ? acLabel.top : undefined -+ bottom: showTime ? undefined : acIcon.bottom -+ left: showTime ? acLabel.right : acIcon.right -+ leftMargin: showTime ? 3 : 6 -+ } -+ height: paintedHeight -+ text: pluggedIn ? i18n("Plugged In") : i18n("Not Plugged In") -+ color: "#77"+(theme.textColor.toString().substr(1)) -+ } -+ -+ Components.Label { -+ id: acTime -+ anchors { -+ bottom: acIcon.bottom -+ left: acIcon.right -+ leftMargin: 6 -+ } -+ height: paintedHeight -+ visible: showTime -+ text: pluggedIn ? i18n("Time remaining until full: %1", remainingString) : i18n("Time remaining until empty: %1", remainingString) -+ color: "#77"+(theme.textColor.toString().substr(1)) -+ } -+} -+ -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml b/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -index 080ab51..6a49d34 100644 ---- a/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -+++ b/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -@@ -21,15 +21,13 @@ import QtQuick 1.1 - import org.kde.plasma.core 0.1 as PlasmaCore - - Item { -- -- property bool monochrome - property bool hasBattery - property int percent - property bool pluggedIn -- -+ - PlasmaCore.Svg { - id: svg -- imagePath: monochrome ? "icons/battery" : "widgets/battery-oxygen" -+ imagePath: "icons/battery" - } - - PlasmaCore.SvgItem { -@@ -39,25 +37,55 @@ Item { - } - - PlasmaCore.SvgItem { -+ id: fillSvg - anchors.fill: parent - svg: svg - elementId: hasBattery ? fillElement(percent) : "Unavailable" -- visible: percent>10 || !hasBattery -+ visible: elementId != "" - } - - function fillElement(p) { -- if (p >= 90) { -- return "Fill100"; -- } else if (p >= 70) { -- return "Fill80"; -- } else if (p >= 50) { -- return "Fill60"; -- } else if (p > 20) { -- return "Fill40"; -- } else if (p >= 10) { -- return "Fill20"; -+ // We switched from having steps of 20 for the battery percentage to a more accurate -+ // step of 10. This means we break other and older themes. -+ // If the Fill10 element is not found, it is likely that the theme doesn't support -+ // that and we use the older method of obtaining the fill element. -+ if (!svg.hasElement("Fill10")) { -+ if (p >= 90) { -+ return "Fill100"; -+ } else if (p >= 70) { -+ return "Fill80"; -+ } else if (p >= 50) { -+ return "Fill60"; -+ } else if (p > 20) { -+ return "Fill40"; -+ } else if (p >= 10) { -+ return "Fill20"; -+ } -+ return ""; -+ } else { -+ if (p >= 95) { -+ return "Fill100"; -+ } else if (p >= 85) { -+ return "Fill90"; -+ } else if (p >= 75) { -+ return "Fill90"; -+ } else if (p >= 65) { -+ return "Fill80"; -+ } else if (p >= 55) { -+ return "Fill60"; -+ } else if (p >= 45) { -+ return "Fill50"; -+ } else if (p >= 35) { -+ return "Fill40"; -+ } else if (p >= 25) { -+ return "Fill30"; -+ } else if (p >= 15) { -+ return "Fill20"; -+ } else if (p >= 5) { -+ return "Fill10"; -+ } -+ return ""; - } -- return ""; - } - - PlasmaCore.SvgItem { -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/BatteryItem.qml b/plasma/generic/applets/batterymonitor/contents/ui/BatteryItem.qml -new file mode 100644 -index 0000000..3317aea ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/BatteryItem.qml -@@ -0,0 +1,312 @@ -+/* -+ * Copyright 2012-2013 Daniel Nicoletti -+ * Copyright 2013 Kai Uwe Broulik -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Library General Public License as -+ * published by the Free Software Foundation; either version 2 or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the -+ * Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 -+import "plasmapackage:/code/logic.js" as Logic -+ -+Item { -+ id: batteryItem -+ clip: true -+ width: batteryColumn.width -+ height: expanded ? batteryInfos.height + padding.margins.top + padding.margins.bottom * 2 + actionRow.height -+ : batteryInfos.height + padding.margins.top + padding.margins.bottom -+ -+ Behavior on height { PropertyAnimation {} } -+ -+ property bool highlight -+ property bool expanded -+ property bool showChargeAnimation -+ -+ // NOTE: According to the UPower spec this property is only valid for primary batteries, however -+ // UPower seems to set the Present property false when a device is added but not probed yet -+ property bool isPresent: model["Plugged in"] -+ -+ function updateSelection() { -+ var containsMouse = mouseArea.containsMouse; -+ -+ if (highlight || expanded && containsMouse) { -+ padding.opacity = 1; -+ } else if (expanded) { -+ padding.opacity = 0.8; -+ } else if (containsMouse) { -+ padding.opacity = 0.65; -+ } else { -+ padding.opacity = 0; -+ } -+ } -+ -+ PlasmaCore.FrameSvgItem { -+ id: padding -+ imagePath: "widgets/viewitem" -+ prefix: "hover" -+ opacity: 0 -+ Behavior on opacity { PropertyAnimation {} } -+ anchors.fill: parent -+ } -+ -+ MouseArea { -+ id: mouseArea -+ anchors.fill: parent -+ hoverEnabled: true -+ onEntered: updateSelection() -+ onExited: updateSelection() -+ onClicked: { -+ if (expanded) { -+ expanded = false; -+ } else { -+ expanded = true; -+ batteryItem.forceActiveFocus(); -+ } -+ updateSelection(); -+ } -+ } -+ -+ Item { -+ id: batteryInfos -+ height: Math.max(batteryIcon.height, batteryNameLabel.height + batteryPercentBar.height) -+ -+ anchors { -+ top: parent.top -+ topMargin: padding.margins.top -+ left: parent.left -+ leftMargin: padding.margins.left -+ right: parent.right -+ rightMargin: padding.margins.right -+ } -+ -+ QIconItem { -+ id: batteryIcon -+ width: theme.iconSizes.dialog -+ height: width -+ anchors { -+ verticalCenter: parent.verticalCenter -+ left: parent.left -+ } -+ icon: QIcon(Logic.iconForBattery(model,pluggedIn)) -+ } -+ -+ SequentialAnimation { -+ id: chargeAnimation -+ running: showChargeAnimation && model["State"] == "Charging" -+ alwaysRunToEnd: true -+ loops: Animation.Infinite -+ -+ NumberAnimation { -+ target: batteryIcon -+ properties: "opacity" -+ from: 1.0 -+ to: 0.5 -+ duration: 750 -+ easing.type: Easing.InCubic -+ } -+ NumberAnimation { -+ target: batteryIcon -+ properties: "opacity" -+ from: 0.5 -+ to: 1.0 -+ duration: 750 -+ easing.type: Easing.OutCubic -+ } -+ } -+ -+ Components.Label { -+ id: batteryNameLabel -+ anchors { -+ verticalCenter: isPresent ? undefined : batteryIcon.verticalCenter -+ top: isPresent ? parent.top : undefined -+ left: batteryIcon.right -+ leftMargin: 6 -+ } -+ height: paintedHeight -+ elide: Text.ElideRight -+ text: model["Pretty Name"] -+ } -+ -+ Components.Label { -+ id: batteryStatusLabel -+ anchors { -+ top: batteryNameLabel.top -+ left: batteryNameLabel.right -+ leftMargin: 3 -+ } -+ text: Logic.stringForBatteryState(model) -+ height: paintedHeight -+ visible: model["Is Power Supply"] -+ color: "#77"+(theme.textColor.toString().substr(1)) -+ } -+ -+ Components.ProgressBar { -+ id: batteryPercentBar -+ anchors { -+ bottom: parent.bottom -+ left: batteryIcon.right -+ leftMargin: 6 -+ right: batteryPercent.left -+ rightMargin: 6 -+ } -+ minimumValue: 0 -+ maximumValue: 100 -+ visible: isPresent -+ value: parseInt(model["Percent"]) -+ } -+ -+ Components.Label { -+ id: batteryPercent -+ anchors { -+ verticalCenter: batteryPercentBar.verticalCenter -+ right: parent.right -+ } -+ visible: isPresent -+ text: i18nc("Placeholder is battery percentage", "%1%", model["Percent"]) -+ } -+ } -+ -+ Column { -+ id: actionRow -+ opacity: expanded ? 1 : 0 -+ width: parent.width -+ anchors { -+ top: batteryInfos.bottom -+ topMargin: padding.margins.bottom -+ left: parent.left -+ leftMargin: padding.margins.left -+ right: parent.right -+ rightMargin: padding.margins.right -+ bottomMargin: padding.margins.bottom -+ } -+ spacing: 4 -+ Behavior on opacity { PropertyAnimation {} } -+ -+ PlasmaCore.SvgItem { -+ svg: PlasmaCore.Svg { -+ id: lineSvg -+ imagePath: "widgets/line" -+ } -+ elementId: "horizontal-line" -+ height: lineSvg.elementSize("horizontal-line").height -+ width: parent.width -+ } -+ -+ Row { -+ id: detailsRow -+ width: parent.width -+ spacing: 4 -+ -+ Column { -+ id: labelsColumn -+ Components.Label { -+ height: paintedHeight -+ width: parent.width -+ horizontalAlignment: Text.AlignRight -+ onPaintedWidthChanged: { -+ if (paintedWidth > parent.width) { parent.width = paintedWidth; } -+ } -+ text: model["State"] == "Charging" ? i18n("Time To Full:") : i18n("Time To Empty:") -+ visible: remainingTimeLabel.visible -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { -+ height: paintedHeight -+ width: parent.width -+ horizontalAlignment: Text.AlignRight -+ onPaintedWidthChanged: { -+ if (paintedWidth > parent.width) { parent.width = paintedWidth; } -+ } -+ text: i18n("Capacity:") -+ visible: capacityLabel.visible -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { -+ height: paintedHeight -+ width: parent.width -+ horizontalAlignment: Text.AlignRight -+ onPaintedWidthChanged: { -+ if (paintedWidth > parent.width) { parent.width = paintedWidth; } -+ } -+ text: i18n("Vendor:") -+ visible: vendorLabel.visible -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { -+ height: paintedHeight -+ width: parent.width -+ horizontalAlignment: Text.AlignRight -+ onPaintedWidthChanged: { -+ if (paintedWidth > parent.width) { parent.width = paintedWidth; } -+ } -+ text: i18n("Model:") -+ visible: modelLabel.visible -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ } -+ Column { -+ width: parent.width - labelsColumn.width - parent.spacing * 2 -+ Components.Label { // Remaining Time -+ id: remainingTimeLabel -+ height: paintedHeight -+ width: parent.width -+ elide: Text.ElideRight -+ text: Logic.formatDuration(model["Remaining Time"]) -+ visible: showRemainingTime && model["Is Power Supply"] && model["State"] != "NoCharge" && text -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { // Capacity -+ id: capacityLabel -+ height: paintedHeight -+ width: parent.width -+ elide: Text.ElideRight -+ text: i18nc("Placeholder is battery capacity", "%1%", model["Capacity"]) -+ visible: model["Is Power Supply"] && model["Capacity"] != "" && model["Capacity"] !== undefined -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { // Vendor -+ id: vendorLabel -+ height: paintedHeight -+ width: parent.width -+ elide: Text.ElideRight -+ text: model["Vendor"] -+ visible: model["Vendor"] != "" && model["Vendor"] !== undefined -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ Components.Label { // Model -+ id: modelLabel -+ height: paintedHeight -+ width: parent.width -+ elide: Text.ElideRight -+ text: model["Product"] -+ visible: model["Product"] != "" && model["Product"] !== undefined -+ font.pointSize: theme.smallestFont.pointSize -+ color: "#99"+(theme.textColor.toString().substr(1)) -+ } -+ } -+ } -+ } -+} -+ -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/BrightnessItem.qml b/plasma/generic/applets/batterymonitor/contents/ui/BrightnessItem.qml -new file mode 100644 -index 0000000..34c596c ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/BrightnessItem.qml -@@ -0,0 +1,89 @@ -+/* -+ * Copyright 2012-2013 Daniel Nicoletti -+ * Copyright 2013 Kai Uwe Broulik -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Library General Public License as -+ * published by the Free Software Foundation; either version 2 or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the -+ * Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 -+ -+Item { -+ id: brightnessItem -+ clip: true -+ width: parent.width -+ height: Math.max(brightnessIcon.height, brightnessLabel.height + brightnessSlider.height) + padding.margins.top + padding.margins.bottom -+ -+ property alias icon: brightnessIcon.icon -+ property alias label: brightnessLabel.text -+ property alias value: brightnessSlider.value -+ -+ signal changed(int screenBrightness) -+ -+ QIconItem { -+ id: brightnessIcon -+ width: theme.iconSizes.dialog -+ height: width -+ anchors { -+ verticalCenter: parent.verticalCenter -+ topMargin: padding.margins.top -+ bottomMargin: padding.margins.bottom -+ left: parent.left -+ leftMargin: padding.margins.left -+ } -+ } -+ -+ Components.Label { -+ id: brightnessLabel -+ anchors { -+ top: parent.top -+ topMargin: padding.margins.top -+ left: brightnessIcon.right -+ leftMargin: 6 -+ } -+ height: paintedHeight -+ } -+ -+ Components.Slider { -+ id: brightnessSlider -+ anchors { -+ bottom: parent.bottom -+ bottomMargin: padding.margins.bottom -+ left: brightnessIcon.right -+ right: brightnessPercent.left -+ leftMargin: 6 -+ rightMargin: 6 -+ } -+ minimumValue: 0 -+ maximumValue: 100 -+ stepSize: 10 -+ onValueChanged: changed(value) -+ } -+ -+ Components.Label { -+ id: brightnessPercent -+ anchors { -+ right: parent.right -+ rightMargin: padding.margins.right -+ verticalCenter: brightnessSlider.verticalCenter -+ } -+ height: paintedHeight -+ text: i18nc("Placeholder is brightness percentage", "%1%", brightnessSlider.value) -+ } -+} -+ -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/CompactRepresentation.qml b/plasma/generic/applets/batterymonitor/contents/ui/CompactRepresentation.qml -new file mode 100644 -index 0000000..ebab135 ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/CompactRepresentation.qml -@@ -0,0 +1,112 @@ -+/* -+* Copyright 2011 Sebastian Kügler -+* Copyright 2011 Viranch Mehta -+* Copyright 2013 Kai Uwe Broulik -+* -+* This program is free software; you can redistribute it and/or modify -+* it under the terms of the GNU Library General Public License as -+* published by the Free Software Foundation; either version 2 or -+* (at your option) any later version. -+* -+* This program is distributed in the hope that it will be useful, -+* but WITHOUT ANY WARRANTY; without even the implied warranty of -+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+* GNU General Public License for more details -+* -+* You should have received a copy of the GNU Library General Public -+* License along with this program; if not, write to the -+* Free Software Foundation, Inc., -+* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+*/ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import "plasmapackage:/code/logic.js" as Logic -+ -+ListView { -+ id: view -+ -+ property int minimumWidth -+ property int minimumHeight -+ -+ property bool hasBattery -+ -+ property QtObject pmSource -+ property QtObject batteries -+ -+ property bool singleBattery -+ -+ model: singleBattery ? 1 : batteries -+ -+ anchors.fill: parent -+ orientation: ListView.Horizontal -+ interactive: false -+ -+ function isConstrained() { -+ return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal); -+ } -+ -+ Component.onCompleted: { -+ if (!isConstrained()) { -+ minimumHeight = theme.iconSizes.dialog; -+ minimumWidth = minimumHeight * view.count; -+ } else { -+ // NOTE: Keep in sync with systray -+ minimumHeight = 24; -+ minimumWidth = 24; -+ } -+ } -+ -+ delegate: Item { -+ id: batteryContainer -+ -+ property bool hasBattery: view.singleBattery ? batteries.count : model["Plugged in"] -+ property int percent: view.singleBattery ? batteries.cumulativePercent : model["Percent"] -+ property bool pluggedIn: view.singleBattery ? pmSource.data["AC Adapter"]["Plugged in"] : pmSource.data["AC Adapter"]["Plugged in"] && model["Is Power Supply"] -+ -+ width: view.width/view.count -+ height: view.height -+ -+ property real iconSize: Math.min(width, height) -+ -+ Column { -+ anchors.fill: parent -+ -+ BatteryIcon { -+ id: batteryIcon -+ anchors.centerIn: isConstrained() ? parent : undefined -+ anchors.horizontalCenter: isConstrained() ? undefined : parent.horizontalCenter -+ hasBattery: batteryContainer.hasBattery -+ percent: batteryContainer.percent -+ pluggedIn: batteryContainer.pluggedIn -+ height: isConstrained() ? batteryContainer.iconSize : batteryContainer.iconSize - batteryLabel.height -+ width: height -+ } -+ -+ Components.Label { -+ id: batteryLabel -+ width: parent.width -+ height: paintedHeight -+ horizontalAlignment: Text.AlignHCenter -+ text: i18nc("battery percentage below battery icon", "%1%", percent) -+ font.pixelSize: Math.max(batteryContainer.iconSize/8, 10) -+ visible: !isConstrained() -+ } -+ } -+ } -+ -+ MouseArea { -+ id: mouseArea -+ anchors.fill: parent -+ hoverEnabled: true -+ onClicked: plasmoid.togglePopup() -+ -+ PlasmaCore.ToolTip { -+ id: tooltip -+ target: mouseArea -+ image: batteries.tooltipImage -+ subText: batteries.tooltipText -+ } -+ } -+} -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml b/plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml -index 76fb1ce..4f46834 100644 ---- a/plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml -+++ b/plasma/generic/applets/batterymonitor/contents/ui/PopupDialog.qml -@@ -1,5 +1,6 @@ - /* - * Copyright 2011 Viranch Mehta -+ * Copyright 2013 Kai Uwe Broulik - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as -@@ -18,176 +19,106 @@ - */ - - import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore - import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 - import "plasmapackage:/code/logic.js" as Logic - - Item { - id: dialog -- width: childrenRect.width+24 -- height: childrenRect.height+24 -+ property int actualHeight: batteryColumn.implicitHeight + settingsColumn.height + separator.height + 10 // 10 = separator margins - -- property alias model: batteryLabels.model -- property alias hasBattery: batteryIcon.hasBattery -- property alias percent: batteryIcon.percent -+ property alias model: batteryList.model - property bool pluggedIn -+ property bool showRemainingTime -+ -+ property bool popupShown // somehow plasmoid.popupShowing isn't working -+ -+ property bool isBrightnessAvailable - property alias screenBrightness: brightnessSlider.value -- property int remainingMsec -- property alias showSuspendButton: suspendButton.visible -- property alias showHibernateButton: hibernateButton.visible - -+ property bool isKeyboardBrightnessAvailable -+ property alias keyboardBrightness: keyboardBrightnessSlider.value - -- signal suspendClicked(int type) - signal brightnessChanged(int screenBrightness) -+ signal keyboardBrightnessChanged(int keyboardBrightness) - signal powermanagementChanged(bool checked) - -+ PlasmaCore.FrameSvgItem { -+ id: padding -+ imagePath: "widgets/viewitem" -+ prefix: "hover" -+ opacity: 0 -+ } -+ - Column { -- id: labels -- spacing: 6 -+ id: batteryColumn -+ spacing: 4 -+ width: parent.width - anchors { -- top: parent.top - left: parent.left -- margins: 12 -- } -- Repeater { -- model: dialog.model -- Components.Label { -- text: model.count>1 ? i18nc("Placeholder is the battery ID", "Battery %1:", index+1) : i18n("Battery:") -- width: labels.width -- horizontalAlignment: Text.AlignRight -- } -- } -- -- Components.Label { -- text: i18n("AC Adapter:") -- anchors.right: parent.right -- anchors.bottomMargin: 12 -- } -- -- Components.Label { -- text: i18nc("Label for remaining time", "Time Remaining:") -- visible: remainingTime.visible -- anchors.right: parent.right -- } -- -- Components.Label { -- text: i18nc("Label for power management inhibition", "Power management enabled:") -- anchors.right: parent.right -+ right: parent.right -+ top: plasmoid.location == BottomEdge ? parent.top : undefined -+ bottom: plasmoid.location == BottomEdge ? undefined : parent.bottom - } - -- Components.Label { -- text: i18n("Screen Brightness:") -- anchors.right: parent.right -+ Repeater { -+ id: batteryList -+ delegate: BatteryItem { showChargeAnimation: popupShown } - } - } - - Column { -- id: values -- spacing: 6 -- anchors { -- top: parent.top -- left: labels.right -- margins: 12 -- } -+ id: settingsColumn -+ spacing: 0 -+ width: parent.width - -- Column { -- id: upperValues -- spacing: 6 -- anchors { -- left: values.left -- } -- -- Repeater { -- id: batteryLabels -- Components.Label { -- text: Logic.stringForState(model) -- font.weight: Font.Bold -- } -- } -- -- Components.Label { -- text: dialog.pluggedIn ? i18n("Plugged in") : i18n("Not plugged in") -- font.weight: Font.Bold -- anchors.bottomMargin: 12 -- } -- -- Components.Label { -- id: remainingTime -- text: formatDuration(remainingMsec); -- font.weight: Font.Bold -- visible: text!="" -- } -- } -- -- Column { -- id: lowerValues -- spacing: 6 -- width: upperValues.width + batteryIcon.width * 2 -- anchors { -- left: values.left -- } -- Components.CheckBox { -- checked: true -- onClicked: powermanagementChanged(checked) -- x: 1 -- } -- -- Components.Slider { -- id: brightnessSlider -- width: lowerValues.width -- minimumValue: 0 -- maximumValue: 100 -- stepSize: 10 -- onValueChanged: brightnessChanged(value) -- } -+ anchors { -+ left: parent.left -+ right: parent.right -+ top: plasmoid.location == BottomEdge ? undefined : parent.top -+ bottom: plasmoid.location == BottomEdge ? parent.bottom : undefined - } -- } - -- // TODO: give translated and formatted string with KGlobal::locale()->prettyFormatDuration(msec); -- function formatDuration(msec) { -- if (msec==0) -- return ""; -- -- var time = new Date(msec); -- var hours = time.getUTCHours(); -- var minutes = time.getUTCMinutes(); -- var str = ""; -- if (hours > 0) str += i18np("1 hour ", "%1 hours ", hours); -- if (minutes > 0) str += i18np("1 minute", "%1 minutes", minutes); -- return str; -- } -+ BrightnessItem { -+ id: brightnessSlider -+ icon: QIcon("video-display") -+ label: i18n("Display Brightness") -+ visible: isBrightnessAvailable -+ onChanged: brightnessChanged(value) - -- Row { -- anchors { -- top: values.bottom -- margins: 12 -- right: values.right - } - -- Components.ToolButton { -- id: suspendButton -- iconSource: "system-suspend" -- text: i18nc("Suspend the computer to RAM; translation should be short", "Sleep") -- onClicked: suspendClicked(Logic.ram) -+ BrightnessItem { -+ id: keyboardBrightnessSlider -+ icon: QIcon("input-keyboard") -+ label: i18n("Keyboard Brightness") -+ visible: isKeyboardBrightnessAvailable -+ onChanged: keyboardBrightnessChanged(value) - } - -- Components.ToolButton { -- id: hibernateButton -- iconSource: "system-suspend-hibernate" -- text: i18nc("Suspend the computer to disk; translation should be short", "Hibernate") -- onClicked: suspendClicked(Logic.disk) -+ PowerManagementItem { -+ id: pmSwitch -+ onEnabledChanged: powermanagementChanged(enabled) - } - } - -- BatteryIcon { -- id: batteryIcon -- monochrome: false -- pluggedIn: dialog.pluggedIn -+ PlasmaCore.SvgItem { -+ id: separator -+ svg: PlasmaCore.Svg { -+ id: lineSvg -+ imagePath: "widgets/line" -+ } -+ elementId: "horizontal-line" -+ height: lineSvg.elementSize("horizontal-line").height -+ width: parent.width - anchors { -- top: parent.top -- right: values.right -- topMargin: 12 -+ top: plasmoid.location == BottomEdge ? undefined : settingsColumn.bottom -+ bottom: plasmoid.location == BottomEdge ? settingsColumn.top : undefined -+ leftMargin: padding.margins.left -+ rightMargin: padding.margins.right -+ topMargin: 5 -+ bottomMargin: 5 - } -- width: height -- height: hibernateButton.height * 2 - } - } -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/PowerManagementItem.qml b/plasma/generic/applets/batterymonitor/contents/ui/PowerManagementItem.qml -new file mode 100644 -index 0000000..85555ac ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/PowerManagementItem.qml -@@ -0,0 +1,64 @@ -+/* -+ * Copyright 2012-2013 Daniel Nicoletti -+ * Copyright 2013 Kai Uwe Broulik -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Library General Public License as -+ * published by the Free Software Foundation; either version 2 or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the -+ * Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 -+ -+Item { -+ id: brightnessItem -+ clip: true -+ width: parent.width -+ height: Math.max(pmCheckBox.height, pmLabel.height) + padding.margins.top + padding.margins.bottom -+ -+ property bool enabled: pmCheckBox.checked -+ -+ Components.CheckBox { -+ id: pmCheckBox -+ anchors { -+ verticalCenter: parent.verticalCenter -+ left: parent.left -+ leftMargin: padding.margins.left + (theme.iconSizes.dialog - width) -+ topMargin: padding.margins.top -+ bottomMargin: padding.margins.bottom -+ } -+ checked: true -+ } -+ -+ Components.Label { -+ id: pmLabel -+ anchors { -+ verticalCenter: pmCheckBox.verticalCenter -+ left: pmCheckBox.right -+ leftMargin: 6 -+ } -+ height: paintedHeight -+ text: i18n("Enable Power Management") -+ } -+ -+ MouseArea { -+ anchors.fill: parent -+ -+ onReleased: pmCheckBox.released(); -+ onPressed: pmCheckBox.forceActiveFocus(); -+ } -+} -+ -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/ScrollableListView.qml b/plasma/generic/applets/batterymonitor/contents/ui/ScrollableListView.qml -new file mode 100644 -index 0000000..c3cb818 ---- /dev/null -+++ b/plasma/generic/applets/batterymonitor/contents/ui/ScrollableListView.qml -@@ -0,0 +1,58 @@ -+/* -+ * Copyright 2012 Daniel Nicoletti -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU Library General Public License as -+ * published by the Free Software Foundation; either version 2 or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this program; if not, write to the -+ * Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -+ */ -+ -+import QtQuick 1.1 -+import org.kde.plasma.core 0.1 as PlasmaCore -+import org.kde.plasma.components 0.1 as Components -+import org.kde.qtextracomponents 0.1 -+ -+FocusScope { -+ property alias delegate: list.delegate -+ property alias model: list.model -+ property alias view: list -+ property alias interactive: list.interactive -+ property alias currentIndex: list.currentIndex -+ signal countChanged() -+ -+ Component.onCompleted: { -+ list.countChanged.connect(countChanged) -+ } -+ -+ ListView { -+ id: list -+ clip: true -+ focus: true -+ anchors { -+ left: parent.left -+ right: scrollBar.visible ? scrollBar.left : parent.right -+ top : parent.top -+ bottom: parent.bottom -+ } -+ boundsBehavior: Flickable.StopAtBounds -+ } -+ Components.ScrollBar { -+ id: scrollBar -+ flickableItem: list -+ anchors { -+ right: parent.right -+ top: list.top -+ bottom: list.bottom -+ } -+ } -+} -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -index a5e1c13..357c2dc 100644 ---- a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -+++ b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -@@ -1,6 +1,7 @@ - /* - * Copyright 2011 Sebastian Kügler - * Copyright 2011 Viranch Mehta -+ * Copyright 2013 Kai Uwe Broulik - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as -@@ -21,128 +22,46 @@ - import QtQuick 1.1 - import org.kde.plasma.core 0.1 as PlasmaCore - import "plasmapackage:/code/logic.js" as Logic --import "plasmapackage:/code/platform.js" as Platform - - Item { - id: batterymonitor -- property int minimumWidth: dialogItem.width -- property int minimumHeight: dialogItem.height -+ property int minimumWidth: theme.iconSizes.dialog * 9 -+ property int minimumHeight: dialogItem.actualHeight -+ property int maximumHeight: dialogItem.actualHeight - - property bool show_remaining_time: false - -+ PlasmaCore.Theme { id: theme } -+ - Component.onCompleted: { -- Logic.updateCumulative(); -- Logic.updateTooltip(); -- Logic.updateBrightness(); -+ plasmoid.aspectRatioMode = IgnoreAspectRatio -+ updateLogic(true); - plasmoid.addEventListener('ConfigChanged', configChanged); -+ plasmoid.popupEvent.connect(popupEventSlot); - } - - function configChanged() { - show_remaining_time = plasmoid.readConfig("showRemainingTime"); - } - -- property Component compactRepresentation: Component { -- ListView { -- id: view -- -- property int minimumWidth -- property int minimumHeight -- -- property bool showOverlay: false -- property bool showMultipleBatteries: false -- property bool hasBattery: pmSource.data["Battery"]["Has Battery"] -- -- property QtObject pmSource: plasmoid.rootItem.pmSource -- property QtObject batteries: plasmoid.rootItem.batteries -- -- property bool singleBattery: isConstrained() || !showMultipleBatteries || !hasBattery -- -- model: singleBattery ? 1 : batteries -- -- PlasmaCore.Theme { id: theme } -- -- anchors.fill: parent -- orientation: ListView.Horizontal -- -- function isConstrained() { -- return (plasmoid.formFactor == Vertical || plasmoid.formFactor == Horizontal); -- } -- -- Component.onCompleted: { -- if (!isConstrained()) { -- minimumWidth = 32; -- minimumHeight = 32; -- } -- plasmoid.addEventListener('ConfigChanged', configChanged); -- } -- -- function configChanged() { -- showOverlay = plasmoid.readConfig("showBatteryString"); -- showMultipleBatteries = plasmoid.readConfig("showMultipleBatteries"); -- } -- -- delegate: Item { -- id: batteryContainer -- -- property bool hasBattery: view.singleBattery ? batteries.cumulativePluggedin : model["Plugged in"] -- property int percent: view.singleBattery ? batteries.cumulativePercent : model["Percent"] -- property bool pluggedIn: pmSource.data["AC Adapter"]["Plugged in"] -- -- width: view.width/view.count -- height: view.height -- -- property real size: Math.min(width, height) -- -- BatteryIcon { -- id: batteryIcon -- monochrome: true -- hasBattery: parent.hasBattery -- percent: parent.percent -- pluggedIn: parent.pluggedIn -- width: size; height: size -- anchors.centerIn: parent -- } -- -- Rectangle { -- id: labelRect -- // should be 40 when size is 90 -- width: Math.max(parent.size*4/9, 35) -- height: width/2 -- anchors.centerIn: parent -- color: theme.backgroundColor -- border.color: "grey" -- border.width: 2 -- radius: 4 -- opacity: hasBattery ? (showOverlay ? 0.7 : (isConstrained() ? 0 : mouseArea.containsMouse*0.7)) : 0 -- -- Behavior on opacity { NumberAnimation { duration: 100 } } -- } -- -- Text { -- id: overlayText -- text: i18nc("overlay on the battery, needs to be really tiny", "%1%", percent); -- color: theme.textColor -- font.pixelSize: Math.max(parent.size/8, 11) -- anchors.centerIn: labelRect -- // keep the opacity 1 when labelRect.opacity=0.7 -- opacity: labelRect.opacity/0.7 -- } -- } -+ function updateLogic(updateBrightness) { -+ Logic.updateCumulative(); -+ plasmoid.status = Logic.plasmoidStatus(); -+ Logic.updateTooltip(); -+ if (updateBrightness) { -+ Logic.updateBrightness(); -+ } -+ } - -- MouseArea { -- id: mouseArea -- anchors.fill: parent -- hoverEnabled: true -- onClicked: plasmoid.togglePopup() -+ function popupEventSlot(popped) { -+ dialogItem.popupShown = popped; -+ } - -- PlasmaCore.ToolTip { -- id: tooltip -- target: mouseArea -- image: "battery" -- subText: batteries.tooltipText -- } -- } -- } -+ property Component compactRepresentation: CompactRepresentation { -+ hasBattery: pmSource.data["Battery"]["Has Battery"] -+ pmSource: plasmoid.rootItem.pmSource -+ batteries: plasmoid.rootItem.batteries -+ singleBattery: isConstrained() || !hasBattery - } - - property QtObject pmSource: PlasmaCore.DataSource { -@@ -150,12 +69,11 @@ Item { - engine: "powermanagement" - connectedSources: sources - onDataChanged: { -- Logic.updateTooltip(); -- Logic.updateBrightness(); -+ updateLogic(true); - } - onSourceAdded: { - if (source == "Battery0") { -- disconnectSource(source); -+ disconnectSource(source); - connectSource(source); - } - } -@@ -172,45 +90,31 @@ Item { - sourceFilter: "Battery[0-9]+" - - onDataChanged: { -- Logic.updateCumulative(); -- -- var status = "PassiveStatus"; -- if (batteries.cumulativePluggedin) { -- if (batteries.cumulativePercent <= 10) { -- status = "NeedsAttentionStatus"; -- } else if (!batteries.allCharged) { -- status = "ActiveStatus"; -- } -- } -- plasmoid.status = status; -+ updateLogic() - } - - property int cumulativePercent -- property bool cumulativePluggedin: count > 0 -+ property bool cumulativePluggedin - // true --> all batteries charged - // false --> one of the batteries charging/discharging - property bool allCharged - property string tooltipText -+ property string tooltipImage - } - - PopupDialog { - id: dialogItem - property bool disableBrightnessUpdate: false - model: batteries -- hasBattery: batteries.cumulativePluggedin -- percent: batteries.cumulativePercent -+ anchors.fill: parent -+ -+ isBrightnessAvailable: pmSource.data["PowerDevil"]["Screen Brightness Available"] ? true : false -+ isKeyboardBrightnessAvailable: pmSource.data["PowerDevil"]["Keyboard Brightness Available"] ? true : false -+ -+ showRemainingTime: show_remaining_time -+ - pluggedIn: pmSource.data["AC Adapter"]["Plugged in"] -- remainingMsec: parent.show_remaining_time ? Number(pmSource.data["Battery"]["Remaining msec"]) : 0 -- showSuspendButton: Platform.shouldOfferSuspend(pmSource) -- showHibernateButton: Platform.shouldOfferHibernate(pmSource) - -- onSuspendClicked: { -- plasmoid.togglePopup(); -- service = pmSource.serviceForSource("PowerDevil"); -- var operationName = Logic.callForType(type); -- operation = service.operationDescription(operationName); -- service.startOperationCall(operation); -- } - onBrightnessChanged: { - if (disableBrightnessUpdate) { - return; -@@ -220,6 +124,15 @@ Item { - operation.brightness = screenBrightness; - service.startOperationCall(operation); - } -+ onKeyboardBrightnessChanged: { -+ if (disableBrightnessUpdate) { -+ return; -+ } -+ service = pmSource.serviceForSource("PowerDevil"); -+ operation = service.operationDescription("setKeyboardBrightness"); -+ operation.brightness = keyboardBrightness; -+ service.startOperationCall(operation); -+ } - property int cookie1: -1 - property int cookie2: -1 - onPowermanagementChanged: { -@@ -256,6 +169,8 @@ Item { - cookie2 = job.result; - }); - } -+ Logic.powermanagementDisabled = !checked; -+ updateLogic(); - } - } - } -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/config.ui b/plasma/generic/applets/batterymonitor/contents/ui/config.ui -deleted file mode 100644 -index 3df38e2..0000000 ---- a/plasma/generic/applets/batterymonitor/contents/ui/config.ui -+++ /dev/null -@@ -1,54 +0,0 @@ -- -- -- batteryConfig -- -- -- -- 0 -- 0 -- 247 -- 73 -- -- -- -- Configure Battery Monitor -- -- -- -- -- -- -- -- -- Show charge &information -- -- -- -- -- -- -- -- -- -- Show the state for &each battery present -- -- -- -- -- -- -- Qt::Vertical -- -- -- -- 20 -- 15 -- -- -- -- -- -- -- -- -- -diff --git a/plasma/generic/applets/batterymonitor/metadata.desktop b/plasma/generic/applets/batterymonitor/metadata.desktop -index cd8f1a2..2b70e2c 100644 ---- a/plasma/generic/applets/batterymonitor/metadata.desktop -+++ b/plasma/generic/applets/batterymonitor/metadata.desktop -@@ -159,7 +159,6 @@ Comment[zh_CN]=查看电池电源的状态 - Comment[zh_TW]=查看您的電池的電力狀態 - Encoding=UTF-8 - Keywords=Power Management;Battery;System;Energy; --Keywords[bs]=Upravljanje napajenjem, Baterija, Sistem, Energija - Keywords[ca]=Sistema de gestió d'energia;Bateria;Sistema;Energia; - Keywords[cs]=Správa napájení;Baterie;Systém;Energie; - Keywords[da]=Strømstyring;battery;system;energi; -@@ -167,17 +166,16 @@ Keywords[de]=Energieverwaltungssystem;Akku;System;Energie; - Keywords[el]=Διαχείριση ισχύος·Μπαταρία·Σύστημα·Ενέργεια· - Keywords[es]=Gestión de energía;Batería;Sistema;Energía; - Keywords[fi]=Virranhallinta;Akku;Järjestelmä;Virransäästö; --Keywords[fr]=Gestion de l'énergie, Batterie, Système, Énergie, --Keywords[gl]=Power Management;Battery;System;Energy;xestión da enerxía;batería;sistema; -+Keywords[fr]=Gestion de l'énergie, Batterie, Système, Énergie, - Keywords[hu]=Energiakezelés;Akkumulátor;Rendszer;Energia; --Keywords[ia]=Gestion de energia; Batteria;Systema; Energia; --Keywords[it]=Gestione energetica;Batteria;Sistema;Energia; -+Keywords[ia]=Gestion de energia;Batteria;Systema; Energia; - Keywords[kk]=Power Management;Battery;System;Energy; - Keywords[lt]=Energijos valdymas,Baterija,Sistema,Energija,akumuliatorius; - Keywords[mr]=वीज व्यवस्थापन; बॅटरी; प्रणाली; ऊर्जा; - Keywords[nb]=Strømstyring; Batteri; System; Energi; - Keywords[nl]=Energiebeheer;Batterij;Accu;Systeem;Energie; --Keywords[pl]=Zarządzanie energią;bateria;system;energia; -+Keywords[pa]=ਪਾਵਰ ਪਰਬੰਧ;ਬੈਟਰੀ;ਸਿਸਟਮ;ਊਰਜਾ; -+Keywords[pl]=Zarządzanie Energią;Bateria;System;Energia - Keywords[pt]=Gestão de Energia;Bateria;Sistema;Energia; - Keywords[pt_BR]=Gerenciamento de energia;Bateria;Sistema;Energia; - Keywords[ru]=Power Management;Battery;System;Energy;управление питанием;батарея;система;энергия;энергопотребление -@@ -198,17 +196,17 @@ Type=Service - X-KDE-ServiceTypes=Plasma/Applet,Plasma/PopupApplet - - X-Plasma-API=declarativeappletscript --X-Plasma-DefaultSize=100,100 -+X-Plasma-DefaultSize=450,300 - X-Plasma-MainScript=ui/batterymonitor.qml - X-Plasma-ConfigPlugins=powerdevilprofilesconfig,powerdevilactivitiesconfig,powerdevilglobalconfig - X-Plasma-NotificationArea=true - --X-KDE-PluginInfo-Author=Sebastian Kügler -+X-KDE-PluginInfo-Author=Sebastian Kügler, Kai Uwe Broulik - X-KDE-PluginInfo-Category=System Information --X-KDE-PluginInfo-Email=sebas@kde.org -+X-KDE-PluginInfo-Email=sebas@kde.org, kde@privat.broulik.de - X-KDE-PluginInfo-License=GPL - X-KDE-PluginInfo-Name=battery --X-KDE-PluginInfo-Version=1.0 -+X-KDE-PluginInfo-Version=2.0 - X-KDE-PluginInfo-Website=http://vizZzion.org - X-KDE-PluginInfo-Depends= - X-KDE-PluginInfo-EnabledByDefault=true -diff --git a/plasma/generic/applets/batterymonitor/platformcontents/touch/code/platform.js b/plasma/generic/applets/batterymonitor/platformcontents/touch/code/platform.js -deleted file mode 100644 -index aa57ab8..0000000 ---- a/plasma/generic/applets/batterymonitor/platformcontents/touch/code/platform.js -+++ /dev/null -@@ -1,9 +0,0 @@ -- --function shouldOfferSuspend() { -- return false; --} -- --function shouldOfferHibernate() { -- return false; --} -- -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -index 357c2dc..feda7bc 100644 ---- a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -+++ b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml -@@ -84,13 +84,19 @@ Item { - } - } - -- property QtObject batteries: PlasmaCore.DataModel { -+ property QtObject batteries: PlasmaCore.SortFilterModel { - id: batteries -- dataSource: pmSource -- sourceFilter: "Battery[0-9]+" -- -- onDataChanged: { -- updateLogic() -+ filterRole: "Is Power Supply" -+ sortOrder: Qt.DescendingOrder -+ sourceModel: PlasmaCore.SortFilterModel { -+ sortRole: "Pretty Name" -+ sortOrder: Qt.AscendingOrder -+ sourceModel: PlasmaCore.DataModel { -+ dataSource: pmSource -+ sourceFilter: "Battery[0-9]+" -+ -+ onDataChanged: updateLogic() -+ } - } - - property int cumulativePercent -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml b/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml -deleted file mode 100644 -index c2216f8..0000000 ---- a/plasma/generic/applets/batterymonitor/contents/ui/AcAdapterItem.qml -+++ /dev/null -@@ -1,87 +0,0 @@ --/* -- * Copyright 2012-2013 Daniel Nicoletti -- * Copyright 2013 Kai Uwe Broulik -- * -- * This program is free software; you can redistribute it and/or modify -- * it under the terms of the GNU Library General Public License as -- * published by the Free Software Foundation; either version 2 or -- * (at your option) any later version. -- * -- * This program is distributed in the hope that it will be useful, -- * but WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- * GNU General Public License for more details -- * -- * You should have received a copy of the GNU Library General Public -- * License along with this program; if not, write to the -- * Free Software Foundation, Inc., -- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- */ -- --import QtQuick 1.1 --import org.kde.plasma.core 0.1 as PlasmaCore --import org.kde.plasma.components 0.1 as Components --import org.kde.qtextracomponents 0.1 -- --Item { -- id: brightnessItem -- clip: true -- width: parent.width -- height: acIcon.height + padding.margins.top + padding.margins.bottom -- -- property bool pluggedIn -- property bool showTime -- property string remainingString -- -- QIconItem { -- id: acIcon -- width: theme.iconSizes.dialog -- height: width -- anchors { -- top: parent.top -- topMargin: padding.margins.top -- left: parent.left -- leftMargin: padding.margins.left -- } -- -- icon: pluggedIn ? QIcon("battery-charging-low") : QIcon("battery-low") -- } -- -- Components.Label { -- id: acLabel -- anchors { -- top: acIcon.top -- left: acIcon.right -- leftMargin: 6 -- } -- height: paintedHeight -- text: i18n("AC Adapter") -- } -- -- Components.Label { -- id: acStatus -- anchors { -- top: showTime ? acLabel.top : undefined -- bottom: showTime ? undefined : acIcon.bottom -- left: showTime ? acLabel.right : acIcon.right -- leftMargin: showTime ? 3 : 6 -- } -- height: paintedHeight -- text: pluggedIn ? i18n("Plugged In") : i18n("Not Plugged In") -- color: "#77"+(theme.textColor.toString().substr(1)) -- } -- -- Components.Label { -- id: acTime -- anchors { -- bottom: acIcon.bottom -- left: acIcon.right -- leftMargin: 6 -- } -- height: paintedHeight -- visible: showTime -- text: pluggedIn ? i18n("Time remaining until full: %1", remainingString) : i18n("Time remaining until empty: %1", remainingString) -- color: "#77"+(theme.textColor.toString().substr(1)) -- } --} -- -diff --git a/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml b/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -index 106c8f9..cdb2a35 100644 ---- a/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -+++ b/plasma/generic/applets/batterymonitor/contents/ui/BatteryIcon.qml -@@ -32,11 +32,35 @@ Item { - } - - PlasmaCore.SvgItem { -+ id: batterySvg - anchors.fill: parent - svg: svg - elementId: "Battery" - } - -+ SequentialAnimation { -+ running: percent < 5 && !pluggedIn -+ alwaysRunToEnd: true -+ loops: Animation.Infinite -+ -+ NumberAnimation { -+ target: batterySvg -+ properties: "opacity" -+ from: 1.0 -+ to: 0.2 -+ duration: 750 -+ easing.type: Easing.InCubic -+ } -+ NumberAnimation { -+ target: batterySvg -+ properties: "opacity" -+ from: 0.2 -+ to: 1.0 -+ duration: 750 -+ easing.type: Easing.OutCubic -+ } -+ } -+ - PlasmaCore.SvgItem { - id: fillSvg - anchors.fill: parent diff --git a/kde4-kdebase-workspace.spec b/kde4-kdebase-workspace.spec index 3cde171..6732cff 100644 --- a/kde4-kdebase-workspace.spec +++ b/kde4-kdebase-workspace.spec @@ -7,12 +7,12 @@ Summary: KDE 4 base workspace components Summary(pl.UTF-8): Podstawowe komponenty środowiska KDE 4 Name: kde4-kdebase-workspace -Version: 4.10.5 +Version: 4.11.0 Release: 1 License: GPL v2+ Group: X11/Applications Source0: ftp://ftp.kde.org/pub/kde/%{_state}/%{version}/src/%{orgname}-%{version}.tar.xz -# Source0-md5: 46ebef4c24e383e5ed447a5374f8cb9e +# Source0-md5: a90af95f905874b092709361b9526e3e Source1: kdebase-kdesktop.pam Source2: kdebase-kdm.pam Source3: kdebase-kdm-np.pam @@ -31,7 +31,6 @@ Patch0: %{name}-rootprivs.patch Patch1: %{name}-kdmconfig.patch Patch2: %{name}-kdm_revertcrashlogic.patch Patch3: kde4-kdebase-workspace-brightness.patch -Patch4: kde4-kdebase-workspace-multibattery.patch URL: http://www.kde.org/ BuildRequires: ConsoleKit-devel BuildRequires: Mesa-libGLES-devel @@ -268,20 +267,6 @@ Solid - KDE 4 hardware configuration. %description solid -l pl.UTF-8 Solid - konfiguracja sprzętu w KDE 4. -%package networkmanager -Summary: Solid NetworkManager - network management using the NetworkManager daemon -Summary(pl.UTF-8): Solid NetworkManager - zarządzanie siecią przy użyciu demona NetworkManager -Group: X11/Applications -Requires: %{name}-solid = %{version}-%{release} - -%description networkmanager -Solid NetworkManager - network management using the NetworkManager -daemon. - -%description networkmanager -l pl.UTF-8 -Solid NetworkManager - zarządzanie siecią przy użyciu demona -NetworkManager. - %package kwrited Summary: KDE write messaging daemon Summary(pl.UTF-8): Demon do KDE obsługujący wymianę wiadomości za pomocą write @@ -537,7 +522,6 @@ dialogowych mających na celu rozszerzenie przywilejów użytkownika. # https://bugs.kde.org/show_bug.cgi?id=281862 #%patch2 -p1 #%patch3 -p1 -%patch4 -p1 %build install -d build @@ -944,6 +928,7 @@ fi %attr(755,root,root) %{_libdir}/kde4/powerdevilhandlebuttoneventsaction_config.so %attr(755,root,root) %{_libdir}/kde4/powerdevilrunscriptaction_config.so %attr(755,root,root) %{_libdir}/kde4/powerdevilsuspendsessionaction_config.so +%attr(755,root,root) %{_libdir}/kde4/powerdevilkeyboardbrightnesscontrolaction_config.so %attr(755,root,root) %{_libdir}/libpowerdevilcore.so.0 %attr(755,root,root) %{_libdir}/libpowerdevilcore.so.*.* %attr(755,root,root) %{_libdir}/libpowerdevilconfigcommonprivate.so.4 @@ -965,6 +950,7 @@ fi %{_datadir}/kde4/services/powerdevilprofilesconfig.desktop %{_datadir}/kde4/services/powerdevilrunscriptaction.desktop %{_datadir}/kde4/services/powerdevilsuspendsessionaction.desktop +%{_datadir}/kde4/services/powerdevilkeyboardbrightnesscontrolaction.desktop %{_datadir}/kde4/services/settings-power-management.desktop %{_datadir}/kde4/servicetypes/powerdevilaction.desktop @@ -1113,7 +1099,6 @@ fi %{_datadir}/kde4/services/keys.desktop %{_datadir}/kde4/services/mouse.desktop %{_datadir}/kde4/servicetypes/kwindecoration.desktop -%{_datadir}/kde4/servicetypes/solidremotecontrolmanager.desktop %{_datadir}/sounds/pop.wav # old decoration libs %attr(755,root,root) %{_libdir}/kde4/kcm_kwindecoration.so @@ -1168,8 +1153,6 @@ fi %attr(755,root,root) %{_libdir}/libpowerdevilconfigcommonprivate.so %attr(755,root,root) %{_libdir}/libprocesscore.so %attr(755,root,root) %{_libdir}/libprocessui.so -%attr(755,root,root) %{_libdir}/libsolidcontrol.so -%attr(755,root,root) %{_libdir}/libsolidcontrolifaces.so %attr(755,root,root) %{_libdir}/libsystemsettingsview.so %attr(755,root,root) %{_libdir}/libtaskmanager.so %attr(755,root,root) %{_libdir}/libweather_ion.so @@ -1185,7 +1168,6 @@ fi %{_includedir}/kworkspace %{_includedir}/ksgrd %{_includedir}/ksysguard -%{_includedir}/solid %{_includedir}/systemsettingsview %{_includedir}/taskmanager %{_includedir}/plasmaclock @@ -1292,12 +1274,12 @@ fi %attr(755,root,root) %{_bindir}/kwin %attr(755,root,root) %{_bindir}/kwin_gles %attr(755,root,root) %{_libdir}/libkwineffects.so.* -%attr(755,root,root) %{_libdir}/libkwinnvidiahack.so.* %attr(755,root,root) %{_libdir}/libkdeinit4_kwin.so %attr(755,root,root) %{_libdir}/libkdeinit4_kwin_gles.so %attr(755,root,root) %{_libdir}/libkdeinit4_kwin_rules_dialog.so %attr(755,root,root) %{_libdir}/kde4/kcm_kwin_scripts.so %attr(755,root,root) %{_libdir}/kde4/kcm_kwin4_effect_builtins.so +%attr(755,root,root) %{_libdir}/kde4/kcm_kwin4_genericscripted.so %attr(755,root,root) %{_libdir}/kde4/kcm_kwincompositing.so %attr(755,root,root) %{_libdir}/kde4/kcm_kwindesktop.so %attr(755,root,root) %{_libdir}/kde4/kcm_kwinoptions.so @@ -1320,6 +1302,7 @@ fi %attr(755,root,root) %{_libdir}/kconf_update_bin/kwin_update_tabbox_qml_settings %attr(755,root,root) %{_libdir}/kconf_update_bin/kwin_update_settings_49 %attr(755,root,root) %{_libdir}/kconf_update_bin/kwin_update_settings_410 +%attr(755,root,root) %{_libdir}/kconf_update_bin/kwin_update_settings_411 %attr(755,root,root) %{_libdir}/kconf_update_bin/notifications-to-orgkdenotifications %attr(755,root,root) %{_libdir}/kde4/libexec/kwin_killer_helper %attr(755,root,root) %{_libdir}/kde4/libexec/kwin_opengl_test @@ -1337,8 +1320,6 @@ fi %dir %{_datadir}/apps/kwin %{_datadir}/apps/kwin/*.glsl %{_datadir}/apps/kwin/*.png -%{_datadir}/apps/kwin/*.frag -%{_datadir}/apps/kwin/*.vert %dir %{_datadir}/apps/kwin/default_rules %{_datadir}/apps/kwin/default_rules/fsp_workarounds_1.kwinrules %{_datadir}/apps/kwin/effects @@ -1348,6 +1329,8 @@ fi %{_datadir}/apps/kwin/stripTitle.js %dir %{_datadir}/apps/kwin/decorations %{_datadir}/apps/kwin/tabbox +%{_datadir}/apps/kwin/desktoptabbox +%{_datadir}/apps/kwin/shaders %{_datadir}/config/kwinscripts.knsrc %{_datadir}/config/kwinswitcher.knsrc %{_datadir}/config.kcfg/kwin.kcfg @@ -1360,8 +1343,6 @@ fi %{_datadir}/kde4/services/kwin-script-desktopchangeosd.desktop %{_datadir}/kde4/services/kwin-script-synchronizeskipswitcher.desktop %{_datadir}/kde4/services/kwin-script-videowall.desktop -%{_datadir}/kde4/services/kwin/boxswitch.desktop -%{_datadir}/kde4/services/kwin/boxswitch_config.desktop %{_datadir}/kde4/services/kwin/coverswitch.desktop %{_datadir}/kde4/services/kwin/coverswitch_config.desktop %{_datadir}/kde4/services/kwin/cubeslide_config.desktop @@ -1369,17 +1350,14 @@ fi %{_datadir}/kde4/services/kwin/dashboard_config.desktop %{_datadir}/kde4/services/kwin/desktopgrid.desktop %{_datadir}/kde4/services/kwin/desktopgrid_config.desktop -%{_datadir}/kde4/services/kwin/dialogparent.desktop %{_datadir}/kde4/services/kwin/diminactive.desktop %{_datadir}/kde4/services/kwin/diminactive_config.desktop %{_datadir}/kde4/services/kwin/dimscreen.desktop -%{_datadir}/kde4/services/kwin/explosion.desktop #%{_datadir}/kde4/services/kwin/fade.desktop %{_datadir}/kde4/services/kwin/fallapart.desktop %{_datadir}/kde4/services/kwin/invert.desktop %{_datadir}/kde4/services/kwin/invert_config.desktop -%{_datadir}/kde4/services/kwin/login.desktop -%{_datadir}/kde4/services/kwin/login_config.desktop +%{_datadir}/kde4/services/kwin/kscreen.desktop #%{_datadir}/kde4/services/kwin/logout.desktop %{_datadir}/kde4/services/kwin/lookingglass.desktop %{_datadir}/kde4/services/kwin/lookingglass_config.desktop @@ -1388,12 +1366,11 @@ fi %{_datadir}/kde4/services/kwin/minimizeanimation.desktop %{_datadir}/kde4/services/kwin/mousemark.desktop %{_datadir}/kde4/services/kwin/mousemark_config.desktop -%{_datadir}/kde4/services/kwin/outline.desktop %{_datadir}/kde4/services/kwin/presentwindows.desktop %{_datadir}/kde4/services/kwin/presentwindows_config.desktop %{_datadir}/kde4/services/kwin/resize.desktop %{_datadir}/kde4/services/kwin/resize_config.desktop -%{_datadir}/kde4/services/kwin/scalein.desktop +%{_datadir}/kde4/services/kwin/screenedgeeffect.desktop %{_datadir}/kde4/services/kwin/screenshot.desktop #%{_datadir}/kde4/services/kwin/shadow.desktop #%{_datadir}/kde4/services/kwin/shadow_config.desktop @@ -1437,8 +1414,6 @@ fi %{_datadir}/kde4/services/kwin/sheet.desktop %{_datadir}/kde4/services/kwin/slideback.desktop %{_datadir}/kde4/services/kwin/snaphelper.desktop -%{_datadir}/kde4/services/kwin/translucency.desktop -%{_datadir}/kde4/services/kwin/translucency_config.desktop %{_datadir}/kde4/services/kwinscreenedges.desktop %{_datadir}/kde4/services/kwin/blur.desktop %{_datadir}/kde4/services/kwin/blur_config.desktop @@ -1450,6 +1425,7 @@ fi %{_datadir}/kde4/servicetypes/kwineffect.desktop %{_datadir}/kde4/servicetypes/kwinscript.desktop %{_datadir}/kde4/servicetypes/kwinwindowswitcher.desktop +%{_datadir}/kde4/servicetypes/kwindesktopswitcher.desktop %{_datadir}/apps/kconf_update/plasma-add-shortcut-to-menu.upd %{_datadir}/apps/kconf_update/krdb_libpathwipe.upd #%{_datadir}/apps/kconf_update/kwin.upd @@ -1473,6 +1449,13 @@ fi #%{_datadir}/apps/kconf_update/kwin_blacklist.upd #%{_datadir}/apps/kconf_update/khotkeys_printscreen.upd %{_datadir}/apps/kconf_update/notifications-to-orgkdenotifications.upd +%attr(755,root,root) %{_datadir}/apps/kconf_update/kwin_translate_activity_rule.sh +%{_datadir}/apps/kconf_update/kwin_translate_activity_rule.upd +%attr(755,root,root) %{_datadir}/apps/kconf_update/kwin_translate_confrequest_rule.sh +%{_datadir}/apps/kconf_update/kwin_translate_confrequest_rule.upd +%{_datadir}/apps/kconf_update/kwin_update_411.upd +%{_datadir}/apps/kconf_update/oxygen.upd +%attr(755,root,root) %{_datadir}/apps/kconf_update/update_oxygen.pl %{_iconsdir}/oxygen/16x16/apps/kwin.png %{_iconsdir}/oxygen/32x32/apps/kwin.png %{_iconsdir}/oxygen/48x48/apps/kwin.png @@ -1481,6 +1464,7 @@ fi %{_iconsdir}/Oxygen_White %{_iconsdir}/Oxygen_Yellow %{_iconsdir}/Oxygen_Zion +%{_iconsdir}/KDE_Classic %files plasma %defattr(644,root,root,755) @@ -1559,7 +1543,6 @@ fi %attr(755,root,root) %{_libdir}/kde4/plasma_engine_keystate.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_metadata.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_mouse.so -%attr(755,root,root) %{_libdir}/kde4/plasma_engine_network.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_nowplaying.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_notifications.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_places.so @@ -1575,9 +1558,7 @@ fi %attr(755,root,root) %{_libdir}/kde4/plasma_engine_weather.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_devicenotifications.so %attr(755,root,root) %{_libdir}/kde4/plasma_engine_statusnotifieritem.so -%attr(755,root,root) %{_libdir}/kde4/plasma_package_ggl.so %attr(755,root,root) %{_libdir}/kde4/plasma_packagestructure_share.so -%attr(755,root,root) %{_libdir}/kde4/plasma_scriptengine_ggl.so %attr(755,root,root) %{_libdir}/kde4/plasma-geolocation-gps.so %attr(755,root,root) %{_libdir}/kde4/plasma-geolocation-ip.so %attr(755,root,root) %{_libdir}/kde4/plasma_applet_panelspacer_internal.so @@ -1611,6 +1592,7 @@ fi %{_datadir}/kde4/services/plasma-applet-org.kde.showActivityManager.desktop %{_datadir}/kde4/services/plasma-dataengine-share-addon-imgsusepasteorg.desktop %{_datadir}/kde4/services/plasma-dataengine-share-addon-kde.desktop +%{_datadir}/kde4/services/plasma-dataengine-share-addon-im9.desktop %{_datadir}/kde4/services/plasma-layout-org.kde.plasma-desktop.SaL.desktop %{_datadir}/kde4/services/plasma-layout-org.kde.plasma-desktop.desktopIcons.desktop %{_datadir}/kde4/services/plasma-runner-activityrunner.desktop @@ -1622,6 +1604,7 @@ fi %dir %{_datadir}/apps/plasma/services %{_datadir}/apps/plasma/packages/org.kde.desktop.activitymanager %{_datadir}/apps/plasma/packages/org.kde.desktop.widgetexplorer +%{_datadir}/apps/plasma/packages/org.kde.plasma.tasks %{_datadir}/apps/plasma/plasmoids/battery %{_datadir}/apps/plasma/plasmoids/lockout %{_datadir}/apps/plasma/plasmoids/notifier @@ -1641,6 +1624,7 @@ fi %{_datadir}/apps/plasma/services/statusnotifieritem.operations %{_datadir}/apps/plasma/services/mpris2.operations %dir %{_datadir}/apps/plasma/shareprovider +%{_datadir}/apps/plasma/shareprovider/im9 %{_datadir}/apps/plasma/shareprovider/imgsusepasteorg %{_datadir}/apps/plasma/shareprovider/imgur %{_datadir}/apps/plasma/shareprovider/kde @@ -1716,7 +1700,6 @@ fi %{_datadir}/kde4/services/plasma-dataengine-filebrowser.desktop %{_datadir}/kde4/services/plasma-dataengine-hotplug.desktop %{_datadir}/kde4/services/plasma-dataengine-mouse.desktop -%{_datadir}/kde4/services/plasma-dataengine-network.desktop %{_datadir}/kde4/services/plasma-dataengine-places.desktop %{_datadir}/kde4/services/plasma-dataengine-powermanagement.desktop %{_datadir}/kde4/services/plasma-dataengine-rss.desktop @@ -1748,8 +1731,6 @@ fi %{_datadir}/kde4/services/plasma-wallpaper-image.desktop #%{_datadir}/kde4/services/plasma-applet-ggl-photos.desktop #%{_datadir}/kde4/services/plasma-applet-ggl-rss.desktop -%{_datadir}/kde4/services/plasma-packagestructure-googlegadgets.desktop -%{_datadir}/kde4/services/plasma-scriptengine-googlegadgets.desktop %{_datadir}/kde4/services/plasma-sal-bookmarks.desktop %{_datadir}/kde4/services/plasma-sal-contacts.desktop %{_datadir}/kde4/services/plasma-sal-education.desktop @@ -1804,47 +1785,23 @@ fi %files solid %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/solid-action-desktop-gen -#%attr(755,root,root) %{_bindir}/solid-bluetooth -%attr(755,root,root) %{_bindir}/solid-network -#%attr(755,root,root) %{_bindir}/solid-powermanagement -%attr(755,root,root) %{_libdir}/libsolidcontrol.so.* -%attr(755,root,root) %{_libdir}/libsolidcontrolifaces.so.* %attr(755,root,root) %{_libdir}/kde4/devinfo.so -%attr(755,root,root) %{_libdir}/kde4/kcm_solid.so %attr(755,root,root) %{_libdir}/kde4/kcm_solid_actions.so -%attr(755,root,root) %{_libdir}/kde4/solid_fakenet.so -%attr(755,root,root) %{_libdir}/kde4/solid_modemmanager04.so -#%attr(755,root,root) %{_libdir}/kde4/solid_hal_power.so -#%attr(755,root,root) %{_libdir}/kde4/solid_bluez.so -%attr(755,root,root) %{_libdir}/kde4/solid_wicd.so -#%attr(755,root,root) %{_libdir}/kde4/solid_lirc.so %dir %{_datadir}/apps/solid %dir %{_datadir}/apps/solid/actions %dir %{_datadir}/apps/solid/devices %{_datadir}/apps/solid/devices/*.desktop -%dir %{_datadir}/apps/solidfakenetbackend %{_datadir}/apps/solid/actions/test-predicate-openinwindow.desktop -%{_datadir}/apps/solidfakenetbackend/fakenetworking.xml %{_datadir}/apps/plasma/services/soliddevice.operations %{_datadir}/kde4/services/deviceinfocategory.desktop %{_datadir}/kde4/services/devinfo.desktop -%{_datadir}/kde4/services/kcm_solid.desktop -%{_datadir}/kde4/services/solidbackends %{_datadir}/kde4/services/solid-actions.desktop -%{_datadir}/kde4/servicetypes/solidmodemmanager.desktop -%{_datadir}/kde4/servicetypes/solidnetworkmanager.desktop #%{_datadir}/kde4/servicetypes/solidpowermanager.desktop %{_datadir}/kde4/servicetypes/solid-device-type.desktop #%{_datadir}/kde4/servicetypes/solidremotecontrolmanager.desktop %dir %{_datadir}/apps/kcmsolidactions %{_datadir}/apps/kcmsolidactions/solid-action-template.desktop -%files networkmanager -%defattr(644,root,root,755) -#%attr(755,root,root) %{_libdir}/kde4/solid_networkmanager07.so -%attr(755,root,root) %{_libdir}/kde4/solid_networkmanager09_fake.so -%{_iconsdir}/*/*x*/apps/networkmanager.png - %files kwrited %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/kde4/kded_kwrited.so -- 2.44.0