From 25292a4c7cbd92c1430281065e5e487d6179e4a5 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Mar 2020 13:16:54 +0100 Subject: [PATCH 1/4] Add link to help pages if it can't connect I don't know what the link is supposed to be linking to though. Yet. Contributes to issue CURA-7017. --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 5ab0217f01..a28a3149ce 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -197,17 +197,20 @@ Item renderType: Text.NativeRendering visible: addPrinterByIpScreen.hasRequestInProgress || (addPrinterByIpScreen.hasRequestFinished && !addPrinterByIpScreen.isPrinterDiscovered) + textFormat: Text.RichText text: { if (addPrinterByIpScreen.hasRequestFinished) { - catalog.i18nc("@label", "Could not connect to device.") + return catalog.i18nc("@label", "Could not connect to device."); } else { - catalog.i18nc("@label", "The printer at this address has not responded yet.") + return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "

" + + catalog.i18nc("@label", "Can't connect to your printer?") + ""; } } + onLinkActivated: Qt.openUrlExternally(link) } Item From 2dcf5a9c9788e3c70951e97e6d7e8e1fa01f03a1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Mar 2020 14:01:02 +0100 Subject: [PATCH 2/4] Fix link to connecting page Contributes to issue CURA-7017. --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index a28a3149ce..a1ae1df7be 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -206,8 +206,8 @@ Item } else { - return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "

" - + catalog.i18nc("@label", "Can't connect to your printer?") + ""; + return catalog.i18nc("@label", "The printer at this address has not responded yet.") + "

" + + catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + ""; } } onLinkActivated: Qt.openUrlExternally(link) From 365d1c0f74af821e8efb50ec5be0453469342b4b Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 5 Mar 2020 17:39:57 +0100 Subject: [PATCH 3/4] Reset 'has responded' state when pressing Add It's maybe not a good idea to remember this state only in QML. Not changing that now though. Contributes to issue CURA-7017. --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index a1ae1df7be..36ab89209a 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -159,6 +159,7 @@ Item enabled: !addPrinterByIpScreen.hasRequestInProgress && !addPrinterByIpScreen.isPrinterDiscovered && (hostnameField.state != "invalid" && hostnameField.text != "") onClicked: { + addPrinterByIpScreen.hasRequestFinished = false //In case it's pressed multiple times. const address = hostnameField.text if (!networkingUtil.isValidIP(address)) { From 34f81ed0b0fb4758c554afbd7f070ede8029ad88 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Wed, 18 Mar 2020 09:31:13 +0100 Subject: [PATCH 4/4] Add link then the printer is not found CURA-7017 --- resources/qml/WelcomePages/AddPrinterByIpContent.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/qml/WelcomePages/AddPrinterByIpContent.qml b/resources/qml/WelcomePages/AddPrinterByIpContent.qml index 36ab89209a..c73aa3958e 100644 --- a/resources/qml/WelcomePages/AddPrinterByIpContent.qml +++ b/resources/qml/WelcomePages/AddPrinterByIpContent.qml @@ -203,7 +203,8 @@ Item { if (addPrinterByIpScreen.hasRequestFinished) { - return catalog.i18nc("@label", "Could not connect to device."); + return catalog.i18nc("@label", "Could not connect to device.") + "

" + + catalog.i18nc("@label", "Can't connect to your Ultimaker printer?") + ""; } else {