diff --git a/FileSets/MbDisplayPackageVersion.qml b/FileSets/MbDisplayPackageVersion.qml index eb69112..d91aebe 100644 --- a/FileSets/MbDisplayPackageVersion.qml +++ b/FileSets/MbDisplayPackageVersion.qml @@ -17,11 +17,15 @@ MbItem { property bool rebootNeeded: rebootNeededItem.valid && rebootNeededItem.value == 1 property bool guiRestartNeeded: guiRestartNeededItem.valid && guiRestartNeededItem.value == 1 - VBusItem { id: platformItem; bind: Utils.path("com.victronenergy.packageManager", "/Platform" ) } VBusItem { id: incompatibleItem; bind: getServiceBind ( "Incompatible" ) } property string incompatibleReason: incompatibleItem.valid ? incompatibleItem.value : "" property bool compatible: incompatibleReason == "" - property string platform: platformItem.valid ? platformItem.value : "??" + VBusItem { id: platformItem; bind: Utils.path("com.victronenergy.packageManager", "/Platform" ) } + property string platform: platformItem.valid ? platformItem.value : "???" + + // version info may be in platform service or in vePlatform.version + VBusItem { id: osVersionItem; bind: Utils.path("com.victronenergy.platform", "/Firmware/Installed/Version" ) } + property string osVersion: osVersionItem.valid ? osVersionItem.value : vePlatform.version onClicked: rootWindow.pageStack.push ("/opt/victronenergy/gui/qml/PageSettingsPackageEdit.qml", {packageIndex: packageIndex}) @@ -35,7 +39,7 @@ MbItem { else if (incompatibleReason == 'PLATFORM') return qsTr ( " not compatible with " + platform ) else if (incompatibleReason == 'VERSION') - return qsTr ( " not compatible with " + vePlatform.version ) + return qsTr ( " not compatible with " + osVersion ) else if (incompatibleReason == 'CMDLINE' && installedVersion.item.value == "") return qsTr ( " must install from command line" ) else diff --git a/FileSets/PageSettingsPackageEdit.qml b/FileSets/PageSettingsPackageEdit.qml index 36f005f..79cc848 100644 --- a/FileSets/PageSettingsPackageEdit.qml +++ b/FileSets/PageSettingsPackageEdit.qml @@ -6,7 +6,7 @@ import com.victron.velib 1.0 MbPage { id: root - title: platform.valid ? qsTr("Package editor") : qsTr ("Package manager not running") + title: platformItem.valid ? qsTr("Package editor") : qsTr ("Package manager not running") property string settingsPrefix: "com.victronenergy.settings/Settings/PackageManager" property string servicePrefix: "com.victronenergy.packageManager" property int packageIndex: 0 @@ -21,7 +21,6 @@ MbPage { property VBusItem rebootNeeded: VBusItem { bind: getServiceBind ( "RebootNeeded") } property VBusItem guiRestartNeeded: VBusItem { bind: getServiceBind ( "GuiRestartNeeded") } property VBusItem incompatibleReason: VBusItem { bind: getServiceBind ( "Incompatible") } - property VBusItem platform: VBusItem { bind: Utils.path(servicePrefix, "/Platform") } property bool showControls: editAction.valid property bool gitHubValid: gitHubVersion.item.valid && gitHubVersion.item.value.substring (0,1) === "v" @@ -42,6 +41,13 @@ MbPage { property VBusItem editGitHubUser: VBusItem { bind: Utils.path ( settingsPrefix, "/Edit/", "GitHubUser" ) } property VBusItem editGitHubBranch: VBusItem { bind: Utils.path ( settingsPrefix, "/Edit/", "GitHubBranch" ) } + VBusItem { id: platformItem; bind: Utils.path("com.victronenergy.packageManager", "/Platform" ) } + property string platform: platformItem.valid ? platformItem.value : "???" + // version info may be in platform service or in vePlatform.version + VBusItem { id: osVersionItem; bind: Utils.path("com.victronenergy.platform", "/Firmware/Installed/Version" ) } + property string osVersion: osVersionItem.valid ? osVersionItem.value : vePlatform.version + + Component.onCompleted: { @@ -72,9 +78,11 @@ MbPage { packageIndex += 1 if (packageIndex >= packageCount.value) packageIndex = packageCount.value - 1 + cancelEdit () } function previousIndex () { + cancelEdit () packageIndex -= 1 if (packageIndex < 0) packageIndex = 0 @@ -141,7 +149,7 @@ MbPage { readonly: true visible: showControls } - MbRowSmall + MbItemRow { description: qsTr ("Versions") height: 25 @@ -201,13 +209,13 @@ MbPage { text: { if (incompatibleReason.value == 'PLATFORM') - return ( qsTr ("not compatible with\n") + platformItem.value ) + return ( qsTr ("not compatible with\n") + platform ) else if (incompatibleReason.value == 'VERSION') - return ( qsTr ("not compatible with\n") + vePlatform.version ) + return ( qsTr ("not compatible with\n") + osVersion ) else if (incompatibleReason.value == 'CMDLINE') return qsTr ("must install\nfrom command line" ) else - return qsTr ("compatible ???" ) // compatible for unknown reason + return qsTr ("not compatible ???" ) // compatible for unknown reason } horizontalAlignment: Text.AlignHCenter width: 50 + 80 + 3 @@ -235,53 +243,41 @@ MbPage { writeAccessLevel: User.AccessInstaller visible: showControls } - MbOK - { - id: removeButton - width: 170 - anchors { right: parent.right} - description: "" - value: qsTr("Remove package") - onClicked: remove () - writeAccessLevel: User.AccessInstaller - opacity: installedValid ? 0.0001 : 1.0 - visible: navigate - } - MbOK + MbOK // for some reasion must be before removeButton or clicks do not work { id: cancelButton width: 90 - anchors { right: parent.right; bottom: removeButton.bottom } + anchors { right: parent.right } description: "" - value: qsTr("Cancel") - onClicked: cancelEdit () - visible: showControls && ! navigate && ! waitForAction - } - MbOK - { - id: dismissErrorButton - width: 90 - anchors { right: parent.right; bottom: removeButton.bottom } - description: "" - value: qsTr("OK") + value: + { + if (editAction.value == 'ERROR') + return qsTr("OK") + else if (moreActions) + return qsTr("Later") + else + return qsTr("Cancel") + } onClicked: cancelEdit () - visible: showControls && editAction.value == 'ERROR' + visible: showControls && ! navigate || waitForAction } MbOK { - id: laterButton - width: 90 - anchors { right: parent.right; bottom: removeButton.bottom } + id: removeButton + width: 170 + anchors { right: parent.right; bottom: cancelButton.bottom} description: "" - value: qsTr("Later") - onClicked: cancelEdit () - visible: moreActions + value: qsTr("Remove package") + onClicked: remove () + writeAccessLevel: User.AccessInstaller + opacity: installedValid ? 0.0001 : 1.0 + visible: navigate } MbOK { id: nowButton width: 90 - anchors { right: laterButton.left; bottom: removeButton.bottom } + anchors { right: cancelButton.left; bottom: cancelButton.bottom } description: "" value: qsTr("Now") onClicked: signalAdditionalAction () @@ -291,7 +287,7 @@ MbPage { { id: confirmButton width: 375 - anchors { left: parent.left; bottom: removeButton.bottom } + anchors { left: parent.left; bottom: cancelButton.bottom } description: "" value: qsTr ("Proceed") onClicked: confirm () @@ -303,7 +299,7 @@ MbPage { id: statusMessage width: 250 wrapMode: Text.WordWrap - anchors { left: parent.left; leftMargin: 10; bottom: removeButton.bottom; bottomMargin: 5 } + anchors { left: parent.left; leftMargin: 10; bottom: cancelButton.bottom; bottomMargin: 5 } font.pixelSize: 12 color: actionPending && isSetupHelper ? "red" : "black" text: @@ -328,7 +324,7 @@ MbPage { { id: previousButton width: 100 - anchors { left: parent.left ; top:removeButton.bottom } + anchors { left: parent.left ; top:cancelButton.bottom } description: "" value: qsTr("Previous") onClicked: previousIndex () @@ -386,7 +382,7 @@ MbPage { { id: uninstallButton width: 100 - anchors { right: parent.right; bottom: installButton.bottom } + anchors { right: parent.right; bottom: previousButton.bottom } description: "" value: qsTr("Uninstall") onClicked: uninstall () diff --git a/blindInstall/SetupHelperVersion b/blindInstall/SetupHelperVersion index 1dc9502..c03de31 100644 --- a/blindInstall/SetupHelperVersion +++ b/blindInstall/SetupHelperVersion @@ -1 +1 @@ -v4.30 +v4.31 diff --git a/changes b/changes index 90ed7a8..6033f8a 100644 --- a/changes +++ b/changes @@ -1,3 +1,6 @@ +v4.31: + fixed: PackageManager edit menus not working + v4.30: fixed: can't select many items in PackageManager menus add Cerbo SGX platform diff --git a/venus-data.UninstallPackages.tar.gz b/venus-data.UninstallPackages.tar.gz index c902e3c..b7497cb 100644 Binary files a/venus-data.UninstallPackages.tar.gz and b/venus-data.UninstallPackages.tar.gz differ diff --git a/venus-data.tgz b/venus-data.tgz index ee3fb82..ef83048 100644 Binary files a/venus-data.tgz and b/venus-data.tgz differ diff --git a/version b/version index 1dc9502..c03de31 100644 --- a/version +++ b/version @@ -1 +1 @@ -v4.30 +v4.31