2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Warn before running executable files.

This commit is contained in:
John Preston
2018-12-05 12:07:17 +04:00
parent edadc51e05
commit b10ccce44a
17 changed files with 209 additions and 92 deletions

View File

@@ -232,3 +232,27 @@ private:
int _userWidth = 0;
};
class ConfirmDontWarnBox : public BoxContent {
public:
ConfirmDontWarnBox(
QWidget*,
const QString &text,
const QString &checkbox,
const QString &confirm,
FnMut<void(bool)> callback);
protected:
void prepare() override;
private:
not_null<Ui::RpWidget*> setupContent(
const QString &text,
const QString &checkbox,
FnMut<void(bool)> callback);
QString _confirm;
FnMut<void()> _callback;
not_null<Ui::RpWidget*> _content;
};