mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
StatusBar: port away from statusnotifieritem dataengine
Task: https://phabricator.kde.org/T13319
This commit is contained in:
parent
c004467db3
commit
843977059b
1 changed files with 3 additions and 18 deletions
|
|
@ -16,6 +16,7 @@ import org.kde.kirigami as Kirigami
|
||||||
|
|
||||||
import org.kde.plasma.core as PlasmaCore
|
import org.kde.plasma.core as PlasmaCore
|
||||||
import org.kde.plasma.plasma5support 2.0 as P5Support
|
import org.kde.plasma.plasma5support 2.0 as P5Support
|
||||||
|
import org.kde.plasma.private.systemtray as SystemTray
|
||||||
import org.kde.plasma.components 3.0 as PlasmaComponents
|
import org.kde.plasma.components 3.0 as PlasmaComponents
|
||||||
import org.kde.kitemmodels as KItemModels
|
import org.kde.kitemmodels as KItemModels
|
||||||
import org.kde.plasma.private.mobileshell as MobileShell
|
import org.kde.plasma.private.mobileshell as MobileShell
|
||||||
|
|
@ -67,17 +68,7 @@ Item {
|
||||||
Loader {
|
Loader {
|
||||||
id: statusNotifierSourceLoader
|
id: statusNotifierSourceLoader
|
||||||
active: !disableSystemTray
|
active: !disableSystemTray
|
||||||
sourceComponent: P5Support.DataSource {
|
sourceComponent: SystemTray.StatusNotifierModel { }
|
||||||
id: statusNotifierSource
|
|
||||||
engine: "statusnotifieritem"
|
|
||||||
interval: 0
|
|
||||||
onSourceAdded: {
|
|
||||||
connectSource(source)
|
|
||||||
}
|
|
||||||
Component.onCompleted: {
|
|
||||||
connectedSources = sources
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// drop shadow for icons
|
// drop shadow for icons
|
||||||
|
|
@ -141,13 +132,7 @@ Item {
|
||||||
// system tray
|
// system tray
|
||||||
Repeater {
|
Repeater {
|
||||||
id: statusNotifierRepeater
|
id: statusNotifierRepeater
|
||||||
model: KItemModels.KSortFilterProxyModel {
|
model: root.statusNotifierSource
|
||||||
id: filteredStatusNotifiers
|
|
||||||
filterRoleName: "Title"
|
|
||||||
sourceModel: P5Support.DataModel {
|
|
||||||
dataSource: statusNotifierSource ? statusNotifierSource : null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delegate: TaskWidget {
|
delegate: TaskWidget {
|
||||||
Layout.leftMargin: root.elementSpacing
|
Layout.leftMargin: root.elementSpacing
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue