Skip to content

Commit

Permalink
Merge branch 'beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
kwindrem committed May 15, 2024
2 parents 81a1bbf + 1c8d0e3 commit 55168d5
Show file tree
Hide file tree
Showing 34 changed files with 1,931 additions and 2,051 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions FileSets/PatchSource/PageSettings.qml.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- /Users/Kevin/GitHub/StockVenusOsFiles/v3.20~37//opt/victronenergy/gui/qml/PageSettings.qml 2023-12-19 16:21:11
+++ PageSettings.qml 2024-01-08 16:51:07
--- /Users/Kevin/GitHub/SetupHelper.copy/FileSets/PatchSource/PageSettings.qml.orig 2024-04-13 11:31:17
+++ /Users/Kevin/GitHub/SetupHelper.copy/FileSets/PatchSource/PageSettings.qml 2024-04-13 11:31:17
@@ -1,3 +1,6 @@
+//////// modified to insert PackageManager menu
+//////// auto-generated by SetupHelper setup script
Expand Down
2 changes: 1 addition & 1 deletion FileSets/VersionIndependent/PageSettingsPackageAdd.qml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ MbPage {
else if (entryValid)
return ("add " + packageName + " ?")
else if (editPackageName.value == "")
return ("enter package name")
return ("enter a unique package name")
else if (editGitHubUser.value == "")
return ("enter GitHub user")
else if (editGitHubBranch.value == "")
Expand Down
32 changes: 22 additions & 10 deletions FileSets/VersionIndependent/PageSettingsPackageEdit.qml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MbPage {
property bool navigate: ! actionPending && ! waitForAction
property bool detailsExist: incompatibleDetails != ""
property bool detailsResolvable: incompatibleResolvableItem.valid ? incompatibleResolvableItem.value : ""
property bool showProceed: ( ! detailsExist || detailsResolvable) && ! waitForAction

property bool showDetails: false
property string localError: ""

Expand Down Expand Up @@ -72,7 +72,13 @@ MbPage {
requestedAction = ''
}
}


onIncompatibleChanged:
{
if (! incompatible )
showDetails = false
}

onActiveChanged:
{
if (active)
Expand Down Expand Up @@ -203,21 +209,27 @@ MbPage {
{
if (showDetails)
{
sendCommand ( 'resolveConflicts:' + packageName, true )
showDetails = false
if (detailsResolvable)
{
sendCommand ( 'resolveConflicts:' + packageName, true )
showDetails = false
}
// trigger setup script prechecks
else
{
sendCommand ( 'check:' + packageName, true )
showDetails = false
}
}
else if (actionPending)
sendCommand ( requestedAction + ':' + packageName, true )
else if (showActionNeeded)
{
if (actionNeeded.indexOf ( "REBOOT" ) != -1 )
{
sendCommand ( 'reboot', true )
}
else if (actionNeeded.indexOf ( "restart" ) != -1 )
{
sendCommand ( 'restartGui', true )
}
hideActionNeededTimer.start ()
}
requestedAction = ''
}
Expand Down Expand Up @@ -339,9 +351,9 @@ MbPage {
width: 92
anchors { right: cancelButton.left; bottom: statusMessage.bottom }
description: ""
value: ( actionPending || showDetails ) ? qsTr("Proceed") : qsTr ("Now")
value: ( actionPending || detailsResolvable ) ? qsTr("Proceed") : showDetails ? qsTr ("Recheck") : qsTr ("Now")
onClicked: confirm ()
show: ( actionPending || (showDetails && detailsResolvable) || showActionNeeded ) && showProceed
show: ( actionPending || showDetails || showActionNeeded ) && ! waitForAction
writeAccessLevel: User.AccessInstaller
}
MbOK
Expand Down
33 changes: 22 additions & 11 deletions FileSets/VersionIndependent/PageSettingsPackageManager.qml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,27 @@ import com.victron.velib 1.0

MbPage {
id: root
title: qsTr("Package manager")
title: showControls ? qsTr("Package manager") : qsTr("Package manager not running")
property string settingsPrefix: "com.victronenergy.settings/Settings/PackageManager"
property string servicePrefix: "com.victronenergy.packageManager"
property string bindVrmloggerPrefix: "com.victronenergy.logger"
VBusItem { id: pmStatus; bind: Utils.path(servicePrefix, "/PmStatus") }
VBusItem { id: pmStatusItem; bind: Utils.path(servicePrefix, "/PmStatus") }
property string pmStatus: pmStatusItem.valid ? pmStatusItem.value : ""
VBusItem { id: mediaStatus; bind: Utils.path(servicePrefix, "/MediaUpdateStatus") }
VBusItem { id: actionNeeded; bind: Utils.path(servicePrefix, "/ActionNeeded") }
VBusItem { id: editAction; bind: Utils.path(servicePrefix, "/GuiEditAction") }
property bool showMediaStatus: mediaStatus.valid && mediaStatus.value != ""
property bool showControls: pmStatus.valid
property bool showControls: pmStatusItem.valid

// the last status message received from PackageManager is saved in lastStatus
// so there is some status to display when PackageManager quits
property string lastStatus: ""

onPmStatusChanged:
{
if (pmStatusItem.valid)
lastStatus = pmStatus
}

model: VisibleItemModel
{
Expand All @@ -24,12 +35,12 @@ MbPage {
id: status
text:
{
if (! showControls)
return "Package manager not running"
else if (mediaStatus.valid && mediaStatus.value != "")
if (mediaStatus.valid && mediaStatus.value != "")
return mediaStatus.value
else if (showControls)
return pmStatus
else
return pmStatus.value
return lastStatus
}
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
Expand Down Expand Up @@ -82,22 +93,22 @@ MbPage {
{
if (! actionNeeded.valid)
return ""
else if (actionNeeded.value == 'reboot')
else if (actionNeeded.value.indexOf ( "REBOOT" ) != -1 )
return qsTr ("Reboot")
else if (actionNeeded.value == 'guiRestart')
else if (actionNeeded.value.indexOf ( "restart" ) != -1 )
return qsTr ("Restart GUI")
else
return ""
}
onClicked:
{
if (actionNeeded.value == 'reboot')
if (finishButton.value == 'REBOOT')
{
// needs immediate update because GUI will be going down ASAP
finishButton.description = qsTr ("REBOOTING ...")
editAction.setValue ( 'reboot' )
}
else if (actionNeeded.value == 'guiRestart')
else if (finishButton.value == 'guiRestart')
{
// needs immediate update because GUI will be going down ASAP
finishButton.description = qsTr ("restarting GUI ...")
Expand Down
Loading

0 comments on commit 55168d5

Please sign in to comment.