diff --git a/Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.cpp b/Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.cpp index 95c72047c..e6bda1eb0 100644 --- a/Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.cpp +++ b/Telegram/SourceFiles/platform/linux/linux_gsd_media_keys.cpp @@ -23,7 +23,6 @@ namespace Platform { namespace internal { namespace { -constexpr auto kDBusTimeout = 30000; constexpr auto kService = "org.gnome.SettingsDaemon.MediaKeys"_cs; constexpr auto kOldService = "org.gnome.SettingsDaemon"_cs; constexpr auto kMATEService = "org.mate.SettingsDaemon"_cs; @@ -114,7 +113,7 @@ GSDMediaKeys::GSDMediaKeys() { 0), nullptr, G_DBUS_CALL_FLAGS_NONE, - kDBusTimeout, + -1, nullptr, &error); @@ -160,7 +159,7 @@ GSDMediaKeys::~GSDMediaKeys() { QCoreApplication::applicationName().toUtf8().constData()), nullptr, G_DBUS_CALL_FLAGS_NONE, - kDBusTimeout, + -1, nullptr, &error); diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 4a572d841..5d47ca8c2 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -37,13 +37,10 @@ namespace Platform { namespace Notifications { namespace { -constexpr auto kDBusTimeout = 30000; constexpr auto kService = "org.freedesktop.Notifications"_cs; constexpr auto kObjectPath = "/org/freedesktop/Notifications"_cs; constexpr auto kInterface = kService; constexpr auto kPropertiesInterface = "org.freedesktop.DBus.Properties"_cs; -constexpr auto kImageDataType = "(iiibii@ay)"_cs; -constexpr auto kNotifyArgsType = "(susssasa{sv}i)"_cs; struct ServerInformation { QString name; @@ -143,7 +140,7 @@ void GetInhibitionSupported(Fn callback) { qsl("Get")); message.setArguments({ - qsl("org.freedesktop.Notifications"), + kInterface.utf16(), qsl("Inhibited") }); @@ -178,7 +175,7 @@ bool Inhibited() { qsl("Get")); message.setArguments({ - qsl("org.freedesktop.Notifications"), + kInterface.utf16(), qsl("Inhibited") }); @@ -487,7 +484,7 @@ void NotificationData::show() { kInterface.utf8(), "Notify", g_variant_new( - kNotifyArgsType.utf8(), + "(susssasa{sv}i)", AppName.utf8().constData(), 0, iconName.toUtf8().constData(), @@ -498,7 +495,7 @@ void NotificationData::show() { -1), nullptr, G_DBUS_CALL_FLAGS_NONE, - kDBusTimeout, + -1, nullptr, notificationShown, this); @@ -560,7 +557,7 @@ void NotificationData::setImage(const QString &imagePath) { _image = QImage(imagePath).convertToFormat(QImage::Format_RGBA8888); _hints.emplace(_imageKey, g_variant_new( - kImageDataType.utf8(), + "(iiibii@ay)", _image.width(), _image.height(), _image.bytesPerLine(),