Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/package/contents/ui/JobItem.qml
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Line(s) | 135 | if (jobItem.jobDetails.totalFiles === 1) { | |||
---|---|---|---|---|---|
136 | return jobItem.jobDetails.descriptionUrl; | 136 | return jobItem.jobDetails.descriptionUrl; | ||
137 | } else { | 137 | } else { | ||
138 | return jobItem.jobDetails.destUrl; | 138 | return jobItem.jobDetails.destUrl; | ||
139 | } | 139 | } | ||
140 | } | 140 | } | ||
141 | 141 | | |||
142 | PlasmaComponents.Button { | 142 | PlasmaComponents.Button { | ||
143 | id: otherFileActionsButton | 143 | id: otherFileActionsButton | ||
144 | height: Math.max(implicitHeight, openButton.implicitHeight) | ||||
144 | iconName: "application-menu" | 145 | iconName: "application-menu" | ||
145 | tooltip: i18n("More Options...") | 146 | tooltip: i18n("More Options...") | ||
146 | checkable: true | 147 | checkable: true | ||
147 | onPressedChanged: { | 148 | onPressedChanged: { | ||
148 | if (pressed) { | 149 | if (pressed) { | ||
149 | checked = Qt.binding(function() { | 150 | checked = Qt.binding(function() { | ||
150 | return otherFileActionsMenu.visible; | 151 | return otherFileActionsMenu.visible; | ||
151 | }); | 152 | }); | ||
152 | otherFileActionsMenu.open(-1, -1); | 153 | otherFileActionsMenu.open(-1, -1); | ||
153 | } | 154 | } | ||
154 | } | 155 | } | ||
155 | 156 | | |||
156 | Notifications.FileMenu { | 157 | Notifications.FileMenu { | ||
157 | id: otherFileActionsMenu | 158 | id: otherFileActionsMenu | ||
158 | url: jobDoneActions.url || "" | 159 | url: jobDoneActions.url || "" | ||
159 | visualParent: otherFileActionsButton | 160 | visualParent: otherFileActionsButton | ||
160 | onActionTriggered: jobItem.fileActionInvoked() | 161 | onActionTriggered: jobItem.fileActionInvoked() | ||
161 | } | 162 | } | ||
162 | } | 163 | } | ||
163 | 164 | | |||
164 | PlasmaComponents.Button { | 165 | PlasmaComponents.Button { | ||
166 | id: openButton | ||||
167 | height: Math.max(implicitHeight, otherFileActionsButton.height) | ||||
165 | // would be nice to have the file icon here? | 168 | // would be nice to have the file icon here? | ||
166 | text: jobItem.jobDetails && jobItem.jobDetails.totalFiles > 1 ? i18n("Open Containing Folder") : i18n("Open") | 169 | text: jobItem.jobDetails && jobItem.jobDetails.totalFiles > 1 ? i18n("Open Containing Folder") : i18n("Open") | ||
167 | onClicked: jobItem.openUrl(jobDoneActions.url) | 170 | onClicked: jobItem.openUrl(jobDoneActions.url) | ||
168 | width: minimumWidth | 171 | width: minimumWidth | ||
169 | } | 172 | } | ||
170 | } | 173 | } | ||
171 | 174 | | |||
172 | states: [ | 175 | states: [ | ||
Show All 25 Lines |