mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
show messagebox if settings cannot be edited
This commit is contained in:
parent
8b4cbce237
commit
5a3577317d
|
@ -11,6 +11,7 @@
|
|||
#include <boost/optional.hpp>
|
||||
#include <chrono>
|
||||
|
||||
#include <QMessageBox>
|
||||
#include "Application.hpp"
|
||||
#include "common/Args.hpp"
|
||||
#include "common/QLogging.hpp"
|
||||
|
@ -54,9 +55,18 @@ using SplitDirection = SplitContainer::Direction;
|
|||
void WindowManager::showSettingsDialog(QWidget *parent,
|
||||
SettingsDialogPreference preference)
|
||||
{
|
||||
if (getArgs().dontSaveSettings)
|
||||
{
|
||||
QMessageBox::critical(parent, "Chatterino - Editing Settings Forbidden",
|
||||
"Settings cannot be edited when running with "
|
||||
"commandline arguments such as '-c'.");
|
||||
}
|
||||
else
|
||||
{
|
||||
QTimer::singleShot(80, [parent, preference] {
|
||||
SettingsDialog::showDialog(parent, preference);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::showAccountSelectPopup(QPoint point)
|
||||
|
|
Loading…
Reference in a new issue