mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Remove app.h / facades.h from precompiled header.
This commit is contained in:
parent
a87529b8c9
commit
0c713a930a
285 changed files with 1086 additions and 679 deletions
|
@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
class History;
|
||||||
|
|
||||||
namespace Api {
|
namespace Api {
|
||||||
|
|
||||||
struct SendOptions {
|
struct SendOptions {
|
||||||
|
|
|
@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_document.h"
|
#include "data/data_document.h"
|
||||||
#include "data/data_photo.h"
|
#include "data/data_photo.h"
|
||||||
#include "data/data_channel.h" // ChannelData::addsSignature.
|
#include "data/data_channel.h" // ChannelData::addsSignature.
|
||||||
#include "data/data_user.h" // App::peerName(UserData*).
|
#include "data/data_user.h" // UserData::name
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_file_origin.h"
|
#include "data/data_file_origin.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Api {
|
namespace Api {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -68,9 +69,7 @@ void SendExistingMedia(
|
||||||
sendFlags |= MTPmessages_SendMedia::Flag::f_silent;
|
sendFlags |= MTPmessages_SendMedia::Flag::f_silent;
|
||||||
}
|
}
|
||||||
auto messageFromId = channelPost ? 0 : session->userId();
|
auto messageFromId = channelPost ? 0 : session->userId();
|
||||||
auto messagePostAuthor = channelPost
|
auto messagePostAuthor = channelPost ? session->user()->name : QString();
|
||||||
? App::peerName(session->user())
|
|
||||||
: QString();
|
|
||||||
|
|
||||||
auto caption = TextWithEntities{
|
auto caption = TextWithEntities{
|
||||||
message.textWithTags.text,
|
message.textWithTags.text,
|
||||||
|
|
|
@ -58,6 +58,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "storage/storage_shared_media.h"
|
#include "storage/storage_shared_media.h"
|
||||||
#include "storage/storage_user_photos.h"
|
#include "storage/storage_user_photos.h"
|
||||||
#include "storage/storage_media_prepare.h"
|
#include "storage/storage_media_prepare.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
//#include "storage/storage_feed_messages.h" // #feed
|
//#include "storage/storage_feed_messages.h" // #feed
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -4514,7 +4516,7 @@ void ApiWrap::forwardMessages(
|
||||||
? UserId(0)
|
? UserId(0)
|
||||||
: peerToUser(self->id);
|
: peerToUser(self->id);
|
||||||
const auto messagePostAuthor = channelPost
|
const auto messagePostAuthor = channelPost
|
||||||
? App::peerName(self)
|
? self->name
|
||||||
: QString();
|
: QString();
|
||||||
history->addNewLocalMessage(
|
history->addNewLocalMessage(
|
||||||
newId.msg,
|
newId.msg,
|
||||||
|
@ -4608,7 +4610,7 @@ void ApiWrap::sendSharedContact(
|
||||||
}
|
}
|
||||||
const auto messageFromId = channelPost ? 0 : _session->userId();
|
const auto messageFromId = channelPost ? 0 : _session->userId();
|
||||||
const auto messagePostAuthor = channelPost
|
const auto messagePostAuthor = channelPost
|
||||||
? App::peerName(_session->user())
|
? _session->user()->name
|
||||||
: QString();
|
: QString();
|
||||||
const auto vcard = QString();
|
const auto vcard = QString();
|
||||||
const auto views = 1;
|
const auto views = 1;
|
||||||
|
@ -4998,7 +5000,7 @@ void ApiWrap::sendMessage(MessageToSend &&message) {
|
||||||
}
|
}
|
||||||
auto messageFromId = channelPost ? 0 : _session->userId();
|
auto messageFromId = channelPost ? 0 : _session->userId();
|
||||||
auto messagePostAuthor = channelPost
|
auto messagePostAuthor = channelPost
|
||||||
? App::peerName(_session->user())
|
? _session->user()->name
|
||||||
: QString();
|
: QString();
|
||||||
if (action.options.scheduled) {
|
if (action.options.scheduled) {
|
||||||
flags |= MTPDmessage::Flag::f_from_scheduled;
|
flags |= MTPDmessage::Flag::f_from_scheduled;
|
||||||
|
@ -5136,7 +5138,7 @@ void ApiWrap::sendInlineResult(
|
||||||
|
|
||||||
const auto messageFromId = channelPost ? 0 : _session->userId();
|
const auto messageFromId = channelPost ? 0 : _session->userId();
|
||||||
const auto messagePostAuthor = channelPost
|
const auto messagePostAuthor = channelPost
|
||||||
? App::peerName(_session->user())
|
? _session->user()->name
|
||||||
: QString();
|
: QString();
|
||||||
|
|
||||||
_session->data().registerMessageRandomId(randomId, newId);
|
_session->data().registerMessageRandomId(randomId, newId);
|
||||||
|
|
|
@ -105,23 +105,6 @@ namespace App {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow *wnd() {
|
|
||||||
return (Core::IsAppLaunched() && Core::App().activeWindow())
|
|
||||||
? Core::App().activeWindow()->widget().get()
|
|
||||||
: nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWidget *main() {
|
|
||||||
if (auto window = wnd()) {
|
|
||||||
return window->mainWidget();
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString peerName(const PeerData *peer, bool forDialogs) {
|
|
||||||
return peer ? ((forDialogs && peer->isUser() && !peer->asUser()->nameOrPhone.isEmpty()) ? peer->asUser()->nameOrPhone : peer->name) : tr::lng_deleted(tr::now);
|
|
||||||
}
|
|
||||||
|
|
||||||
void prepareCorners(RoundCorners index, int32 radius, const QBrush &brush, const style::color *shadow = nullptr, QImage *cors = nullptr) {
|
void prepareCorners(RoundCorners index, int32 radius, const QBrush &brush, const style::color *shadow = nullptr, QImage *cors = nullptr) {
|
||||||
Expects(::corners.size() > index);
|
Expects(::corners.size() > index);
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,16 @@ namespace HistoryView {
|
||||||
class Element;
|
class Element;
|
||||||
} // namespace HistoryView
|
} // namespace HistoryView
|
||||||
|
|
||||||
|
namespace Media {
|
||||||
|
namespace Clip {
|
||||||
|
class Reader;
|
||||||
|
} // namespace Clip
|
||||||
|
} // namespace Media
|
||||||
|
|
||||||
using HistoryItemsMap = base::flat_set<not_null<HistoryItem*>>;
|
using HistoryItemsMap = base::flat_set<not_null<HistoryItem*>>;
|
||||||
using GifItems = QHash<Media::Clip::Reader*, HistoryItem*>;
|
using GifItems = QHash<Media::Clip::Reader*, HistoryItem*>;
|
||||||
|
|
||||||
enum RoundCorners {
|
enum RoundCorners : int {
|
||||||
SmallMaskCorners = 0x00, // for images
|
SmallMaskCorners = 0x00, // for images
|
||||||
LargeMaskCorners,
|
LargeMaskCorners,
|
||||||
|
|
||||||
|
@ -60,13 +66,8 @@ enum RoundCorners {
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace App {
|
namespace App {
|
||||||
MainWindow *wnd();
|
|
||||||
MainWidget *main();
|
|
||||||
|
|
||||||
QString formatPhone(QString phone);
|
QString formatPhone(QString phone);
|
||||||
|
|
||||||
[[nodiscard]] QString peerName(const PeerData *peer, bool forDialogs = false);
|
|
||||||
|
|
||||||
void hoveredItem(HistoryView::Element *item);
|
void hoveredItem(HistoryView::Element *item);
|
||||||
HistoryView::Element *hoveredItem();
|
HistoryView::Element *hoveredItem();
|
||||||
void pressedItem(HistoryView::Element *item);
|
void pressedItem(HistoryView::Element *item);
|
||||||
|
|
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/timer.h"
|
#include "base/timer.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
struct AbstractBox::LoadingProgress {
|
struct AbstractBox::LoadingProgress {
|
||||||
LoadingProgress(
|
LoadingProgress(
|
||||||
|
@ -596,3 +597,39 @@ void BoxContentDivider::paintEvent(QPaintEvent *e) {
|
||||||
auto dividerFillBottom = myrtlrect(0, height() - st::profileDividerBottom.height(), width(), st::profileDividerBottom.height());
|
auto dividerFillBottom = myrtlrect(0, height() - st::profileDividerBottom.height(), width(), st::profileDividerBottom.height());
|
||||||
st::profileDividerBottom.fill(p, dividerFillBottom);
|
st::profileDividerBottom.fill(p, dividerFillBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
void showBox(
|
||||||
|
object_ptr<BoxContent> content,
|
||||||
|
LayerOptions options,
|
||||||
|
anim::type animated) {
|
||||||
|
if (auto w = App::wnd()) {
|
||||||
|
w->ui_showBox(std::move(content), options, animated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
|
||||||
|
void hideLayer(anim::type animated) {
|
||||||
|
if (auto w = App::wnd()) {
|
||||||
|
w->ui_showBox(
|
||||||
|
{ nullptr },
|
||||||
|
LayerOption::CloseOther,
|
||||||
|
animated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void hideSettingsAndLayer(anim::type animated) {
|
||||||
|
if (auto w = App::wnd()) {
|
||||||
|
w->ui_hideSettingsAndLayer(animated);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isLayerShown() {
|
||||||
|
if (auto w = App::wnd()) return w->ui_isLayerShown();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace Ui
|
||||||
|
|
|
@ -9,6 +9,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "window/layer_widget.h"
|
#include "window/layer_widget.h"
|
||||||
#include "base/unique_qptr.h"
|
#include "base/unique_qptr.h"
|
||||||
|
#include "base/flags.h"
|
||||||
|
#include "ui/effects/animation_value.h"
|
||||||
#include "ui/rp_widget.h"
|
#include "ui/rp_widget.h"
|
||||||
|
|
||||||
namespace style {
|
namespace style {
|
||||||
|
@ -427,3 +429,30 @@ private:
|
||||||
QPointer<BoxContent> _value;
|
QPointer<BoxContent> _value;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Legacy global method.
|
||||||
|
namespace Ui {
|
||||||
|
namespace internal {
|
||||||
|
|
||||||
|
void showBox(
|
||||||
|
object_ptr<BoxContent> content,
|
||||||
|
LayerOptions options,
|
||||||
|
anim::type animated);
|
||||||
|
|
||||||
|
} // namespace internal
|
||||||
|
|
||||||
|
template <typename BoxType>
|
||||||
|
QPointer<BoxType> show(
|
||||||
|
object_ptr<BoxType> content,
|
||||||
|
LayerOptions options = LayerOption::CloseOther,
|
||||||
|
anim::type animated = anim::type::normal) {
|
||||||
|
auto result = QPointer<BoxType>(content.data());
|
||||||
|
internal::showBox(std::move(content), options, animated);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void hideLayer(anim::type animated = anim::type::normal);
|
||||||
|
void hideSettingsAndLayer(anim::type animated = anim::type::normal);
|
||||||
|
bool isLayerShown();
|
||||||
|
|
||||||
|
} // namespace Ui
|
||||||
|
|
|
@ -40,6 +40,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
|
|
@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mtproto/sender.h"
|
#include "mtproto/sender.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
|
|
||||||
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
class ConfirmBox;
|
class ConfirmBox;
|
||||||
class PeerListBox;
|
class PeerListBox;
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "storage/localstorage.h"
|
#include "storage/localstorage.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
AutoLockBox::AutoLockBox(QWidget*, not_null<Main::Session*> session)
|
AutoLockBox::AutoLockBox(QWidget*, not_null<Main::Session*> session)
|
||||||
|
|
|
@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "boxes/background_preview_box.h"
|
#include "boxes/background_preview_box.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_overview.h"
|
#include "styles/style_overview.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "boxes/background_preview_box.h"
|
#include "boxes/background_preview_box.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -34,6 +34,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
@ -907,7 +909,9 @@ void ConfirmInviteBox::prepare() {
|
||||||
for (const auto user : _participants) {
|
for (const auto user : _participants) {
|
||||||
auto name = new Ui::FlatLabel(this, st::confirmInviteUserName);
|
auto name = new Ui::FlatLabel(this, st::confirmInviteUserName);
|
||||||
name->resizeToWidth(st::confirmInviteUserPhotoSize + padding);
|
name->resizeToWidth(st::confirmInviteUserPhotoSize + padding);
|
||||||
name->setText(user->firstName.isEmpty() ? App::peerName(user) : user->firstName);
|
name->setText(user->firstName.isEmpty()
|
||||||
|
? user->name
|
||||||
|
: user->firstName);
|
||||||
name->moveToLeft(left + (padding / 2), st::confirmInviteUserNameTop);
|
name->moveToLeft(left + (padding / 2), st::confirmInviteUserNameTop);
|
||||||
left += _userWidth;
|
left += _userWidth;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "platform/platform_info.h" // Platform::SystemVersionPretty
|
#include "platform/platform_info.h" // Platform::SystemVersionPretty
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "numbers.h"
|
#include "numbers.h"
|
||||||
|
#include "app.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -24,6 +24,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/effects/animations.h"
|
#include "ui/effects/animations.h"
|
||||||
#include "ui/effects/radial_animation.h"
|
#include "ui/effects/radial_animation.h"
|
||||||
#include "ui/text_options.h"
|
#include "ui/text_options.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/view/history_view_schedule_box.h"
|
#include "history/view/history_view_schedule_box.h"
|
||||||
#include "settings/settings_common.h"
|
#include "settings/settings_common.h"
|
||||||
#include "base/unique_qptr.h"
|
#include "base/unique_qptr.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_settings.h"
|
#include "styles/style_settings.h"
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
DownloadPathBox::DownloadPathBox(QWidget *parent)
|
DownloadPathBox::DownloadPathBox(QWidget *parent)
|
||||||
|
|
|
@ -37,6 +37,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
#include "confirm_box.h"
|
#include "confirm_box.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtCore/QMimeData>
|
#include <QtCore/QMimeData>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/abstract_box.h"
|
#include "boxes/abstract_box.h"
|
||||||
#include "storage/storage_media_prepare.h"
|
#include "storage/storage_media_prepare.h"
|
||||||
#include "ui/wrap/slide_wrap.h"
|
#include "ui/wrap/slide_wrap.h"
|
||||||
#include <rpl/event_stream.h>
|
#include "media/clip/media_clip_reader.h"
|
||||||
|
|
||||||
namespace ChatHelpers {
|
namespace ChatHelpers {
|
||||||
class TabbedPanel;
|
class TabbedPanel;
|
||||||
|
|
|
@ -8,11 +8,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/edit_color_box.h"
|
#include "boxes/edit_color_box.h"
|
||||||
|
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "styles/style_boxes.h"
|
|
||||||
#include "ui/widgets/shadow.h"
|
#include "ui/widgets/shadow.h"
|
||||||
#include "platform/platform_info.h"
|
|
||||||
#include "styles/style_mediaview.h"
|
|
||||||
#include "ui/widgets/input_fields.h"
|
#include "ui/widgets/input_fields.h"
|
||||||
|
#include "platform/platform_info.h"
|
||||||
|
#include "app.h"
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
|
#include "styles/style_mediaview.h"
|
||||||
|
|
||||||
class EditColorBox::Picker : public TWidget {
|
class EditColorBox::Picker : public TWidget {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -11,10 +11,11 @@ Copyright (C) 2017, Nicholas Guriev <guriev-ns@ya.ru>
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_peer.h"
|
#include "data/data_peer.h"
|
||||||
#include "styles/style_boxes.h"
|
|
||||||
#include "ui/special_buttons.h"
|
#include "ui/special_buttons.h"
|
||||||
#include "ui/widgets/checkbox.h"
|
#include "ui/widgets/checkbox.h"
|
||||||
#include "ui/widgets/labels.h"
|
#include "ui/widgets/labels.h"
|
||||||
|
#include "app.h"
|
||||||
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ void MuteSettingsBox::prepare() {
|
||||||
icon->moveToLeft(st::boxPadding.left(), y);
|
icon->moveToLeft(st::boxPadding.left(), y);
|
||||||
|
|
||||||
object_ptr<Ui::FlatLabel> title(this, st::muteChatTitle);
|
object_ptr<Ui::FlatLabel> title(this, st::muteChatTitle);
|
||||||
title->setText(App::peerName(_peer, true));
|
title->setText(_peer->name);
|
||||||
title->moveToLeft(
|
title->moveToLeft(
|
||||||
st::boxPadding.left() + st::muteChatTitleLeft,
|
st::boxPadding.left() + st::muteChatTitleLeft,
|
||||||
y + (icon->height() / 2) - (title->height() / 2));
|
y + (icon->height() / 2) - (title->height() / 2));
|
||||||
|
|
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/wrap/fade_wrap.h"
|
#include "ui/wrap/fade_wrap.h"
|
||||||
#include "passport/passport_encryption.h"
|
#include "passport/passport_encryption.h"
|
||||||
#include "passport/passport_panel_edit_contact.h"
|
#include "passport/passport_panel_edit_contact.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_passport.h"
|
#include "styles/style_passport.h"
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "dialogs/dialogs_main_list.h"
|
#include "dialogs/dialogs_main_list.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_profile.h"
|
#include "styles/style_profile.h"
|
||||||
|
|
||||||
|
@ -456,7 +457,7 @@ void AddBotToGroupBoxController::shareBotGame(not_null<PeerData*> chat) {
|
||||||
});
|
});
|
||||||
auto confirmText = [chat] {
|
auto confirmText = [chat] {
|
||||||
if (chat->isUser()) {
|
if (chat->isUser()) {
|
||||||
return tr::lng_bot_sure_share_game(tr::now, lt_user, App::peerName(chat));
|
return tr::lng_bot_sure_share_game(tr::now, lt_user, chat->name);
|
||||||
}
|
}
|
||||||
return tr::lng_bot_sure_share_game_group(tr::now, lt_group, chat->name);
|
return tr::lng_bot_sure_share_game_group(tr::now, lt_group, chat->name);
|
||||||
}();
|
}();
|
||||||
|
|
|
@ -28,6 +28,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
//
|
//
|
||||||
//};
|
//};
|
||||||
|
|
||||||
|
class History;
|
||||||
|
|
||||||
namespace Window {
|
namespace Window {
|
||||||
class SessionNavigation;
|
class SessionNavigation;
|
||||||
} // namespace Window
|
} // namespace Window
|
||||||
|
|
|
@ -24,6 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -775,7 +777,7 @@ void AddSpecialBoxController::kickUser(
|
||||||
: tr::lng_profile_sure_kick_channel)(
|
: tr::lng_profile_sure_kick_channel)(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
App::peerName(user));
|
user->name);
|
||||||
_editBox = Ui::show(
|
_editBox = Ui::show(
|
||||||
Box<ConfirmBox>(text, kickUserSure),
|
Box<ConfirmBox>(text, kickUserSure),
|
||||||
LayerOption::KeepOther);
|
LayerOption::KeepOther);
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/toast/toast.h"
|
#include "ui/toast/toast.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "boxes/add_contact_box.h"
|
#include "boxes/add_contact_box.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
|
@ -35,6 +35,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/core_cloud_password.h"
|
#include "core/core_cloud_password.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
@ -160,7 +161,7 @@ EditParticipantBox::Inner::Inner(
|
||||||
_userPhoto->setPointerCursor(false);
|
_userPhoto->setPointerCursor(false);
|
||||||
_userName.setText(
|
_userName.setText(
|
||||||
st::rightsNameStyle,
|
st::rightsNameStyle,
|
||||||
App::peerName(_user),
|
_user->name,
|
||||||
Ui::NameTextOptions());
|
Ui::NameTextOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/popup_menu.h"
|
#include "ui/widgets/popup_menu.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
@ -1817,7 +1818,7 @@ void ParticipantsBoxController::refreshCustomStatus(
|
||||||
row->setCustomStatus(tr::lng_channel_admin_status_promoted_by(
|
row->setCustomStatus(tr::lng_channel_admin_status_promoted_by(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
App::peerName(by)));
|
by->name));
|
||||||
} else {
|
} else {
|
||||||
if (_additional.isCreator(user)) {
|
if (_additional.isCreator(user)) {
|
||||||
row->setCustomStatus(
|
row->setCustomStatus(
|
||||||
|
@ -1834,7 +1835,7 @@ void ParticipantsBoxController::refreshCustomStatus(
|
||||||
: tr::lng_channel_banned_status_restricted_by)(
|
: tr::lng_channel_banned_status_restricted_by)(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
by ? App::peerName(by) : "Unknown"));
|
by ? by->name : "Unknown"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,9 +43,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/wrap/slide_wrap.h"
|
#include "ui/wrap/slide_wrap.h"
|
||||||
#include "ui/wrap/vertical_layout.h"
|
#include "ui/wrap/vertical_layout.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include <rpl/flatten_latest.h>
|
|
||||||
#include <rpl/range.h>
|
|
||||||
#include "info/profile/info_profile_icon.h"
|
#include "info/profile/info_profile_icon.h"
|
||||||
|
#include "app.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/peers/edit_peer_info_box.h"
|
#include "boxes/peers/edit_peer_info_box.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "ui/widgets/buttons.h"
|
#include "ui/widgets/buttons.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
PhotoCropBox::PhotoCropBox(
|
PhotoCropBox::PhotoCropBox(
|
||||||
|
|
|
@ -34,6 +34,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "api/api_common.h"
|
#include "api/api_common.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
Fn<void(PeerData *peer, bool selected)> callback);
|
Fn<void(PeerData *peer, bool selected)> callback);
|
||||||
void peerUnselected(not_null<PeerData*> peer);
|
void peerUnselected(not_null<PeerData*> peer);
|
||||||
|
|
||||||
QVector<PeerData*> selected() const;
|
std::vector<not_null<PeerData*>> selected() const;
|
||||||
bool hasSelected() const;
|
bool hasSelected() const;
|
||||||
|
|
||||||
void peopleReceived(
|
void peopleReceived(
|
||||||
|
@ -1064,8 +1064,8 @@ void ShareBox::Inner::refresh() {
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<PeerData*> ShareBox::Inner::selected() const {
|
std::vector<not_null<PeerData*>> ShareBox::Inner::selected() const {
|
||||||
auto result = QVector<PeerData*>();
|
auto result = std::vector<not_null<PeerData*>>();
|
||||||
result.reserve(_dataMap.size());
|
result.reserve(_dataMap.size());
|
||||||
for (const auto &[peer, chat] : _dataMap) {
|
for (const auto &[peer, chat] : _dataMap) {
|
||||||
if (chat->checkbox.checked()) {
|
if (chat->checkbox.checked()) {
|
||||||
|
|
|
@ -56,7 +56,7 @@ class ShareBox : public BoxContent, public RPCSender {
|
||||||
public:
|
public:
|
||||||
using CopyCallback = Fn<void()>;
|
using CopyCallback = Fn<void()>;
|
||||||
using SubmitCallback = Fn<void(
|
using SubmitCallback = Fn<void(
|
||||||
QVector<PeerData*>&&,
|
std::vector<not_null<PeerData*>>&&,
|
||||||
TextWithTags&&,
|
TextWithTags&&,
|
||||||
Api::SendOptions)>;
|
Api::SendOptions)>;
|
||||||
using FilterCallback = Fn<bool(PeerData*)>;
|
using FilterCallback = Fn<bool(PeerData*)>;
|
||||||
|
|
|
@ -29,6 +29,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/image/image.h"
|
#include "ui/image/image.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
void UrlAuthBox::Activate(
|
void UrlAuthBox::Activate(
|
||||||
|
@ -176,7 +177,7 @@ not_null<Ui::RpWidget*> UrlAuthBox::setupContent(
|
||||||
textcmdStartSemibold() + domain + textcmdStopSemibold(),
|
textcmdStartSemibold() + domain + textcmdStopSemibold(),
|
||||||
lt_user,
|
lt_user,
|
||||||
(textcmdStartSemibold()
|
(textcmdStartSemibold()
|
||||||
+ App::peerName(session->user())
|
+ session->user()->name
|
||||||
+ textcmdStopSemibold())));
|
+ textcmdStopSemibold())));
|
||||||
const auto allow = bot
|
const auto allow = bot
|
||||||
? addCheckbox(tr::lng_url_auth_allow_messages(
|
? addCheckbox(tr::lng_url_auth_allow_messages(
|
||||||
|
|
|
@ -21,6 +21,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_media_types.h"
|
#include "data/data_media_types.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Calls {
|
namespace Calls {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "calls/calls_panel.h"
|
#include "calls/calls_panel.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
#ifdef slots
|
#ifdef slots
|
||||||
#undef slots
|
#undef slots
|
||||||
|
@ -871,11 +872,11 @@ void Call::setFailedQueued(int error) {
|
||||||
|
|
||||||
void Call::handleRequestError(const RPCError &error) {
|
void Call::handleRequestError(const RPCError &error) {
|
||||||
if (error.type() == qstr("USER_PRIVACY_RESTRICTED")) {
|
if (error.type() == qstr("USER_PRIVACY_RESTRICTED")) {
|
||||||
Ui::show(Box<InformBox>(tr::lng_call_error_not_available(tr::now, lt_user, App::peerName(_user))));
|
Ui::show(Box<InformBox>(tr::lng_call_error_not_available(tr::now, lt_user, _user->name)));
|
||||||
} else if (error.type() == qstr("PARTICIPANT_VERSION_OUTDATED")) {
|
} else if (error.type() == qstr("PARTICIPANT_VERSION_OUTDATED")) {
|
||||||
Ui::show(Box<InformBox>(tr::lng_call_error_outdated(tr::now, lt_user, App::peerName(_user))));
|
Ui::show(Box<InformBox>(tr::lng_call_error_outdated(tr::now, lt_user, _user->name)));
|
||||||
} else if (error.type() == qstr("CALL_PROTOCOL_LAYER_INVALID")) {
|
} else if (error.type() == qstr("CALL_PROTOCOL_LAYER_INVALID")) {
|
||||||
Ui::show(Box<InformBox>(Lang::Hard::CallErrorIncompatible().replace("{user}", App::peerName(_user))));
|
Ui::show(Box<InformBox>(Lang::Hard::CallErrorIncompatible().replace("{user}", _user->name)));
|
||||||
}
|
}
|
||||||
finish(FinishType::Failed);
|
finish(FinishType::Failed);
|
||||||
}
|
}
|
||||||
|
@ -885,7 +886,7 @@ void Call::handleControllerError(int error) {
|
||||||
Ui::show(Box<InformBox>(
|
Ui::show(Box<InformBox>(
|
||||||
Lang::Hard::CallErrorIncompatible().replace(
|
Lang::Hard::CallErrorIncompatible().replace(
|
||||||
"{user}",
|
"{user}",
|
||||||
App::peerName(_user))));
|
_user->name)));
|
||||||
} else if (error == tgvoip::ERROR_AUDIO_IO) {
|
} else if (error == tgvoip::ERROR_AUDIO_IO) {
|
||||||
Ui::show(Box<InformBox>(tr::lng_call_error_audio_io(tr::now)));
|
Ui::show(Box<InformBox>(tr::lng_call_error_audio_io(tr::now)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "boxes/rate_call_box.h"
|
#include "boxes/rate_call_box.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Calls {
|
namespace Calls {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -41,7 +43,7 @@ void Instance::startOutgoingCall(not_null<UserData*> user) {
|
||||||
if (user->callsStatus() == UserData::CallsStatus::Private) {
|
if (user->callsStatus() == UserData::CallsStatus::Private) {
|
||||||
// Request full user once more to refresh the setting in case it was changed.
|
// Request full user once more to refresh the setting in case it was changed.
|
||||||
_session->api().requestFullPeer(user);
|
_session->api().requestFullPeer(user);
|
||||||
Ui::show(Box<InformBox>(tr::lng_call_error_not_available(tr::now, lt_user, App::peerName(user))));
|
Ui::show(Box<InformBox>(tr::lng_call_error_not_available(tr::now, lt_user, user->name)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
requestMicrophonePermissionOrFail(crl::guard(this, [=] {
|
requestMicrophonePermissionOrFail(crl::guard(this, [=] {
|
||||||
|
|
|
@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
#include "window/main_window.h"
|
#include "window/main_window.h"
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtWidgets/QDesktopWidget>
|
#include <QtWidgets/QDesktopWidget>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
@ -357,7 +358,7 @@ void Panel::initControls() {
|
||||||
if (!_call || update.peer != _call->user()) {
|
if (!_call || update.peer != _call->user()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_name->setText(App::peerName(_call->user()));
|
_name->setText(_call->user()->name);
|
||||||
updateControlsGeometry();
|
updateControlsGeometry();
|
||||||
}));
|
}));
|
||||||
_updateDurationTimer.setCallback([this] {
|
_updateDurationTimer.setCallback([this] {
|
||||||
|
@ -415,7 +416,7 @@ void Panel::reinitControls() {
|
||||||
st::callPanelSignalBars,
|
st::callPanelSignalBars,
|
||||||
[=] { rtlupdate(signalBarsRect()); });
|
[=] { rtlupdate(signalBarsRect()); });
|
||||||
|
|
||||||
_name->setText(App::peerName(_call->user()));
|
_name->setText(_call->user()->name);
|
||||||
updateStatusText(_call->state());
|
updateStatusText(_call->state());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -815,7 +816,7 @@ void Panel::leaveToChildEvent(QEvent *e, QWidget *child) {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Panel::tooltipText() const {
|
QString Panel::tooltipText() const {
|
||||||
return tr::lng_call_fingerprint_tooltip(tr::now, lt_user, App::peerName(_user));
|
return tr::lng_call_fingerprint_tooltip(tr::now, lt_user, _user->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QPoint Panel::tooltipPos() const {
|
QPoint Panel::tooltipPos() const {
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/abstract_box.h"
|
#include "boxes/abstract_box.h"
|
||||||
#include "base/timer.h"
|
#include "base/timer.h"
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_calls.h"
|
#include "styles/style_calls.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
|
@ -133,10 +134,10 @@ void TopBar::updateInfoLabels() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void TopBar::setInfoLabels() {
|
void TopBar::setInfoLabels() {
|
||||||
if (auto call = _call.get()) {
|
if (const auto call = _call.get()) {
|
||||||
auto user = call->user();
|
const auto user = call->user();
|
||||||
auto fullName = App::peerName(user);
|
const auto fullName = user->name;
|
||||||
auto shortName = user->firstName;
|
const auto shortName = user->firstName;
|
||||||
_fullInfoLabel->setText(fullName.toUpper());
|
_fullInfoLabel->setText(fullName.toUpper());
|
||||||
_shortInfoLabel->setText(shortName.toUpper());
|
_shortInfoLabel->setText(shortName.toUpper());
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "emoji_suggestions_helper.h"
|
#include "emoji_suggestions_helper.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "facades.h"
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace ChatHelpers {
|
namespace ChatHelpers {
|
||||||
|
|
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "main/main_account.h"
|
#include "main/main_account.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/event_filter.h"
|
#include "core/event_filter.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
|
|
@ -21,6 +21,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "chat_helpers/stickers.h"
|
#include "chat_helpers/stickers.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
|
@ -24,6 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "history/view/history_view_cursor_state.h"
|
#include "history/view/history_view_cursor_state.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "chat_helpers/tabbed_selector.h"
|
#include "chat_helpers/tabbed_selector.h"
|
||||||
#include "base/timer.h"
|
#include "base/timer.h"
|
||||||
#include "inline_bots/inline_bot_layout_item.h"
|
#include "inline_bots/inline_bot_layout_item.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
namespace InlineBots {
|
namespace InlineBots {
|
||||||
namespace Layout {
|
namespace Layout {
|
||||||
|
|
|
@ -22,6 +22,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
#include "lottie/lottie_single_player.h"
|
#include "lottie/lottie_single_player.h"
|
||||||
#include "lottie/lottie_multi_player.h"
|
#include "lottie/lottie_multi_player.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace Stickers {
|
namespace Stickers {
|
||||||
|
|
|
@ -17,6 +17,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "data/data_document.h"
|
#include "data/data_document.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
|
|
||||||
#include <QtCore/QBuffer>
|
#include <QtCore/QBuffer>
|
||||||
|
|
|
@ -31,6 +31,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "core/qt_signal_producer.h"
|
#include "core/qt_signal_producer.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
|
|
||||||
namespace ChatHelpers {
|
namespace ChatHelpers {
|
||||||
|
|
|
@ -61,6 +61,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "boxes/confirm_phone_box.h"
|
#include "boxes/confirm_phone_box.h"
|
||||||
#include "boxes/confirm_box.h"
|
#include "boxes/confirm_box.h"
|
||||||
#include "boxes/share_box.h"
|
#include "boxes/share_box.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtWidgets/QDesktopWidget>
|
#include <QtWidgets/QDesktopWidget>
|
||||||
#include <QtCore/QMimeDatabase>
|
#include <QtCore/QMimeDatabase>
|
||||||
|
|
|
@ -23,6 +23,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/tooltip.h"
|
#include "ui/widgets/tooltip.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtGui/QDesktopServices>
|
#include <QtGui/QDesktopServices>
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
|
@ -184,8 +186,8 @@ auto MentionNameClickHandler::getTextEntity() const -> TextEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MentionNameClickHandler::tooltip() const {
|
QString MentionNameClickHandler::tooltip() const {
|
||||||
if (auto user = Auth().data().userLoaded(_userId)) {
|
if (const auto user = Auth().data().userLoaded(_userId)) {
|
||||||
auto name = App::peerName(user);
|
const auto name = user->name;
|
||||||
if (name != _text) {
|
if (name != _text) {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "window/main_window.h"
|
#include "window/main_window.h"
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
#include "base/zlib_help.h"
|
#include "base/zlib_help.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtWidgets/QFileDialog>
|
#include <QtWidgets/QFileDialog>
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
#include <QtGui/QDesktopServices>
|
#include <QtGui/QDesktopServices>
|
||||||
#include <QtCore/QStandardPaths>
|
#include <QtCore/QStandardPaths>
|
||||||
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "core/sandbox.h"
|
#include "core/sandbox.h"
|
||||||
#include "platform/platform_specific.h"
|
#include "platform/platform_specific.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -24,6 +24,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/qthelp_url.h"
|
#include "base/qthelp_url.h"
|
||||||
#include "base/qthelp_regex.h"
|
#include "base/qthelp_regex.h"
|
||||||
#include "ui/effects/animations.h"
|
#include "ui/effects/animations.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtGui/QScreen>
|
#include <QtGui/QScreen>
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "media/player/media_player_instance.h"
|
#include "media/player/media_player_instance.h"
|
||||||
#include "platform/platform_info.h"
|
#include "platform/platform_info.h"
|
||||||
#include "base/parse_helper.h"
|
#include "base/parse_helper.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
#include <QtWidgets/QShortcut>
|
#include <QtWidgets/QShortcut>
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "info/settings/info_settings_widget.h"
|
#include "info/settings/info_settings_widget.h"
|
||||||
#include "window/window_session_controller.h"
|
#include "window/window_session_controller.h"
|
||||||
#include "settings/settings_intro.h"
|
#include "settings/settings_intro.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
#include <QtCore/QJsonObject>
|
#include <QtCore/QJsonObject>
|
||||||
|
|
|
@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/application.h" // Core::App().showTheme.
|
#include "core/application.h" // Core::App().showTheme.
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
|
@ -33,6 +33,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "lottie/lottie_animation.h"
|
#include "lottie/lottie_animation.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "base/flags.h"
|
#include "base/flags.h"
|
||||||
|
#include "base/binary_guard.h"
|
||||||
#include "data/data_types.h"
|
#include "data/data_types.h"
|
||||||
#include "ui/image/image.h"
|
#include "ui/image/image.h"
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "lottie/lottie_animation.h"
|
#include "lottie/lottie_animation.h"
|
||||||
#include "window/themes/window_theme_preview.h"
|
#include "window/themes/window_theme_preview.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtCore/QBuffer>
|
#include <QtCore/QBuffer>
|
||||||
#include <QtGui/QImageReader>
|
#include <QtGui/QImageReader>
|
||||||
|
|
|
@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ui/image/image.h"
|
#include "ui/image/image.h"
|
||||||
|
#include "base/binary_guard.h"
|
||||||
|
|
||||||
class DocumentData;
|
class DocumentData;
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
|
@ -40,6 +40,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
#include "storage/file_upload.h"
|
#include "storage/file_upload.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -28,6 +28,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
#include "history/view/history_view_element.h"
|
#include "history/view/history_view_element.h"
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/image/image_source.h"
|
#include "ui/image/image_source.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
PhotoData::PhotoData(not_null<Data::Session*> owner, PhotoId id)
|
PhotoData::PhotoData(not_null<Data::Session*> owner, PhotoId id)
|
||||||
: id(id)
|
: id(id)
|
||||||
|
|
|
@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
uint64 PtsWaiter::ptsKey(PtsSkippedQueue queue, int32 pts) {
|
uint64 PtsWaiter::ptsKey(PtsSkippedQueue queue, int32 pts) {
|
||||||
return _queue.insert(uint64(uint32(pts)) << 32 | (++_skippedKey), queue).key();
|
return _queue.insert(uint64(uint32(pts)) << 32 | (++_skippedKey), queue).key();
|
||||||
|
|
|
@ -48,6 +48,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_scheduled_messages.h"
|
#include "data/data_scheduled_messages.h"
|
||||||
#include "data/data_cloud_themes.h"
|
#include "data/data_cloud_themes.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_boxes.h" // st::backgroundSize
|
#include "styles/style_boxes.h" // st::backgroundSize
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
|
|
@ -11,6 +11,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "base/weak_ptr.h"
|
#include "base/weak_ptr.h"
|
||||||
#include "data/data_sparse_ids.h"
|
#include "data/data_sparse_ids.h"
|
||||||
|
|
||||||
|
class History;
|
||||||
|
|
||||||
std::optional<Storage::SharedMediaType> SharedMediaOverviewType(
|
std::optional<Storage::SharedMediaType> SharedMediaOverviewType(
|
||||||
Storage::SharedMediaType type);
|
Storage::SharedMediaType type);
|
||||||
void SharedMediaShowOverview(
|
void SharedMediaShowOverview(
|
||||||
|
|
|
@ -13,6 +13,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/text_options.h"
|
#include "ui/text_options.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "history/history_item.h"
|
#include "history/history_item.h"
|
||||||
#include "history/history.h"
|
#include "history/history.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_dialogs.h" // st::dialogsTextWidthMin
|
#include "styles/style_dialogs.h" // st::dialogsTextWidthMin
|
||||||
|
|
||||||
namespace Dialogs {
|
namespace Dialogs {
|
||||||
|
|
|
@ -41,6 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/widgets/multi_select.h"
|
#include "ui/widgets/multi_select.h"
|
||||||
#include "ui/empty_userpic.h"
|
#include "ui/empty_userpic.h"
|
||||||
#include "ui/unread_badge.h"
|
#include "ui/unread_badge.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_chat_helpers.h"
|
#include "styles/style_chat_helpers.h"
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
|
@ -2273,12 +2274,7 @@ void InnerWidget::refreshSearchInChatLabel() {
|
||||||
dialog,
|
dialog,
|
||||||
Ui::DialogTextOptions());
|
Ui::DialogTextOptions());
|
||||||
}
|
}
|
||||||
const auto from = [&] {
|
const auto from = _searchFromUser ? _searchFromUser->name : QString();
|
||||||
if (const auto from = _searchFromUser) {
|
|
||||||
return App::peerName(from);
|
|
||||||
}
|
|
||||||
return QString();
|
|
||||||
}();
|
|
||||||
if (!from.isEmpty()) {
|
if (!from.isEmpty()) {
|
||||||
const auto fromUserText = tr::lng_dlg_search_from(
|
const auto fromUserText = tr::lng_dlg_search_from(
|
||||||
tr::now,
|
tr::now,
|
||||||
|
|
|
@ -36,6 +36,7 @@ namespace Dialogs {
|
||||||
class Row;
|
class Row;
|
||||||
class FakeRow;
|
class FakeRow;
|
||||||
class IndexedList;
|
class IndexedList;
|
||||||
|
enum class Mode;
|
||||||
|
|
||||||
struct ChosenRow {
|
struct ChosenRow {
|
||||||
Key key;
|
Key key;
|
||||||
|
|
|
@ -27,6 +27,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_folder.h"
|
#include "data/data_folder.h"
|
||||||
#include "data/data_peer_values.h"
|
#include "data/data_peer_values.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
namespace Dialogs {
|
namespace Dialogs {
|
||||||
namespace Layout {
|
namespace Layout {
|
||||||
|
|
|
@ -38,7 +38,7 @@ QString ComposeFolderListEntryText(not_null<Data::Folder*> folder) {
|
||||||
list.size() - (throwAwayLastName ? 1 : 0)
|
list.size() - (throwAwayLastName ? 1 : 0)
|
||||||
);
|
);
|
||||||
const auto wrapName = [](not_null<History*> history) {
|
const auto wrapName = [](not_null<History*> history) {
|
||||||
const auto name = TextUtilities::Clean(App::peerName(history->peer));
|
const auto name = TextUtilities::Clean(history->peer->name);
|
||||||
return (history->unreadCount() > 0)
|
return (history->unreadCount() > 0)
|
||||||
? (textcmdStartSemibold()
|
? (textcmdStartSemibold()
|
||||||
+ textcmdLink(1, name)
|
+ textcmdLink(1, name)
|
||||||
|
|
|
@ -38,6 +38,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_folder.h"
|
#include "data/data_folder.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
|
@ -40,6 +40,7 @@ class ConnectionState;
|
||||||
|
|
||||||
namespace Dialogs {
|
namespace Dialogs {
|
||||||
|
|
||||||
|
enum class Mode;
|
||||||
struct RowDescriptor;
|
struct RowDescriptor;
|
||||||
class Row;
|
class Row;
|
||||||
class FakeRow;
|
class FakeRow;
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_export.h"
|
#include "styles/style_export.h"
|
||||||
#include "styles/style_boxes.h"
|
#include "styles/style_boxes.h"
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "export/export_settings.h"
|
#include "export/export_settings.h"
|
||||||
#include "ui/rp_widget.h"
|
#include "ui/rp_widget.h"
|
||||||
|
|
||||||
|
class BoxContent;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class VerticalLayout;
|
class VerticalLayout;
|
||||||
class Checkbox;
|
class Checkbox;
|
||||||
|
|
|
@ -182,38 +182,6 @@ void activateClickHandler(ClickHandlerPtr handler, Qt::MouseButton button) {
|
||||||
} // namespace App
|
} // namespace App
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
namespace internal {
|
|
||||||
|
|
||||||
void showBox(
|
|
||||||
object_ptr<BoxContent> content,
|
|
||||||
LayerOptions options,
|
|
||||||
anim::type animated) {
|
|
||||||
if (auto w = App::wnd()) {
|
|
||||||
w->ui_showBox(std::move(content), options, animated);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace internal
|
|
||||||
|
|
||||||
void hideLayer(anim::type animated) {
|
|
||||||
if (auto w = App::wnd()) {
|
|
||||||
w->ui_showBox(
|
|
||||||
{ nullptr },
|
|
||||||
LayerOption::CloseOther,
|
|
||||||
animated);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void hideSettingsAndLayer(anim::type animated) {
|
|
||||||
if (auto w = App::wnd()) {
|
|
||||||
w->ui_hideSettingsAndLayer(animated);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isLayerShown() {
|
|
||||||
if (auto w = App::wnd()) return w->ui_isLayerShown();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void showPeerProfile(const PeerId &peer) {
|
void showPeerProfile(const PeerId &peer) {
|
||||||
if (const auto window = App::wnd()) {
|
if (const auto window = App::wnd()) {
|
||||||
|
|
|
@ -9,8 +9,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
|
|
||||||
#include "base/type_traits.h"
|
#include "base/type_traits.h"
|
||||||
#include "base/observer.h"
|
#include "base/observer.h"
|
||||||
|
#include "ui/effects/animation_value.h"
|
||||||
|
|
||||||
class BoxContent;
|
class History;
|
||||||
|
|
||||||
namespace Data {
|
namespace Data {
|
||||||
struct FileOrigin;
|
struct FileOrigin;
|
||||||
|
@ -78,38 +79,9 @@ void activateClickHandler(ClickHandlerPtr handler, Qt::MouseButton button);
|
||||||
|
|
||||||
} // namespace App
|
} // namespace App
|
||||||
|
|
||||||
|
|
||||||
enum class LayerOption {
|
|
||||||
CloseOther = (1 << 0),
|
|
||||||
KeepOther = (1 << 1),
|
|
||||||
ShowAfterOther = (1 << 2),
|
|
||||||
};
|
|
||||||
using LayerOptions = base::flags<LayerOption>;
|
|
||||||
inline constexpr auto is_flag_type(LayerOption) { return true; };
|
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
namespace internal {
|
|
||||||
|
|
||||||
void showBox(
|
// Legacy global methods.
|
||||||
object_ptr<BoxContent> content,
|
|
||||||
LayerOptions options,
|
|
||||||
anim::type animated);
|
|
||||||
|
|
||||||
} // namespace internal
|
|
||||||
|
|
||||||
template <typename BoxType>
|
|
||||||
QPointer<BoxType> show(
|
|
||||||
object_ptr<BoxType> content,
|
|
||||||
LayerOptions options = LayerOption::CloseOther,
|
|
||||||
anim::type animated = anim::type::normal) {
|
|
||||||
auto result = QPointer<BoxType>(content.data());
|
|
||||||
internal::showBox(std::move(content), options, animated);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hideLayer(anim::type animated = anim::type::normal);
|
|
||||||
void hideSettingsAndLayer(anim::type animated = anim::type::normal);
|
|
||||||
bool isLayerShown();
|
|
||||||
|
|
||||||
void showPeerProfile(const PeerId &peer);
|
void showPeerProfile(const PeerId &peer);
|
||||||
void showPeerProfile(const PeerData *peer);
|
void showPeerProfile(const PeerData *peer);
|
||||||
|
|
|
@ -42,6 +42,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_media_types.h"
|
#include "data/data_media_types.h"
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
|
|
|
@ -23,6 +23,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "core/application.h"
|
#include "core/application.h"
|
||||||
#include "mainwindow.h" // App::wnd()->sessionController
|
#include "mainwindow.h" // App::wnd()->sessionController
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "facades.h"
|
||||||
|
|
||||||
namespace AdminLog {
|
namespace AdminLog {
|
||||||
namespace {
|
namespace {
|
||||||
|
@ -241,7 +242,7 @@ TextWithEntities GenerateBannedChangeText(
|
||||||
auto GenerateUserString(MTPint userId) {
|
auto GenerateUserString(MTPint userId) {
|
||||||
// User name in "User name (@username)" format with entities.
|
// User name in "User name (@username)" format with entities.
|
||||||
auto user = Auth().data().user(userId.v);
|
auto user = Auth().data().user(userId.v);
|
||||||
auto name = TextWithEntities { App::peerName(user) };
|
auto name = TextWithEntities { user->name };
|
||||||
auto entityData = QString::number(user->id)
|
auto entityData = QString::number(user->id)
|
||||||
+ '.'
|
+ '.'
|
||||||
+ QString::number(user->accessHash());
|
+ QString::number(user->accessHash());
|
||||||
|
@ -383,7 +384,7 @@ void GenerateItems(
|
||||||
};
|
};
|
||||||
|
|
||||||
using Flag = MTPDmessage::Flag;
|
using Flag = MTPDmessage::Flag;
|
||||||
auto fromName = App::peerName(from);
|
auto fromName = from->name;
|
||||||
auto fromLink = from->createOpenLink();
|
auto fromLink = from->createOpenLink();
|
||||||
auto fromLinkText = textcmdLink(1, fromName);
|
auto fromLinkText = textcmdLink(1, fromName);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
class History;
|
||||||
|
|
||||||
namespace HistoryView {
|
namespace HistoryView {
|
||||||
class ElementDelegate;
|
class ElementDelegate;
|
||||||
class Element;
|
class Element;
|
||||||
|
|
|
@ -26,6 +26,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
#include "data/data_session.h"
|
#include "data/data_session.h"
|
||||||
#include "lang/lang_keys.h"
|
#include "lang/lang_keys.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "styles/style_window.h"
|
#include "styles/style_window.h"
|
||||||
#include "styles/style_info.h"
|
#include "styles/style_info.h"
|
||||||
|
|
|
@ -40,8 +40,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "ui/text_options.h"
|
#include "ui/text_options.h"
|
||||||
#include "core/crash_reports.h"
|
#include "core/crash_reports.h"
|
||||||
#include "base/unixtime.h"
|
#include "base/unixtime.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "apiwrap.h"
|
#include "apiwrap.h"
|
||||||
#include "mainwidget.h"
|
#include "mainwidget.h"
|
||||||
|
#include "app.h"
|
||||||
#include "ui/widgets/shadow.h"
|
#include "ui/widgets/shadow.h"
|
||||||
|
|
||||||
DragArea::DragArea(QWidget *parent) : TWidget(parent) {
|
DragArea::DragArea(QWidget *parent) : TWidget(parent) {
|
||||||
|
|
|
@ -49,6 +49,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_poll.h"
|
#include "data/data_poll.h"
|
||||||
#include "data/data_photo.h"
|
#include "data/data_photo.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
|
|
||||||
#include <QtGui/QClipboard>
|
#include <QtGui/QClipboard>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct StateRequest;
|
||||||
enum class CursorState : char;
|
enum class CursorState : char;
|
||||||
enum class PointState : char;
|
enum class PointState : char;
|
||||||
class EmptyPainter;
|
class EmptyPainter;
|
||||||
|
class Element;
|
||||||
} // namespace HistoryView
|
} // namespace HistoryView
|
||||||
|
|
||||||
namespace Window {
|
namespace Window {
|
||||||
|
|
|
@ -41,6 +41,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_chat.h"
|
#include "data/data_chat.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "observer_peer.h"
|
#include "observer_peer.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,7 @@ class ElementDelegate;
|
||||||
} // namespace HistoryView
|
} // namespace HistoryView
|
||||||
|
|
||||||
struct HiddenSenderInfo;
|
struct HiddenSenderInfo;
|
||||||
|
class History;
|
||||||
|
|
||||||
class HistoryItem : public RuntimeComposer<HistoryItem> {
|
class HistoryItem : public RuntimeComposer<HistoryItem> {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -24,9 +24,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
#include "data/data_file_origin.h"
|
#include "data/data_file_origin.h"
|
||||||
#include "main/main_session.h"
|
#include "main/main_session.h"
|
||||||
|
#include "window/window_session_controller.h"
|
||||||
|
#include "facades.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
#include "window/window_session_controller.h"
|
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
|
|
||||||
|
@ -113,7 +114,7 @@ void HistoryMessageForwarded::create(const HistoryMessageVia *via) const {
|
||||||
&& originalSender->isChannel()
|
&& originalSender->isChannel()
|
||||||
&& !originalSender->isMegagroup();
|
&& !originalSender->isMegagroup();
|
||||||
const auto name = originalSender
|
const auto name = originalSender
|
||||||
? App::peerName(originalSender)
|
? originalSender->name
|
||||||
: hiddenSenderInfo->name;
|
: hiddenSenderInfo->name;
|
||||||
if (!originalAuthor.isEmpty()) {
|
if (!originalAuthor.isEmpty()) {
|
||||||
phrase = tr::lng_forwarded_signed(
|
phrase = tr::lng_forwarded_signed(
|
||||||
|
@ -258,12 +259,9 @@ void HistoryMessageReply::updateName() const {
|
||||||
}
|
}
|
||||||
return replyToMsg->author().get();
|
return replyToMsg->author().get();
|
||||||
}();
|
}();
|
||||||
const auto name = [&] {
|
const auto name = (replyToVia && from->isUser())
|
||||||
if (replyToVia && from->isUser()) {
|
? from->asUser()->firstName
|
||||||
return from->asUser()->firstName;
|
: from->name;
|
||||||
}
|
|
||||||
return App::peerName(from);
|
|
||||||
}();
|
|
||||||
replyToName.setText(st::fwdTextStyle, name, Ui::NameTextOptions());
|
replyToName.setText(st::fwdTextStyle, name, Ui::NameTextOptions());
|
||||||
replyToVersion = replyToMsg->author()->nameVersion;
|
replyToVersion = replyToMsg->author()->nameVersion;
|
||||||
bool hasPreview = replyToMsg->media() ? replyToMsg->media()->hasReplyPreview() : false;
|
bool hasPreview = replyToMsg->media() ? replyToMsg->media()->hasReplyPreview() : false;
|
||||||
|
|
|
@ -36,6 +36,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
#include "data/data_media_types.h"
|
#include "data/data_media_types.h"
|
||||||
#include "data/data_channel.h"
|
#include "data/data_channel.h"
|
||||||
#include "data/data_user.h"
|
#include "data/data_user.h"
|
||||||
|
#include "facades.h"
|
||||||
|
#include "app.h"
|
||||||
#include "styles/style_dialogs.h"
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
#include "styles/style_history.h"
|
#include "styles/style_history.h"
|
||||||
|
@ -224,7 +226,7 @@ void FastShareMessage(not_null<HistoryItem*> item) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
auto submitCallback = [=](
|
auto submitCallback = [=](
|
||||||
QVector<PeerData*> &&result,
|
std::vector<not_null<PeerData*>> &&result,
|
||||||
TextWithTags &&comment,
|
TextWithTags &&comment,
|
||||||
Api::SendOptions options) {
|
Api::SendOptions options) {
|
||||||
if (!data->requests.empty()) {
|
if (!data->requests.empty()) {
|
||||||
|
@ -251,7 +253,7 @@ void FastShareMessage(not_null<HistoryItem*> item) {
|
||||||
auto text = TextWithEntities();
|
auto text = TextWithEntities();
|
||||||
if (result.size() > 1) {
|
if (result.size() > 1) {
|
||||||
text.append(
|
text.append(
|
||||||
Ui::Text::Bold(App::peerName(error.second))
|
Ui::Text::Bold(error.second->name)
|
||||||
).append("\n\n");
|
).append("\n\n");
|
||||||
}
|
}
|
||||||
text.append(error.first);
|
text.append(error.first);
|
||||||
|
@ -1312,7 +1314,7 @@ QString HistoryMessage::notificationHeader() const {
|
||||||
if (out() && isFromScheduled() && !_history->peer->isSelf()) {
|
if (out() && isFromScheduled() && !_history->peer->isSelf()) {
|
||||||
return tr::lng_from_you(tr::now);
|
return tr::lng_from_you(tr::now);
|
||||||
} else if (!_history->peer->isUser() && !isPost()) {
|
} else if (!_history->peer->isUser() && !isPost()) {
|
||||||
return App::peerName(from());
|
return from()->name;
|
||||||
}
|
}
|
||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ void HistoryService::setMessageByAction(const MTPmessageAction &action) {
|
||||||
result.text = tr::lng_action_secure_values_sent(
|
result.text = tr::lng_action_secure_values_sent(
|
||||||
tr::now,
|
tr::now,
|
||||||
lt_user,
|
lt_user,
|
||||||
textcmdLink(1, App::peerName(history()->peer)),
|
textcmdLink(1, history()->peer->name),
|
||||||
lt_documents,
|
lt_documents,
|
||||||
documents.join(", "));
|
documents.join(", "));
|
||||||
return result;
|
return result;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue