mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Moved ConfirmBox to Ui namespace.
This commit is contained in:
@@ -76,7 +76,7 @@ auto GenerateCodes() {
|
||||
? qsl("Do you want to disable DEBUG logs?")
|
||||
: qsl("Do you want to enable DEBUG logs?\n\n"
|
||||
"All network events will be logged.");
|
||||
Ui::show(Box<ConfirmBox>(text, [] {
|
||||
Ui::show(Box<Ui::ConfirmBox>(text, [] {
|
||||
Core::App().switchDebugMode();
|
||||
}));
|
||||
});
|
||||
@@ -96,7 +96,7 @@ auto GenerateCodes() {
|
||||
});
|
||||
codes.emplace(qsl("moderate"), [](SessionController *window) {
|
||||
auto text = Core::App().settings().moderateModeEnabled() ? qsl("Disable moderate mode?") : qsl("Enable moderate mode?");
|
||||
Ui::show(Box<ConfirmBox>(text, [=] {
|
||||
Ui::show(Box<Ui::ConfirmBox>(text, [=] {
|
||||
Core::App().settings().setModerateModeEnabled(!Core::App().settings().moderateModeEnabled());
|
||||
Core::App().saveSettingsDelayed();
|
||||
Ui::hideLayer();
|
||||
@@ -119,7 +119,7 @@ auto GenerateCodes() {
|
||||
return;
|
||||
}
|
||||
auto text = cUseExternalVideoPlayer() ? qsl("Use internal video player?") : qsl("Use external video player?");
|
||||
Ui::show(Box<ConfirmBox>(text, [=] {
|
||||
Ui::show(Box<Ui::ConfirmBox>(text, [=] {
|
||||
cSetUseExternalVideoPlayer(!cUseExternalVideoPlayer());
|
||||
window->session().saveSettingsDelayed();
|
||||
Ui::hideLayer();
|
||||
@@ -136,7 +136,8 @@ auto GenerateCodes() {
|
||||
if (!result.paths.isEmpty()) {
|
||||
const auto loadFor = [&](not_null<Main::Account*> account) {
|
||||
if (!account->mtp().dcOptions().loadFromFile(result.paths.front())) {
|
||||
Ui::show(Box<InformBox>("Could not load endpoints :( Errors in 'log.txt'."));
|
||||
Ui::show(Box<Ui::InformBox>("Could not load endpoints"
|
||||
" :( Errors in 'log.txt'."));
|
||||
}
|
||||
};
|
||||
if (const auto strong = weak.get()) {
|
||||
@@ -185,7 +186,7 @@ auto GenerateCodes() {
|
||||
#endif // !Q_OS_WIN
|
||||
: qsl("Switch font engine to FreeType?");
|
||||
|
||||
Ui::show(Box<ConfirmBox>(text, [] {
|
||||
Ui::show(Box<Ui::ConfirmBox>(text, [] {
|
||||
Core::App().switchFreeType();
|
||||
}));
|
||||
});
|
||||
@@ -214,7 +215,7 @@ auto GenerateCodes() {
|
||||
auto track = Media::Audio::Current().createTrack();
|
||||
track->fillFromFile(result.paths.front());
|
||||
if (track->failed()) {
|
||||
Ui::show(Box<InformBox>(
|
||||
Ui::show(Box<Ui::InformBox>(
|
||||
"Could not audio :( Errors in 'log.txt'."));
|
||||
} else {
|
||||
Core::App().settings().setSoundOverride(
|
||||
@@ -229,7 +230,7 @@ auto GenerateCodes() {
|
||||
codes.emplace(qsl("sounds_reset"), [](SessionController *window) {
|
||||
Core::App().settings().clearSoundOverrides();
|
||||
Core::App().saveSettingsDelayed();
|
||||
Ui::show(Box<InformBox>("All sound overrides were reset."));
|
||||
Ui::show(Box<Ui::InformBox>("All sound overrides were reset."));
|
||||
});
|
||||
codes.emplace(qsl("unpacklog"), [](SessionController *window) {
|
||||
FileDialog::GetOpenPath(Core::App().getFileDialogParent(), "Open crash log file", "Crash dump (*.txt)", [=](const FileDialog::OpenResult &result) {
|
||||
|
Reference in New Issue
Block a user