diff options
| author | Nippy <nippy@Nippy-Mac-mini.local> | 2026-09-17 15:49:50 +0200 |
|---|---|---|
| committer | Nippy <nippy@Nippy-Mac-mini.local> | 2026-09-17 15:49:50 +0200 |
| commit | f676fc2bad71c23605c846027a6d3691508075fd (patch) | |
| tree | 0a2c875c1587672ec4f87c5d3c47e36c55112eeb /raveos-calamares-module/welcome | |
| parent | 6903c5a6ebb0b6a8536d5565f01a900051d1071b (diff) | |
| download | RaveOS-PKGBUILD-f676fc2bad71c23605c846027a6d3691508075fd.tar.gz RaveOS-PKGBUILD-f676fc2bad71c23605c846027a6d3691508075fd.zip | |
wifi fix
Diffstat (limited to 'raveos-calamares-module/welcome')
| -rw-r--r-- | raveos-calamares-module/welcome/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp | 32 | ||||
| -rw-r--r-- | raveos-calamares-module/welcome/RaveWelcomeViewStep.h | 1 |
3 files changed, 35 insertions, 1 deletions
diff --git a/raveos-calamares-module/welcome/CMakeLists.txt b/raveos-calamares-module/welcome/CMakeLists.txt index e2b3f5b..9d28587 100644 --- a/raveos-calamares-module/welcome/CMakeLists.txt +++ b/raveos-calamares-module/welcome/CMakeLists.txt @@ -1,4 +1,4 @@ -find_package(Qt6 REQUIRED COMPONENTS Widgets) +find_package(Qt6 REQUIRED COMPONENTS Core Widgets) calamares_add_plugin(ravewelcome TYPE viewmodule @@ -6,6 +6,7 @@ calamares_add_plugin(ravewelcome SOURCES RaveWelcomeViewStep.cpp LINK_LIBRARIES + Qt6::Core Qt6::Widgets Calamares::calamares ) diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp index 6c4e4a3..b2108c6 100644 --- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp +++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.cpp @@ -6,6 +6,7 @@ #include <QLabel> #include <QLocale> #include <QPainter> +#include <QProcess> #include <QPixmap> #include <QResizeEvent> #include <QVBoxLayout> @@ -103,6 +104,10 @@ void RaveWelcomeViewStep::buildWidget() m_langCombo->setCurrentIndex(m_currentLocaleIndex); + // Make the live keyboard layout match the initial language right away, + // so the WiFi password input is not stuck on the boot default (US). + applyLiveKeyboardLayout(m_localeIds.value(m_currentLocaleIndex)); + connect(m_langCombo, QOverload<int>::of(&QComboBox::activated), this, &RaveWelcomeViewStep::onLanguageChanged); @@ -168,6 +173,10 @@ void RaveWelcomeViewStep::onLanguageChanged(int index) gs->insert("locale", lang); } } + + // Apply the matching live keyboard layout immediately, so the WiFi + // password input follows the selected language (before the keyboard page). + applyLiveKeyboardLayout(localeId); } QString RaveWelcomeViewStep::brandingTranslationsPrefix() const @@ -177,6 +186,29 @@ QString RaveWelcomeViewStep::brandingTranslationsPrefix() const return QString(); } +void RaveWelcomeViewStep::applyLiveKeyboardLayout(const QString& localeId) +{ + QString layout = QStringLiteral("us"); + if (localeId.startsWith(QLatin1String("hu"))) + { + layout = QStringLiteral("hu"); + } + else if (localeId.startsWith(QLatin1String("de"))) + { + layout = QStringLiteral("de"); + } + else if (localeId == QLatin1String("en_GB")) + { + layout = QStringLiteral("gb"); + } + + // Best effort: apply the layout to the running X11 session so the WiFi + // password input matches the selected language immediately. A missing + // setxkbmap or non-X11 session must not break the installer. + const QStringList args { QStringLiteral("-layout"), layout }; + QProcess::startDetached(QStringLiteral("setxkbmap"), args); +} + bool RaveWelcomeViewStep::isNextEnabled() const { return true; } bool RaveWelcomeViewStep::isBackEnabled() const { return false; } bool RaveWelcomeViewStep::isAtBeginning() const { return true; } diff --git a/raveos-calamares-module/welcome/RaveWelcomeViewStep.h b/raveos-calamares-module/welcome/RaveWelcomeViewStep.h index 83c9264..af7bdff 100644 --- a/raveos-calamares-module/welcome/RaveWelcomeViewStep.h +++ b/raveos-calamares-module/welcome/RaveWelcomeViewStep.h @@ -37,6 +37,7 @@ private slots: private: void buildWidget(); QString brandingTranslationsPrefix() const; + void applyLiveKeyboardLayout(const QString& localeId); QWidget* m_widget = nullptr; QLabel* m_bgLabel = nullptr; |