New upstream version 23.2.1+dfsg1

This commit is contained in:
Simon Chopin 2019-07-27 14:47:10 +02:00
parent cdc9a9fc87
commit b14f9eae6d
1017 changed files with 37232 additions and 11111 deletions

38
UI/window-dock.cpp Normal file
View file

@ -0,0 +1,38 @@
#include "window-dock.hpp"
#include "obs-app.hpp"
#include <QMessageBox>
#include <QCheckBox>
void OBSDock::closeEvent(QCloseEvent *event)
{
auto msgBox = [] ()
{
QMessageBox msgbox(App()->GetMainWindow());
msgbox.setWindowTitle(QTStr("DockCloseWarning.Title"));
msgbox.setText(QTStr("DockCloseWarning.Text"));
msgbox.setIcon(QMessageBox::Icon::Information);
msgbox.addButton(QMessageBox::Ok);
QCheckBox *cb = new QCheckBox(QTStr("DoNotShowAgain"));
msgbox.setCheckBox(cb);
msgbox.exec();
if (cb->isChecked()) {
config_set_bool(App()->GlobalConfig(), "General",
"WarnedAboutClosingDocks", true);
config_save_safe(App()->GlobalConfig(), "tmp", nullptr);
}
};
bool warned = config_get_bool(App()->GlobalConfig(), "General",
"WarnedAboutClosingDocks");
if (!warned) {
QMetaObject::invokeMethod(App(), "Exec",
Qt::QueuedConnection,
Q_ARG(VoidFunc, msgBox));
}
QDockWidget::closeEvent(event);
}