mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 07:25:46 +00:00
Move many widget classes to lib_ui.
This commit is contained in:
@@ -19,6 +19,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "core/sandbox.h"
|
||||
#include "core/local_url_handlers.h"
|
||||
#include "core/launcher.h"
|
||||
#include "core/core_ui_integration.h"
|
||||
#include "chat_helpers/emoji_keywords.h"
|
||||
#include "storage/localstorage.h"
|
||||
#include "platform/platform_specific.h"
|
||||
@@ -80,6 +81,7 @@ Application *Application::Instance = nullptr;
|
||||
|
||||
struct Application::Private {
|
||||
base::Timer quitTimer;
|
||||
UiIntegration uiIntegration;
|
||||
};
|
||||
|
||||
Application::Application(not_null<Launcher*> launcher)
|
||||
@@ -98,6 +100,8 @@ Application::Application(not_null<Launcher*> launcher)
|
||||
Expects(!_logo.isNull());
|
||||
Expects(!_logoNoMargin.isNull());
|
||||
|
||||
Ui::Integration::Set(&_private->uiIntegration);
|
||||
|
||||
activeAccount().sessionChanges(
|
||||
) | rpl::start_with_next([=] {
|
||||
if (_mediaView) {
|
||||
@@ -778,25 +782,6 @@ void Application::refreshGlobalProxy() {
|
||||
Sandbox::Instance().refreshGlobalProxy();
|
||||
}
|
||||
|
||||
void Application::activateWindowDelayed(not_null<QWidget*> widget) {
|
||||
Sandbox::Instance().activateWindowDelayed(widget);
|
||||
}
|
||||
|
||||
void Application::pauseDelayedWindowActivations() {
|
||||
Sandbox::Instance().pauseDelayedWindowActivations();
|
||||
}
|
||||
|
||||
void Application::resumeDelayedWindowActivations() {
|
||||
Sandbox::Instance().resumeDelayedWindowActivations();
|
||||
}
|
||||
|
||||
void Application::preventWindowActivation() {
|
||||
pauseDelayedWindowActivations();
|
||||
postponeCall([=] {
|
||||
resumeDelayedWindowActivations();
|
||||
});
|
||||
}
|
||||
|
||||
void Application::QuitAttempt() {
|
||||
auto prevents = false;
|
||||
if (IsAppLaunched()
|
||||
@@ -871,19 +856,3 @@ Application &App() {
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
|
||||
namespace Ui {
|
||||
|
||||
void PostponeCall(FnMut<void()> &&callable) {
|
||||
Core::App().postponeCall(std::move(callable));
|
||||
}
|
||||
|
||||
void RegisterLeaveSubscription(not_null<QWidget*> widget) {
|
||||
Core::App().registerLeaveSubscription(widget);
|
||||
}
|
||||
|
||||
void UnregisterLeaveSubscription(not_null<QWidget*> widget) {
|
||||
Core::App().unregisterLeaveSubscription(widget);
|
||||
}
|
||||
|
||||
} // namespace Ui
|
||||
|
Reference in New Issue
Block a user