Get GApplication out of experimental settings

GApplication will always be used on Linux now. GNotification gets a toggle instead.
This commit is contained in:
Ilya Fedin 2023-01-12 21:06:32 +04:00 committed by John Preston
parent 2887c0b564
commit a1f9b5a96f
3 changed files with 5 additions and 2 deletions

View file

@ -389,7 +389,9 @@ NotificationData::NotificationData(
NotificationId id) NotificationId id)
: _manager(manager) : _manager(manager)
, _id(id) , _id(id)
, _application(UseGNotification() ? Gio::Application::get_default() : {}) { , _application(UseGNotification()
? Gio::Application::get_default()
: nullptr) {
} }
bool NotificationData::init( bool NotificationData::init(

View file

@ -148,7 +148,7 @@ void SetupExperimental(
addToggle(Settings::kOptionMonoSettingsIcons); addToggle(Settings::kOptionMonoSettingsIcons);
addToggle(Webview::kOptionWebviewDebugEnabled); addToggle(Webview::kOptionWebviewDebugEnabled);
addToggle(kOptionAutoScrollInactiveChat); addToggle(kOptionAutoScrollInactiveChat);
addToggle(Windows::Notifications::kOptionGNotification); addToggle(Window::Notifications::kOptionGNotification);
} }
} // namespace } // namespace

View file

@ -7,6 +7,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/ */
#include "window/notifications_manager.h" #include "window/notifications_manager.h"
#include "base/options.h"
#include "platform/platform_notifications_manager.h" #include "platform/platform_notifications_manager.h"
#include "window/notifications_manager_default.h" #include "window/notifications_manager_default.h"
#include "media/audio/media_audio_track.h" #include "media/audio/media_audio_track.h"