Changeset View
Standalone View
applets/systemtray/package/contents/ui/items/AbstractItem.qml
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Line(s) | 67 | if (abstractItem.parent && abstractItem.parent.objectName === "hiddenTasksColumn") { | |||
---|---|---|---|---|---|
72 | } | 72 | } | ||
73 | } | 73 | } | ||
74 | 74 | | |||
75 | return plasmoid.location; | 75 | return plasmoid.location; | ||
76 | } | 76 | } | ||
77 | 77 | | |||
78 | //BEGIN CONNECTIONS | 78 | //BEGIN CONNECTIONS | ||
79 | 79 | | |||
80 | onEffectiveStatusChanged: updateItemVisibility(abstractItem); | 80 | onEffectiveStatusChanged: updateItemVisibility(abstractItem) | ||
81 | onCategoryChanged: updateItemVisibility(abstractItem) | ||||
mart: what's the reson for using callLater? | |||||
The main reason is to avoid calling updateItemVisibility from itself which might happen if stackAfter fires the onParentChanged event at wrong time (wrong time is right at reparent before changing order of items, and I believe the exact time is implementation detail we should not depend on anyway). Pitel: The main reason is to avoid calling `updateItemVisibility` from itself which might happen if… | |||||
82 | onTextChanged: updateItemVisibility(abstractItem) | ||||
83 | Component.onCompleted: updateItemVisibility(abstractItem) | ||||
This is probably not necessary: both plasmoids and statusnotifieritems have ids that you can access (numeric for plasmoids, alphanumeric for statusnotifiers, which would then make them ordered after plasmoids but that's fine) mart: This is probably not necessary: both plasmoids and statusnotifieritems have ids that you can… | |||||
Probably not, I have not observed any problems even without this rule, I just wanted to be safe. I see that I can use applet.id or even applet.pluginName as there should be at most one instace of given plasmoid in systray but I am not so sure about statusnotifiers, spec says that Id should be unique for given app, but what if user launches two instances of the app? Or am I overthinking this? Pitel: Probably not, I have not observed any problems even without this rule, I just wanted to be safe. | |||||
I tested multiple instances of vlc and all their properties exported by statusnotifier engine have the same values so creationId is required after all. Pitel: I tested multiple instances of vlc and all their properties exported by `statusnotifier` engine… | |||||
81 | 84 | | |||
82 | onContainsMouseChanged: { | 85 | onContainsMouseChanged: { | ||
83 | if (hidden && containsMouse) { | 86 | if (hidden && containsMouse) { | ||
84 | root.hiddenLayout.hoveredItem = abstractItem | 87 | root.hiddenLayout.hoveredItem = abstractItem | ||
85 | } | 88 | } | ||
86 | } | 89 | } | ||
87 | 90 | | |||
88 | Component.onCompleted: updateItemVisibility(abstractItem); | | |||
89 | | ||||
90 | //dangerous but needed due how repeater reparents | | |||
91 | onParentChanged: updateItemVisibility(abstractItem); | | |||
92 | | ||||
93 | //END CONNECTIONS | 91 | //END CONNECTIONS | ||
94 | 92 | | |||
95 | PulseAnimation { | 93 | PulseAnimation { | ||
96 | targetItem: iconItem | 94 | targetItem: iconItem | ||
97 | running: (abstractItem.status === PlasmaCore.Types.NeedsAttentionStatus || | 95 | running: (abstractItem.status === PlasmaCore.Types.NeedsAttentionStatus || | ||
98 | abstractItem.status === PlasmaCore.Types.RequiresAttentionStatus ) && | 96 | abstractItem.status === PlasmaCore.Types.RequiresAttentionStatus ) && | ||
99 | units.longDuration > 0 | 97 | units.longDuration > 0 | ||
100 | } | 98 | } | ||
Show All 40 Lines |
what's the reson for using callLater?