Skip to content

Commit

Permalink
add package check file sets; cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed Mar 14, 2024
1 parent 207ee81 commit 4cae2e3
Show file tree
Hide file tree
Showing 9 changed files with 485 additions and 273 deletions.
10 changes: 6 additions & 4 deletions FileSets/VersionIndependent/MbDisplayPackageVersion.qml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ MbItem {
return qsTr ("GUI restart needed")
else if (incompatibleReason == 'PLATFORM')
return qsTr ( "incompatible with " + platform )
else if (incompatibleReason != "")
// don't show warning incompatibilities here - they are shown in the editor menu
else if (incompatibleReason != ""
&& incompatibleReason.toLowerCase().indexOf ("warning") == -1 )
return incompatibleReason
else
return ""
Expand Down Expand Up @@ -101,7 +103,7 @@ MbItem {
{
id: gitHubVersion
item { bind: getServiceBind("GitHubVersion") }
height: 20; width: 102
height: 20; width: 99
}
Text // puts a bit of space below version boxes - only needed in one column
{
Expand All @@ -126,7 +128,7 @@ MbItem {
{
id: packageVersion
item { bind: getServiceBind("PackageVersion") }
height: 20; width: 102
height: 20; width: 99
}
}
Column
Expand All @@ -146,7 +148,7 @@ MbItem {
{
id: installedVersion
item { bind: getServiceBind("InstalledVersion") }
height: 20; width: 102
height: 20; width: 99
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions FileSets/VersionIndependent/PageSettingsPackageEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ MbPage {
property string packageConflicts: packageConflictsItem.valid ? packageConflictsItem.value : ""
property bool incompatible: incompatibleReason != ""
property VBusItem platform: VBusItem { bind: Utils.path(servicePrefix, "/Platform") }
property VBusItem fileSetOkItem: VBusItem { bind: getServiceBind ( "FileSetOk" ) }


property bool gitHubValid: gitHubVersion.item.valid && gitHubVersion.item.value.substring (0,1) === "v"
property bool packageValid: packageVersion.item.valid && packageVersion.item.value.substring (0,1) === "v"
property bool installedValid: installedVersion.item.valid && installedVersion.item.value.substring (0,1) === "v"
property bool downloadOk: gitHubValid && gitHubVersion.item.value != ""
property bool installOk: packageValid && packageVersion.item.value != "" && ! incompatible
property bool installOk: fileSetOkItem.valid && fileSetOkItem.value == 1 ? true : false
property string requestedAction: ''
property bool actionPending: requestedAction != ''
property bool waitForAction: editAction.value != ''
Expand Down Expand Up @@ -329,7 +331,7 @@ MbPage {
MbOK
{
id: nextButton
width: 75
width: 70
anchors { left: previousButton.right; top: statusMessage.bottom; topMargin: 5 }
description: ""
value: qsTr("Next")
Expand All @@ -340,7 +342,7 @@ MbPage {
{
id: downloadButton
width: 110
anchors { left: nextButton.right; top: statusMessage.bottom; topMargin: 5 }
anchors { right: installButton.left; top: statusMessage.bottom; topMargin: 5 }
description: ""
value: qsTr ("Download")
onClicked: gitHubDownload ()
Expand All @@ -350,7 +352,7 @@ MbPage {
MbOK
{
id: installButton
width: 90
width: 80
anchors { right: uninstallButton.left; top: statusMessage.bottom; topMargin: 5 }
description: ""
value: qsTr ("Install")
Expand All @@ -361,7 +363,7 @@ MbPage {
MbOK
{
id: uninstallButton
width: 100
width: 105
anchors { right: parent.right; top: statusMessage.bottom; topMargin: 5 }
description: ""
value: installedValid ? qsTr("Uninstall") : qsTr("Remove")
Expand Down
Loading

0 comments on commit 4cae2e3

Please sign in to comment.