From 9ab221d4c9d6d024fe292331befc23293fe70865 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Mon, 26 Oct 2020 07:43:45 +0400 Subject: [PATCH] Remove Platform:: where is not needed in linux platform files Fix lines length in notifications_manager_linux.cpp --- .../SourceFiles/platform/linux/linux_libs.cpp | 8 ++++---- .../linux/notifications_manager_linux.cpp | 17 +++++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp index a57cf7a0f7..50f53f37a3 100644 --- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp @@ -115,7 +115,7 @@ bool setupGtkBase(QLibrary &lib_gtk) { // Otherwise we get segfault in Ubuntu 17.04 in gtk_init_check() call. // See https://github.com/telegramdesktop/tdesktop/issues/3176 // See https://github.com/telegramdesktop/tdesktop/issues/3162 - if(Platform::IsWayland()) { + if(IsWayland()) { DEBUG_LOG(("Limit allowed GDK backends to wayland,x11")); gdk_set_allowed_backends("wayland,x11"); } else { @@ -176,7 +176,7 @@ void SetIconTheme() { DEBUG_LOG(("New icon theme: %1").arg(QIcon::themeName())); DEBUG_LOG(("New fallback icon theme: %1").arg(QIcon::fallbackThemeName())); - Platform::SetApplicationIcon(Window::CreateIcon()); + SetApplicationIcon(Window::CreateIcon()); if (App::wnd()) { App::wnd()->setWindowIcon(Window::CreateIcon()); } @@ -188,13 +188,13 @@ void SetIconTheme() { void DarkModeChanged() { Core::Sandbox::Instance().customEnterFromEventLoop([] { - Core::App().settings().setSystemDarkMode(Platform::IsDarkMode()); + Core::App().settings().setSystemDarkMode(IsDarkMode()); }); } void DecorationLayoutChanged() { Core::Sandbox::Instance().customEnterFromEventLoop([] { - Core::App().settings().setWindowControlsLayout(Platform::WindowControlsLayout()); + Core::App().settings().setWindowControlsLayout(WindowControlsLayout()); }); } #endif // !TDESKTOP_DISABLE_GTK_INTEGRATION diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 1a0b1bc18c..b4a0d8f831 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -87,8 +87,7 @@ void GetSupported() { } Checked = true; - if (Core::App().settings().nativeNotifications() - && !Platform::IsWayland()) { + if (Core::App().settings().nativeNotifications() && !IsWayland()) { ComputeSupported(true); } else { ComputeSupported(); @@ -402,15 +401,21 @@ NotificationData::NotificationData( NotificationData::~NotificationData() { if (_dbusConnection) { if (_actionInvokedSignalId != 0) { - g_dbus_connection_signal_unsubscribe(_dbusConnection, _actionInvokedSignalId); + g_dbus_connection_signal_unsubscribe( + _dbusConnection, + _actionInvokedSignalId); } if (_notificationRepliedSignalId != 0) { - g_dbus_connection_signal_unsubscribe(_dbusConnection, _notificationRepliedSignalId); + g_dbus_connection_signal_unsubscribe( + _dbusConnection, + _notificationRepliedSignalId); } if (_notificationClosedSignalId != 0) { - g_dbus_connection_signal_unsubscribe(_dbusConnection, _notificationClosedSignalId); + g_dbus_connection_signal_unsubscribe( + _dbusConnection, + _notificationClosedSignalId); } g_object_unref(_dbusConnection); @@ -647,7 +652,7 @@ std::unique_ptr Create( #endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION if ((Core::App().settings().nativeNotifications() && Supported()) - || Platform::IsWayland()) { + || IsWayland()) { return std::make_unique(system); }