Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
/*
|
|
This file is part of Telegram Desktop,
|
|
the official desktop application for the Telegram messaging service.
|
|
|
|
For license and copyright information please follow this link:
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|
*/
|
|
#include "intro/intro_start.h"
|
|
|
|
#include "lang/lang_keys.h"
|
|
#include "intro/intro_qr.h"
|
|
#include "intro/intro_phone.h"
|
|
#include "ui/widgets/buttons.h"
|
|
#include "ui/widgets/labels.h"
|
|
#include "main/main_account.h"
|
|
#include "main/main_app_config.h"
|
|
|
|
namespace Intro {
|
|
namespace details {
|
|
|
|
StartWidget::StartWidget(
|
|
QWidget *parent,
|
|
not_null<Main::Account*> account,
|
|
not_null<Data*> data)
|
|
: Step(parent, account, data, true) {
|
|
setMouseTracking(true);
|
|
setTitleText(rpl::single(u"Telegram Desktop"_q));
|
|
setDescriptionText(tr::lng_intro_about());
|
|
show();
|
|
}
|
|
|
|
void StartWidget::submit() {
|
|
account().destroyStaleAuthorizationKeys();
|
|
goNext<QrWidget>();
|
|
}
|
|
|
|
rpl::producer<QString> StartWidget::nextButtonText() const {
|
|
return tr::lng_start_msgs();
|
|
}
|
|
|
|
rpl::producer<> StartWidget::nextButtonFocusRequests() const {
|
|
return _nextButtonFocusRequests.events();
|
|
}
|
|
|
|
void StartWidget::activate() {
|
|
Step::activate();
|
|
setInnerFocus();
|
|
}
|
|
|
|
void StartWidget::setInnerFocus() {
|
|
_nextButtonFocusRequests.fire({});
|
|
}
|
|
|
|
} // namespace details
|
|
} // namespace Intro
|