diff --git a/qml/pages/AddPrinterDialog.qml b/qml/pages/AddPrinterDialog.qml index 785ceae..80e6509 100644 --- a/qml/pages/AddPrinterDialog.qml +++ b/qml/pages/AddPrinterDialog.qml @@ -11,6 +11,14 @@ Dialog { property var printerName: false canAccept: printerName != false + Connections { + target: wifi + onConnectedChanged: { + if(!wifi.connected) { + dialog.reject() + } + } + } Component.onCompleted: { valueField.forceActiveFocus() @@ -57,7 +65,7 @@ Dialog { Label { id: ssid_label color: Theme.secondaryColor - text: ssid + text: wifi.ssid } } Row { @@ -102,6 +110,7 @@ Dialog { onDone: { if (result == DialogResult.Accepted) { value = valueField.text + ssid = wifi.ssid } } diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index 62f0b75..6440037 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -102,12 +102,11 @@ Page { text: qsTr("Add by URL") enabled: wifi.connected onClicked: { - var dialog = pageStack.push(Qt.resolvedUrl("AddPrinterDialog.qml"), - {ssid: wifi.ssid, title: qsTr("URL")}); + var dialog = pageStack.push(Qt.resolvedUrl("AddPrinterDialog.qml")); dialog.accepted.connect(function() { console.log("add", wifi.ssid, dialog.value); db.addFavourite(wifi.ssid, dialog.value); - IppDiscovery.favourites = db.getFavourites(wifi.ssid); + IppDiscovery.favourites = db.getFavourites(dialog.ssid); }) } } diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index d799dc3..5f34e3b 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -223,10 +223,6 @@ Add by URL Mit URL hinzufügen - - URL - URL - Refresh Aktualisieren diff --git a/translations/harbour-seaprint-es.ts b/translations/harbour-seaprint-es.ts index 09db5c0..e60c743 100644 --- a/translations/harbour-seaprint-es.ts +++ b/translations/harbour-seaprint-es.ts @@ -223,10 +223,6 @@ Add by URL Añadir por URL - - URL - URL - Refresh Actualizar diff --git a/translations/harbour-seaprint-fr.ts b/translations/harbour-seaprint-fr.ts index 297ae07..1bf6ec5 100644 --- a/translations/harbour-seaprint-fr.ts +++ b/translations/harbour-seaprint-fr.ts @@ -223,10 +223,6 @@ Add by URL Ajouter par URL - - URL - URL - Refresh Actualiser diff --git a/translations/harbour-seaprint-nl.ts b/translations/harbour-seaprint-nl.ts index 69e86d5..e17a207 100644 --- a/translations/harbour-seaprint-nl.ts +++ b/translations/harbour-seaprint-nl.ts @@ -223,10 +223,6 @@ Add by URL Toevoegen via URL - - URL - URL - Refresh Ververs diff --git a/translations/harbour-seaprint-pl.ts b/translations/harbour-seaprint-pl.ts index 669efa5..5b6aec0 100644 --- a/translations/harbour-seaprint-pl.ts +++ b/translations/harbour-seaprint-pl.ts @@ -223,10 +223,6 @@ Add by URL Dodaj za pomocą URL - - URL - URL - Refresh Odśwież diff --git a/translations/harbour-seaprint-zh_CN.ts b/translations/harbour-seaprint-zh_CN.ts index ed7c99c..0a9220a 100644 --- a/translations/harbour-seaprint-zh_CN.ts +++ b/translations/harbour-seaprint-zh_CN.ts @@ -223,10 +223,6 @@ Add by URL 通过URL添加 - - URL - URL - Refresh 刷新 diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index ff95196..5de80e1 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -223,10 +223,6 @@ Add by URL - - URL - - Refresh