From a1f9b5a96ff5394f3283e15ab659d10803dd0b98 Mon Sep 17 00:00:00 2001 From: Ilya Fedin <fedin-ilja2010@ya.ru> Date: Thu, 12 Jan 2023 21:06:32 +0400 Subject: [PATCH] Get GApplication out of experimental settings GApplication will always be used on Linux now. GNotification gets a toggle instead. --- .../platform/linux/notifications_manager_linux.cpp | 4 +++- Telegram/SourceFiles/settings/settings_experimental.cpp | 2 +- Telegram/SourceFiles/window/notifications_manager.cpp | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 53b47b185..1bc1e3156 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -389,7 +389,9 @@ NotificationData::NotificationData( NotificationId id) : _manager(manager) , _id(id) -, _application(UseGNotification() ? Gio::Application::get_default() : {}) { +, _application(UseGNotification() + ? Gio::Application::get_default() + : nullptr) { } bool NotificationData::init( diff --git a/Telegram/SourceFiles/settings/settings_experimental.cpp b/Telegram/SourceFiles/settings/settings_experimental.cpp index 209260059..61163ac90 100644 --- a/Telegram/SourceFiles/settings/settings_experimental.cpp +++ b/Telegram/SourceFiles/settings/settings_experimental.cpp @@ -148,7 +148,7 @@ void SetupExperimental( addToggle(Settings::kOptionMonoSettingsIcons); addToggle(Webview::kOptionWebviewDebugEnabled); addToggle(kOptionAutoScrollInactiveChat); - addToggle(Windows::Notifications::kOptionGNotification); + addToggle(Window::Notifications::kOptionGNotification); } } // namespace diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 665b2d754..7960d8608 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL */ #include "window/notifications_manager.h" +#include "base/options.h" #include "platform/platform_notifications_manager.h" #include "window/notifications_manager_default.h" #include "media/audio/media_audio_track.h"