mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 16:13:46 +08:00
Moved WorkMode global variable from facades to core settings.
This commit is contained in:
@@ -17,6 +17,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "main/main_session.h"
|
||||
#include "mainwindow.h"
|
||||
#include "core/application.h"
|
||||
#include "core/core_settings.h"
|
||||
#include "core/sandbox.h"
|
||||
#include "boxes/peer_list_controllers.h"
|
||||
#include "boxes/about_box.h"
|
||||
@@ -28,7 +29,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/event_filter.h"
|
||||
#include "ui/widgets/popup_menu.h"
|
||||
#include "ui/widgets/input_fields.h"
|
||||
#include "facades.h"
|
||||
#include "app.h"
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -809,7 +809,7 @@ void MainWindow::handleSNIHostRegistered() {
|
||||
|
||||
_sniAvailable = true;
|
||||
|
||||
if (Global::WorkMode().value() == dbiwmWindowOnly) {
|
||||
if (Core::App().settings().workMode() == dbiwmWindowOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -825,7 +825,7 @@ void MainWindow::handleSNIHostRegistered() {
|
||||
|
||||
SkipTaskbar(
|
||||
windowHandle(),
|
||||
Global::WorkMode().value() == dbiwmTrayOnly);
|
||||
Core::App().settings().workMode() == dbiwmTrayOnly);
|
||||
}
|
||||
|
||||
void MainWindow::handleSNIOwnerChanged(
|
||||
@@ -834,7 +834,7 @@ void MainWindow::handleSNIOwnerChanged(
|
||||
const QString &newOwner) {
|
||||
_sniAvailable = IsSNIAvailable();
|
||||
|
||||
if (Global::WorkMode().value() == dbiwmWindowOnly) {
|
||||
if (Core::App().settings().workMode() == dbiwmWindowOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -860,7 +860,8 @@ void MainWindow::handleSNIOwnerChanged(
|
||||
|
||||
SkipTaskbar(
|
||||
windowHandle(),
|
||||
(Global::WorkMode().value() == dbiwmTrayOnly) && trayAvailable());
|
||||
(Core::App().settings().workMode() == dbiwmTrayOnly)
|
||||
&& trayAvailable());
|
||||
}
|
||||
|
||||
void MainWindow::handleAppMenuOwnerChanged(
|
||||
@@ -1330,7 +1331,7 @@ void MainWindow::handleNativeSurfaceChanged(bool exist) {
|
||||
if (exist) {
|
||||
SkipTaskbar(
|
||||
windowHandle(),
|
||||
(Global::WorkMode().value() == dbiwmTrayOnly)
|
||||
(Core::App().settings().workMode() == dbiwmTrayOnly)
|
||||
&& trayAvailable());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user