Don't allow closing modal dialogs

ubuntu/oracular ubuntu/24.04.3
Aaron Rainbolt 2 months ago
parent 0174e9622b
commit 077e01afd6

7
debian/changelog vendored

@ -1,3 +1,10 @@
lubuntu-installer-prompt (24.04.3) noble; urgency=medium
* Don't let people close modal windows so they don't accidentally confuse
the prompt and mess up their system.
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Mon, 11 Mar 2024 18:14:21 -0500
lubuntu-installer-prompt (24.04.2) noble; urgency=medium lubuntu-installer-prompt (24.04.2) noble; urgency=medium
* Remove a spurious d/source/options file resulting in the whole Git repo * Remove a spurious d/source/options file resulting in the whole Git repo

@ -1,6 +1,8 @@
#include "connectionprogressdialog.h" #include "connectionprogressdialog.h"
#include "ui_connectionprogressdialog.h" #include "ui_connectionprogressdialog.h"
#include <QCloseEvent>
ConnectionProgressDialog::ConnectionProgressDialog(QWidget *parent) : ConnectionProgressDialog::ConnectionProgressDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::ConnectionProgressDialog) ui(new Ui::ConnectionProgressDialog)
@ -17,3 +19,8 @@ void ConnectionProgressDialog::setNetworkName(QString name)
{ {
ui->label->setText(tr("Connecting to %1...").arg(name)); ui->label->setText(tr("Connecting to %1...").arg(name));
} }
void ConnectionProgressDialog::closeEvent(QCloseEvent *event)
{
event->ignore();
}

@ -16,6 +16,9 @@ public:
~ConnectionProgressDialog(); ~ConnectionProgressDialog();
void setNetworkName(QString name); void setNetworkName(QString name);
protected slots:
void closeEvent(QCloseEvent *event) override;
private: private:
Ui::ConnectionProgressDialog *ui; Ui::ConnectionProgressDialog *ui;
}; };

@ -1,6 +1,8 @@
#include "languagechangedialog.h" #include "languagechangedialog.h"
#include "ui_languagechangedialog.h" #include "ui_languagechangedialog.h"
#include <QCloseEvent>
LanguageChangeDialog::LanguageChangeDialog(QWidget *parent) : LanguageChangeDialog::LanguageChangeDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::LanguageChangeDialog) ui(new Ui::LanguageChangeDialog)
@ -12,3 +14,8 @@ LanguageChangeDialog::~LanguageChangeDialog()
{ {
delete ui; delete ui;
} }
void LanguageChangeDialog::closeEvent(QCloseEvent *event)
{
event->ignore();
}

@ -15,6 +15,9 @@ public:
explicit LanguageChangeDialog(QWidget *parent = nullptr); explicit LanguageChangeDialog(QWidget *parent = nullptr);
~LanguageChangeDialog(); ~LanguageChangeDialog();
protected slots:
void closeEvent(QCloseEvent *event) override;
private: private:
Ui::LanguageChangeDialog *ui; Ui::LanguageChangeDialog *ui;
}; };

@ -1,11 +1,14 @@
#include "wifipassworddialog.h" #include "wifipassworddialog.h"
#include "ui_wifipassworddialog.h" #include "ui_wifipassworddialog.h"
#include <QCloseEvent>
WifiPasswordDialog::WifiPasswordDialog(QString ssid, QWidget *parent) : WifiPasswordDialog::WifiPasswordDialog(QString ssid, QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::WifiPasswordDialog) ui(new Ui::WifiPasswordDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->wifiLabel->setText(tr("Enter password for %1:").arg(ssid)); ui->wifiLabel->setText(tr("Enter password for %1:").arg(ssid));
connect(ui->connectButton, &QPushButton::clicked, this, &WifiPasswordDialog::onConnectClicked); connect(ui->connectButton, &QPushButton::clicked, this, &WifiPasswordDialog::onConnectClicked);
} }
@ -25,3 +28,8 @@ QString WifiPasswordDialog::getPassword()
{ {
return password; return password;
} }
void WifiPasswordDialog::closeEvent(QCloseEvent *event)
{
event->ignore();
}

@ -16,6 +16,9 @@ public:
~WifiPasswordDialog(); ~WifiPasswordDialog();
QString getPassword(); QString getPassword();
protected slots:
void closeEvent(QCloseEvent *event) override;
private slots: private slots:
void onConnectClicked(); void onConnectClicked();

Loading…
Cancel
Save