From 0a5ba8006c669f018a009ec264ac04d74935732e Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sun, 21 Mar 2021 16:38:04 +0100 Subject: [PATCH] Hide Calligra from NagScreen --- qml/harbour-seaprint.qml | 4 +++- qml/pages/FirstPage.qml | 2 +- qml/pages/NagScreen.qml | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/qml/harbour-seaprint.qml b/qml/harbour-seaprint.qml index e505033..6104d99 100644 --- a/qml/harbour-seaprint.qml +++ b/qml/harbour-seaprint.qml @@ -11,6 +11,8 @@ ApplicationWindow { id: appWin + property bool expectCalligra: false + initialPage: Component { FirstPage { selectedFile: Qt.application.arguments[1] ? Qt.application.arguments[1] : "" } } cover: Qt.resolvedUrl("cover/CoverPage.qml") allowedOrientations: Orientation.All @@ -131,7 +133,7 @@ ApplicationWindow id: nagScreenSetting key: "/apps/harbour-seaprint/settings/nag-screen" defaultValue: 0 - property int expectedValue: 2 + property int expectedValue: expectCalligra ? 2 : 1 } ConfigurationValue diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index 2f1b031..84229d9 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -77,7 +77,7 @@ Page { { console.log("Can convert from PDF:", ConvertChecker.pdf) console.log("Can convert from Office:", ConvertChecker.calligra) - if(!ConvertChecker.pdf || !ConvertChecker.calligra) + if(!ConvertChecker.pdf || (expectCalligra && !ConvertChecker.calligra)) { nagged=true pageStack.push(Qt.resolvedUrl("NagScreen.qml")) diff --git a/qml/pages/NagScreen.qml b/qml/pages/NagScreen.qml index 9580bb2..2d3ed99 100644 --- a/qml/pages/NagScreen.qml +++ b/qml/pages/NagScreen.qml @@ -37,6 +37,7 @@ Page { } Label { + visible: appWin.expectCalligra width: parent.width wrapMode: Text.WordWrap @@ -85,6 +86,7 @@ Page { } Label { + visible: appWin.expectCalligra width: parent.width wrapMode: Text.WordWrap @@ -92,6 +94,7 @@ Page { } Label { + visible: appWin.expectCalligra width: parent.width wrapMode: Text.WordWrap font.family: "monospace"