intro_start.cpp 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #include "intro/intro_start.h"
  8. #include "lang/lang_keys.h"
  9. #include "intro/intro_qr.h"
  10. #include "intro/intro_phone.h"
  11. #include "ui/widgets/buttons.h"
  12. #include "ui/widgets/labels.h"
  13. #include "main/main_account.h"
  14. #include "main/main_app_config.h"
  15. namespace Intro {
  16. namespace details {
  17. StartWidget::StartWidget(
  18. QWidget *parent,
  19. not_null<Main::Account*> account,
  20. not_null<Data*> data)
  21. : Step(parent, account, data, true) {
  22. setMouseTracking(true);
  23. setTitleText(rpl::single(u"Telegram Desktop"_q));
  24. setDescriptionText(tr::lng_intro_about());
  25. show();
  26. }
  27. void StartWidget::submit() {
  28. account().destroyStaleAuthorizationKeys();
  29. goNext<QrWidget>();
  30. }
  31. rpl::producer<QString> StartWidget::nextButtonText() const {
  32. return tr::lng_start_msgs();
  33. }
  34. } // namespace details
  35. } // namespace Intro