Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/JobDialog.qml
| Show All 34 Lines | 24 | { | |||
|---|---|---|---|---|---|
| 35 | property QtObject q | 35 | property QtObject q | ||
| 36 | 36 | | |||
| 37 | Component.onCompleted: adoptJob() | 37 | Component.onCompleted: adoptJob() | ||
| 38 | onConfigurationChanged: adoptJob() | 38 | onConfigurationChanged: adoptJob() | ||
| 39 | minimumHeight: view.Layout.minimumHeight | 39 | minimumHeight: view.Layout.minimumHeight | ||
| 40 | minimumWidth: view.Layout.minimumWidth | 40 | minimumWidth: view.Layout.minimumWidth | ||
| 41 | 41 | | |||
| 42 | onClosing: { | 42 | onClosing: { | ||
| 43 | q.finished(null, 1, i18n("Configuration cancelled")); | 43 | q.finished(null, 1 /* KIO::ERR_USER_CANCELED */, i18n("Configuration cancelled")); | ||
| 44 | } | 44 | } | ||
| 45 | 45 | | |||
| 46 | function adoptJob() { | 46 | function adoptJob() { | ||
| 47 | if (configuration == null) | 47 | if (configuration == null) | ||
| 48 | return; | 48 | return; | ||
| 49 | if (configuration.isReady) { | 49 | if (configuration.isReady) { | ||
| 50 | startJob() | 50 | startJob() | ||
| 51 | } else { | 51 | } else { | ||
| Show All 35 Lines | 84 | Button { | |||
| 87 | onClicked: { | 87 | onClicked: { | ||
| 88 | view.pop(); | 88 | view.pop(); | ||
| 89 | window.startJob(); | 89 | window.startJob(); | ||
| 90 | } | 90 | } | ||
| 91 | } | 91 | } | ||
| 92 | Button { | 92 | Button { | ||
| 93 | text: i18n("Cancel") | 93 | text: i18n("Cancel") | ||
| 94 | onClicked: { | 94 | onClicked: { | ||
| 95 | window.q.finished(null, 1, i18n("Configuration cancelled")); | 95 | window.q.finished(null, 1 /* KIO::ERR_USER_CANCELED */, i18n("Configuration cancelled")); | ||
| 96 | window.visible = false; | 96 | window.visible = false; | ||
| 97 | } | 97 | } | ||
| 98 | } | 98 | } | ||
| 99 | Item { | 99 | Item { | ||
| 100 | Layout.fillWidth: true | 100 | Layout.fillWidth: true | ||
| 101 | } | 101 | } | ||
| 102 | } | 102 | } | ||
| 103 | } | 103 | } | ||
| Show All 12 Lines | |||||