Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/NotificationItem.qml
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 30 | Item { | |||
---|---|---|---|---|---|
50 | property alias configurable: settingsButton.visible | 50 | property alias configurable: settingsButton.visible | ||
51 | property var created | 51 | property var created | ||
52 | property var urls: [] | 52 | property var urls: [] | ||
53 | 53 | | |||
54 | property int maximumTextHeight: -1 | 54 | property int maximumTextHeight: -1 | ||
55 | 55 | | |||
56 | property ListModel actions: ListModel { } | 56 | property ListModel actions: ListModel { } | ||
57 | 57 | | |||
58 | property bool hasDefaultAction: false; | ||||
59 | | ||||
58 | function pressedAction() { | 60 | function pressedAction() { | ||
59 | for (var i = 0, count = actionRepeater.count; i < count; ++i) { | 61 | for (var i = 0, count = actionRepeater.count; i < count; ++i) { | ||
60 | var item = actionRepeater.itemAt(i) | 62 | var item = actionRepeater.itemAt(i) | ||
61 | if (item.pressed) { | 63 | if (item.pressed) { | ||
62 | return item | 64 | return item | ||
63 | } | 65 | } | ||
64 | } | 66 | } | ||
65 | 67 | | |||
66 | if (thumbnailStripLoader.item) { | 68 | if (thumbnailStripLoader.item) { | ||
67 | var item = thumbnailStripLoader.item.pressedAction() | 69 | var item = thumbnailStripLoader.item.pressedAction() | ||
68 | if (item) { | 70 | if (item) { | ||
69 | return item | 71 | return item | ||
70 | } | 72 | } | ||
71 | } | 73 | } | ||
72 | 74 | | |||
73 | if (settingsButton.pressed) { | 75 | if (settingsButton.pressed) { | ||
74 | return settingsButton | 76 | return settingsButton | ||
75 | } | 77 | } | ||
76 | 78 | | |||
79 | if (closeButton.pressed) { | ||||
80 | return closeButton | ||||
81 | } | ||||
82 | | ||||
77 | return null | 83 | return null | ||
78 | } | 84 | } | ||
79 | 85 | | |||
80 | function updateTimeLabel() { | 86 | function updateTimeLabel() { | ||
81 | if (!created || created.getTime() <= 0) { | 87 | if (!created || created.getTime() <= 0) { | ||
82 | timeLabel.text = "" | 88 | timeLabel.text = "" | ||
83 | return | 89 | return | ||
84 | } | 90 | } | ||
▲ Show 20 Lines • Show All 246 Lines • Show Last 20 Lines |