Fix Wi-Fi spelling and minor cleanup #6

Open
NaniNoni wants to merge 2 commits from NaniNoni/installer-prompt:fix_wifi_spelling into ubuntu/noble

@ -64,7 +64,7 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
// Set up signal-slot connections for buttons
connect(ui->tryLubuntu, &QAbstractButton::clicked, this, &InstallerPrompt::tryLubuntu);
connect(ui->installLubuntu, &QAbstractButton::clicked, this, &InstallerPrompt::installLubuntu);
connect(ui->connectWiFiButton, &QAbstractButton::clicked, this, &InstallerPrompt::onConnectWifiClicked);
connect(ui->connectWifiButton, &QAbstractButton::clicked, this, &InstallerPrompt::onConnectWifiClicked);
connect(ui->confirmButton, &QAbstractButton::clicked, this, &InstallerPrompt::onLanguageConfirm);
// Set up the language combo box with available languages
@ -80,7 +80,7 @@ InstallerPrompt::InstallerPrompt(QWidget *parent)
foreach (const NetworkManager::Device::Ptr &device, NetworkManager::networkInterfaces()) {
if (device->type() == NetworkManager::Device::Wifi) {
wifiDevice = device.objectCast<NetworkManager::WirelessDevice>();
connect(wifiDevice.data(), &NetworkManager::Device::stateChanged, this, &InstallerPrompt::handleWiFiConnectionChange);
connect(wifiDevice.data(), &NetworkManager::Device::stateChanged, this, &InstallerPrompt::handleWifiConnectionChange);
break;
}
}
@ -146,14 +146,14 @@ void InstallerPrompt::updateConnectionStatus() {
bool connectable = !online && wifiEnabled;
if (connectable) refreshNetworkList();
ui->connectWiFiButton->setVisible(connectable);
ui->WiFiLabel->setVisible(connectable);
ui->connectWifiButton->setVisible(connectable);
ui->wifiLabel->setVisible(connectable);
ui->networkComboBox->setVisible(connectable);
ui->WiFiInfoLabel->setVisible(connectable);
ui->WiFiSpacer->changeSize(connectable ? 40 : 0, connectable ? 20 : 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
ui->wifiInfoLabel->setVisible(connectable);
ui->wifiSpacer->changeSize(connectable ? 40 : 0, connectable ? 20 : 0, QSizePolicy::Fixed, QSizePolicy::Fixed);
}
void InstallerPrompt::handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
void InstallerPrompt::handleWifiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason)
{
QMutexLocker locker(&wifiChangeMutex);
if (reason == NetworkManager::Device::NoSecretsReason && !wifiWrongHandling) {
@ -327,7 +327,7 @@ void InstallerPrompt::showWifiOptions() {
}
if (!foundWifiDevice) {
QMessageBox::information(this, tr("WiFi Not Available"), tr("No WiFi devices were found on this system."));
QMessageBox::information(this, tr("Wi-Fi Not Available"), tr("No Wi-Fi devices were found on this system."));
}
}
@ -346,7 +346,7 @@ void InstallerPrompt::refreshNetworkList() {
if (!wirelessDevice) {
// No wireless device found, handle appropriately
ui->networkComboBox->setVisible(false);
ui->connectWiFiButton->setVisible(false);
ui->connectWifiButton->setVisible(false);
return;
}
@ -366,7 +366,7 @@ void InstallerPrompt::refreshNetworkList() {
// Adjust visibility
ui->networkComboBox->setVisible(!networks.isEmpty());
ui->connectWiFiButton->setVisible(!networks.isEmpty());
ui->connectWifiButton->setVisible(!networks.isEmpty());
}
QString InstallerPrompt::getDisplayNameForLocale(const QLocale &locale) {

@ -29,7 +29,7 @@ private slots:
void onLanguageConfirm();
void onConnectWifiClicked();
void updateConnectionStatus();
void handleWiFiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason);
void handleWifiConnectionChange(NetworkManager::Device::State newstate, NetworkManager::Device::State oldstate, NetworkManager::Device::StateChangeReason reason);
void tryLubuntu();
void installLubuntu();
void languageProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
@ -51,7 +51,6 @@ private:
void handleWifiConnection(const QString &ssid, bool recoverFromWrongPassword = false);
QString promptForWifiPassword(const QString &ssid, bool isWrongPassword = false);
void connectToWifi(const QString &ssid, const QString &password, bool recoverFromWrongPassword = false);
void initLanguageComboBox();
QStringList getAvailableLanguages();
void showWifiOptions();

@ -189,7 +189,7 @@ KBusyIndicatorWidget {
</spacer>
</item>
<item>
<spacer name="WiFiSpacer">
<spacer name="wifiSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -202,7 +202,7 @@ KBusyIndicatorWidget {
</spacer>
</item>
<item>
<layout class="QGridLayout" name="WiFiLayout">
<layout class="QGridLayout" name="wifiLayout">
<item row="2" column="2">
<widget class="QComboBox" name="languageComboBox">
<property name="minimumSize">
@ -308,7 +308,7 @@ KBusyIndicatorWidget {
</spacer>
</item>
<item row="6" column="1">
<widget class="QLabel" name="WiFiLabel">
<widget class="QLabel" name="wifiLabel">
<property name="font">
<font>
<pointsize>18</pointsize>
@ -369,7 +369,7 @@ KBusyIndicatorWidget {
</spacer>
</item>
<item row="7" column="2">
<widget class="QLabel" name="WiFiInfoLabel">
<widget class="QLabel" name="wifiInfoLabel">
<property name="font">
<font>
<weight>75</weight>
@ -395,7 +395,7 @@ KBusyIndicatorWidget {
</spacer>
</item>
<item row="6" column="4">
<widget class="QPushButton" name="connectWiFiButton">
<widget class="QPushButton" name="connectWifiButton">
<property name="minimumSize">
<size>
<width>175</width>

Loading…
Cancel
Save