Hide Calligra from NagScreen

This commit is contained in:
Anton Thomasson 2021-03-21 16:38:04 +01:00
parent 0fe054b3db
commit 0a5ba8006c
3 changed files with 7 additions and 2 deletions

View file

@ -11,6 +11,8 @@ ApplicationWindow
{ {
id: appWin id: appWin
property bool expectCalligra: false
initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } } initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } }
cover: Qt.resolvedUrl("cover/CoverPage.qml") cover: Qt.resolvedUrl("cover/CoverPage.qml")
allowedOrientations: Orientation.All allowedOrientations: Orientation.All
@ -131,7 +133,7 @@ ApplicationWindow
id: nagScreenSetting id: nagScreenSetting
key: "/apps/harbour-seaprint/settings/nag-screen" key: "/apps/harbour-seaprint/settings/nag-screen"
defaultValue: 0 defaultValue: 0
property int expectedValue: 2 property int expectedValue: expectCalligra ? 2 : 1
} }
ConfigurationValue ConfigurationValue

View file

@ -77,7 +77,7 @@ Page {
{ {
console.log("Can convert from PDF:", ConvertChecker.pdf) console.log("Can convert from PDF:", ConvertChecker.pdf)
console.log("Can convert from Office:", ConvertChecker.calligra) console.log("Can convert from Office:", ConvertChecker.calligra)
if(!ConvertChecker.pdf || !ConvertChecker.calligra) if(!ConvertChecker.pdf || (expectCalligra && !ConvertChecker.calligra))
{ {
nagged=true nagged=true
pageStack.push(Qt.resolvedUrl("NagScreen.qml")) pageStack.push(Qt.resolvedUrl("NagScreen.qml"))

View file

@ -37,6 +37,7 @@ Page {
} }
Label { Label {
visible: appWin.expectCalligra
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@ -85,6 +86,7 @@ Page {
} }
Label { Label {
visible: appWin.expectCalligra
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
@ -92,6 +94,7 @@ Page {
} }
Label { Label {
visible: appWin.expectCalligra
width: parent.width width: parent.width
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
font.family: "monospace" font.family: "monospace"