From 471c33c0fa9e52bb0d8b4093692600b35f12f1dd Mon Sep 17 00:00:00 2001 From: Nippy Date: Sun, 8 Nov 2026 14:37:52 +0100 Subject: wifi fix és calamres MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- raveos-calamares-module/PKGBUILD | 2 +- raveos-calamares-module/wifi-onallo/main.cpp | 1 + raveos-calamares-module/wifi/NetworkManager.cpp | 13 ++++++++----- raveos-calamares-module/wifi/ui/Translations.qml | 12 ++++++++---- raveos-calamares-module/wifi/ui/wifi.qml | 9 +++++---- 5 files changed, 23 insertions(+), 14 deletions(-) (limited to 'raveos-calamares-module') diff --git a/raveos-calamares-module/PKGBUILD b/raveos-calamares-module/PKGBUILD index 18371e2..118efb7 100644 --- a/raveos-calamares-module/PKGBUILD +++ b/raveos-calamares-module/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: nippy pkgname=raveos-calamares-module pkgver=2.0.0 -pkgrel=41 +pkgrel=42 pkgdesc="RaveOS Calamares modules: Wi-Fi, Welcome, Desktop Selector, Users" arch=('x86_64') options=('!debug') diff --git a/raveos-calamares-module/wifi-onallo/main.cpp b/raveos-calamares-module/wifi-onallo/main.cpp index 3fb6747..2ec55a4 100644 --- a/raveos-calamares-module/wifi-onallo/main.cpp +++ b/raveos-calamares-module/wifi-onallo/main.cpp @@ -8,6 +8,7 @@ int main(int argc, char* argv[]) { + qputenv("RAVEOS_WIFI_LOG", "/tmp/raveos-wifi.log"); QGuiApplication app(argc, argv); app.setApplicationName(QStringLiteral("raveos-wifi")); diff --git a/raveos-calamares-module/wifi/NetworkManager.cpp b/raveos-calamares-module/wifi/NetworkManager.cpp index 94abe2b..b3b12c7 100644 --- a/raveos-calamares-module/wifi/NetworkManager.cpp +++ b/raveos-calamares-module/wifi/NetworkManager.cpp @@ -17,7 +17,10 @@ typedef QMap NMConnectionSettings; -static const QString LOG_FILE = "/tmp/calamares-wifi.log"; +static QString logFile() +{ + return qEnvironmentVariable("RAVEOS_WIFI_LOG", QStringLiteral("/tmp/calamares-wifi.log")); +} static constexpr uint NmDeviceTypeWifi = 2; static constexpr uint NmApFlagPrivacy = 0x1; @@ -31,7 +34,7 @@ static void wifiLog(const QString& message) QString timestamp = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz"); QString logLine = QString("[%1] %2\n").arg(timestamp, message); - QFile file(LOG_FILE); + QFile file(logFile()); if (file.open(QIODevice::Append | QIODevice::Text)) { QTextStream stream(&file); @@ -47,7 +50,7 @@ NetworkManager::NetworkManager(QObject* parent) { qDBusRegisterMetaType(); - QFile file(LOG_FILE); + QFile file(logFile()); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream stream(&file); @@ -574,7 +577,7 @@ void NetworkManager::connectTo(const QString& ssid, const QString& password) void NetworkManager::startConnectionCheck() { m_connectionCheckCount++; - wifiLog(QString("Connection check attempt %1/10").arg(m_connectionCheckCount)); + wifiLog(QString("Connection check attempt %1/30").arg(m_connectionCheckCount)); updateConnectionState(); @@ -584,7 +587,7 @@ void NetworkManager::startConnectionCheck() return; } - if (m_connectionCheckCount < 10) + if (m_connectionCheckCount < 30) { QTimer::singleShot(1000, this, &NetworkManager::startConnectionCheck); } diff --git a/raveos-calamares-module/wifi/ui/Translations.qml b/raveos-calamares-module/wifi/ui/Translations.qml index 601e8eb..1436298 100644 --- a/raveos-calamares-module/wifi/ui/Translations.qml +++ b/raveos-calamares-module/wifi/ui/Translations.qml @@ -11,6 +11,7 @@ QtObject { property string selected: "Selected" property string noSelection: "Select a network from the list" property string password: "Password" + property string passwordOptional: "Password (if any)" property string connect: "Connect" property string hiddenNetwork: "Hidden network" property string ssidLabel: "Network name (SSID)" @@ -18,7 +19,7 @@ QtObject { property string statusDisconnected: "not connected" property string statusConnecting: "connecting..." property string statusConnected: "connected" - property string statusFailed: "connection failed" + property string statusFailed: "could not connect, check the password" property string secured: "Password protected" property string showPassword: "Show password" @@ -33,6 +34,7 @@ QtObject { selected = "Kiválasztva" noSelection = "Válassz egy hálózatot a listából" password = "Jelszó" + passwordOptional = "Jelszó (ha van)" connect = "Csatlakozás" hiddenNetwork = "Rejtett hálózat" ssidLabel = "Hálózat neve (SSID)" @@ -40,7 +42,7 @@ QtObject { statusDisconnected = "nincs kapcsolat" statusConnecting = "csatlakozás..." statusConnected = "csatlakozva" - statusFailed = "a csatlakozás nem sikerült" + statusFailed = "nem sikerült csatlakozni, ellenőrizd a jelszót" secured = "Jelszóval védett" showPassword = "Jelszó megjelenítése" } else if (locale.startsWith("de")) { @@ -53,6 +55,7 @@ QtObject { selected = "Ausgewählt" noSelection = "Wähle ein Netzwerk aus der Liste" password = "Passwort" + passwordOptional = "Passwort (falls vorhanden)" connect = "Verbinden" hiddenNetwork = "Verstecktes Netzwerk" ssidLabel = "Netzwerkname (SSID)" @@ -60,7 +63,7 @@ QtObject { statusDisconnected = "nicht verbunden" statusConnecting = "verbinde..." statusConnected = "verbunden" - statusFailed = "Verbindung fehlgeschlagen" + statusFailed = "Verbindung fehlgeschlagen, Passwort prüfen" secured = "Passwortgeschützt" showPassword = "Passwort anzeigen" } else { @@ -73,6 +76,7 @@ QtObject { selected = "Selected" noSelection = "Select a network from the list" password = "Password" + passwordOptional = "Password (if any)" connect = "Connect" hiddenNetwork = "Hidden network" ssidLabel = "Network name (SSID)" @@ -80,7 +84,7 @@ QtObject { statusDisconnected = "not connected" statusConnecting = "connecting..." statusConnected = "connected" - statusFailed = "connection failed" + statusFailed = "could not connect, check the password" secured = "Password protected" showPassword = "Show password" } diff --git a/raveos-calamares-module/wifi/ui/wifi.qml b/raveos-calamares-module/wifi/ui/wifi.qml index e3b0b0c..493847a 100644 --- a/raveos-calamares-module/wifi/ui/wifi.qml +++ b/raveos-calamares-module/wifi/ui/wifi.qml @@ -16,7 +16,8 @@ Rectangle { property bool jelszoLatszik: false readonly property string ssid: rejtett ? ssidMezo.text : (kivalasztott ? kivalasztott.ssid : "") - readonly property bool jelszoKell: rejtett || (kivalasztott !== null && kivalasztott.secured) + readonly property bool jelszoKell: !rejtett && kivalasztott !== null && kivalasztott.secured + readonly property bool jelszoMezoLatszik: rejtett || jelszoKell function updateLanguage() { WifiModule.Translations.setLanguage(systemLocale) @@ -340,12 +341,12 @@ Rectangle { } ColumnLayout { - visible: root.jelszoKell + visible: root.jelszoMezoLatszik Layout.fillWidth: true spacing: 6 Text { - text: root.t.password + text: root.rejtett ? root.t.passwordOptional : root.t.password color: Stilus.szovegHalvany font.family: Stilus.font font.pixelSize: 12 @@ -372,7 +373,7 @@ Rectangle { return root.sikertelen = false root.csatlakozik = true - nm.connectTo(root.ssid, root.jelszoKell ? jelszoMezo.text : "") + nm.connectTo(root.ssid, root.jelszoMezoLatszik ? jelszoMezo.text : "") } background: Rectangle { color: !csatlakozGomb.enabled ? "transparent" : (csatlakozGomb.hovered ? Stilus.zoldHover : Stilus.zold) -- cgit v1.3