Commit e81d0d1b authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

notifier: include distro upgrades in the plasmoid

BUG: 399141
parent 5aa99884
......@@ -75,6 +75,7 @@ public Q_SLOTS:
Q_SIGNALS:
void updatesChanged();
bool needsRebootChanged(bool needsReboot);
void newUpgradeAction(UpgradeAction* action);
private:
void showRebootNotification();
......
......@@ -18,6 +18,7 @@
***************************************************************************/
import QtQuick 2.1
import QtQml.Models 2.11
import QtQuick.Layouts 1.1
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.components 2.0
......@@ -61,5 +62,23 @@ Item {
tooltip: i18n("Restart the system")
onClicked: DiscoverNotifier.reboot()
}
Repeater {
model: ObjectModel {
id: upgrades
Connections {
target: DiscoverNotifier
onNewUpgradeAction: upgrades.append(action)
}
}
delegate: Button {
visible: DiscoverNotifier.needsReboot
Layout.alignment: Qt.AlignHCenter
iconSource: "system-upgrade"
text: description
onClicked: model.trigger()
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment