From 5887cac8471b74d36995aa2a1e045c37cee5206a Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Sat, 4 Feb 2023 21:19:45 +1000 Subject: [PATCH] Telegram: bump version --- ....5.3.patchset => libtgvoip-4.6.0.patchset} | 4 +- ...tchset => telegram_desktop-4.6.0.patchset} | 70 +++++++++++-------- ...3.recipe => telegram_desktop-4.6.0.recipe} | 2 +- 3 files changed, 44 insertions(+), 32 deletions(-) rename net-im/telegram-desktop/patches/{libtgvoip-4.5.3.patchset => libtgvoip-4.6.0.patchset} (99%) rename net-im/telegram-desktop/patches/{telegram_desktop-4.5.3.patchset => telegram_desktop-4.6.0.patchset} (93%) rename net-im/telegram-desktop/{telegram_desktop-4.5.3.recipe => telegram_desktop-4.6.0.recipe} (98%) diff --git a/net-im/telegram-desktop/patches/libtgvoip-4.5.3.patchset b/net-im/telegram-desktop/patches/libtgvoip-4.6.0.patchset similarity index 99% rename from net-im/telegram-desktop/patches/libtgvoip-4.5.3.patchset rename to net-im/telegram-desktop/patches/libtgvoip-4.6.0.patchset index fc4825b8b..dcdf6c58b 100644 --- a/net-im/telegram-desktop/patches/libtgvoip-4.5.3.patchset +++ b/net-im/telegram-desktop/patches/libtgvoip-4.6.0.patchset @@ -1,6 +1,6 @@ -From 49eb4f90ccd75a777585500a576d64f7b9e7f479 Mon Sep 17 00:00:00 2001 +From 75eb1b1d6f5b7b272bcb8079ae5b39d0feda4425 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 4 Jan 2023 11:33:37 +1000 +Date: Sat, 4 Feb 2023 18:40:09 +1000 Subject: Add Haiku support diff --git a/net-im/telegram-desktop/patches/telegram_desktop-4.5.3.patchset b/net-im/telegram-desktop/patches/telegram_desktop-4.6.0.patchset similarity index 93% rename from net-im/telegram-desktop/patches/telegram_desktop-4.5.3.patchset rename to net-im/telegram-desktop/patches/telegram_desktop-4.6.0.patchset index 5399d555a..bb15d3a70 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-4.5.3.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-4.6.0.patchset @@ -1,14 +1,14 @@ -From 83b0bb3918e3962eb65232c0bb609b7f47fc00d5 Mon Sep 17 00:00:00 2001 +From 915ecb84b86d8dc1e2089d857629f39bb0d4ad51 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Wed, 4 Jan 2023 11:33:57 +1000 +Date: Sat, 4 Feb 2023 18:42:32 +1000 Subject: Add Haiku support diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index 8f05bd4..8485d2e 100644 +index 9233855..620be7d 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt -@@ -91,6 +91,15 @@ PRIVATE +@@ -90,6 +90,15 @@ PRIVATE desktop-app::external_xxhash ) @@ -24,7 +24,7 @@ index 8f05bd4..8485d2e 100644 target_precompile_headers(Telegram PRIVATE $<$:${src_loc}/stdafx.h>) nice_target_sources(Telegram ${src_loc} PRIVATE -@@ -1387,6 +1396,16 @@ else() +@@ -1403,6 +1412,16 @@ else() ) endif() @@ -41,7 +41,7 @@ index 8f05bd4..8485d2e 100644 if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION) remove_target_sources(Telegram ${src_loc} platform/linux/linux_wayland_integration.cpp -@@ -1535,7 +1554,7 @@ if (build_macstore) +@@ -1551,7 +1570,7 @@ if (build_macstore) else() set(bundle_identifier "com.tdesktop.Telegram$<$:Debug>") set(bundle_entitlements "Telegram.entitlements") @@ -71,10 +71,10 @@ index aad0723..c58929f 100644 if (const auto strong = weak.get()) { showBox(Box(SettingsBox, strong)); diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h -index 652269a..059c536 100644 +index 95490bb..b06406d 100644 --- a/Telegram/SourceFiles/core/core_settings.h +++ b/Telegram/SourceFiles/core/core_settings.h -@@ -824,7 +824,7 @@ private: +@@ -853,7 +853,7 @@ private: rpl::variable _dialogsWidthRatio; // per-window rpl::variable _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w bool _notifyFromAll = true; @@ -82,12 +82,12 @@ index 652269a..059c536 100644 + rpl::variable _nativeWindowFrame = true; rpl::variable> _systemDarkMode = std::nullopt; rpl::variable _systemDarkModeEnabled = false; - WindowPosition _windowPosition; // per-window + rpl::variable _windowTitleContent; diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp -index d793609..a9c3d6f 100644 +index aec7dba..985cf88 100644 --- a/Telegram/SourceFiles/core/sandbox.cpp +++ b/Telegram/SourceFiles/core/sandbox.cpp -@@ -248,9 +248,12 @@ Sandbox::~Sandbox() = default; +@@ -260,9 +260,12 @@ Sandbox::~Sandbox() = default; bool Sandbox::event(QEvent *e) { if (e->type() == QEvent::Quit && !Quitting()) { @@ -103,7 +103,7 @@ index d793609..a9c3d6f 100644 } else if (e->type() == QEvent::Close) { Quit(); } -@@ -260,7 +263,7 @@ bool Sandbox::event(QEvent *e) { +@@ -272,7 +275,7 @@ bool Sandbox::event(QEvent *e) { void Sandbox::socketConnected() { LOG(("Socket connected, this is not the first application instance, sending show command...")); _secondInstance = true; @@ -157,7 +157,7 @@ index b90b70a..9c6a202 100644 if (internal::ShowXDPOpenWithDialog(filepath)) { return true; diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp -index 01c5ab5..c1e7a04 100644 +index ada8cd6..0f19120 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -39,6 +39,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL @@ -182,23 +182,22 @@ index 01c5ab5..c1e7a04 100644 +#endif + void MainWindow::unreadCounterChangedHook() { - updateIconCounters(); + updateUnityCounter(); } diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h -index aa563d4..f7aa7d9 100644 +index 8b74da5..905f987 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.h +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h -@@ -21,7 +21,9 @@ namespace Platform { +@@ -21,6 +21,9 @@ namespace Platform { class MainWindow : public Window::MainWindow { public: explicit MainWindow(not_null controller); -- +#ifdef Q_OS_HAIKU + bool isActiveForTrayMenu() override; +#endif ~MainWindow(); - protected: + void updateWindowIcon() override; diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp new file mode 100644 index 0000000..f01fa5c @@ -484,7 +483,7 @@ index 0000000..f01fa5c +} // namespace Notifications +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp -index 980bdcd..8cb3a5e 100644 +index 6eba0da..31e486e 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -34,6 +34,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL @@ -532,7 +531,7 @@ index 980bdcd..8cb3a5e 100644 constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs; #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION -@@ -620,6 +651,9 @@ std::optional IsDarkMode() { +@@ -603,6 +634,9 @@ std::optional IsDarkMode() { } bool AutostartSupported() { @@ -542,7 +541,7 @@ index 980bdcd..8cb3a5e 100644 #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION return true; #else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION -@@ -628,6 +662,10 @@ bool AutostartSupported() { +@@ -611,6 +645,10 @@ bool AutostartSupported() { } void AutostartToggle(bool enabled, Fn done) { @@ -553,7 +552,7 @@ index 980bdcd..8cb3a5e 100644 #ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION const auto success = [&] { const auto silent = !done; -@@ -702,7 +740,11 @@ QString psAppDataPath() { +@@ -681,7 +719,11 @@ QString psAppDataPath() { } } @@ -565,7 +564,7 @@ index 980bdcd..8cb3a5e 100644 } void psDoCleanup() { -@@ -885,6 +927,7 @@ bool OpenSystemSettings(SystemSettingsType type) { +@@ -823,6 +865,7 @@ bool OpenSystemSettings(SystemSettingsType type) { add("mate-volume-control"); } } @@ -574,10 +573,10 @@ index 980bdcd..8cb3a5e 100644 add("pavucontrol"); add("alsamixergui"); diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp -index 82fe8f7..4b61032 100644 +index 754b0b5..0fa4f2e 100644 --- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp -@@ -326,7 +326,7 @@ void Tray::createIcon() { +@@ -317,7 +317,7 @@ void Tray::createIcon() { const auto showXEmbed = [=] { _aboutToShowRequests.fire({}); InvokeQueued(_menuXEmbed.get(), [=] { @@ -782,7 +781,7 @@ index 3eeb0d2..da2c6f8 100644 #include diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp -index 28289fe..cef5cfc 100644 +index 123288b..5d0c03a 100644 --- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp +++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp @@ -13,6 +13,10 @@ @@ -797,7 +796,7 @@ index 28289fe..cef5cfc 100644 #include diff --git a/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp b/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp -index d0aea2f..dc02314 100644 +index efbfb72..9c82321 100644 --- a/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp +++ b/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp @@ -4,6 +4,10 @@ @@ -827,7 +826,7 @@ index 283b340..fd01c34 100644 #include #include diff --git a/Telegram/lib_ui/ui/widgets/popup_menu.cpp b/Telegram/lib_ui/ui/widgets/popup_menu.cpp -index 0968190..eaf6411 100644 +index 9f5709d..0768a2e 100644 --- a/Telegram/lib_ui/ui/widgets/popup_menu.cpp +++ b/Telegram/lib_ui/ui/widgets/popup_menu.cpp @@ -18,6 +18,10 @@ @@ -842,7 +841,7 @@ index 0968190..eaf6411 100644 #include #include diff --git a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp -index 87c285a..6d0d46f 100644 +index 5d73022..7876e88 100644 --- a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp +++ b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp @@ -4,6 +4,11 @@ @@ -886,6 +885,19 @@ index 9be0e5a..4b15e50 100644 add_checked_subdirectory(dispatch) endif() add_checked_subdirectory(expected) +diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp +index 985cf88..a8ebf57 100644 +--- a/Telegram/SourceFiles/core/sandbox.cpp ++++ b/Telegram/SourceFiles/core/sandbox.cpp +@@ -236,7 +236,7 @@ void Sandbox::setupScreenScale() { + + const auto screen = Sandbox::primaryScreen(); + const auto dpi = screen->logicalDotsPerInch(); +- const auto basePair = screen->handle()->logicalBaseDpi(); ++ const auto basePair = screen->handle()->logicalDpi(); // TODO: requires a fix at the QPA level + const auto base = (basePair.first + basePair.second) * 0.5; + const auto screenScaleExact = dpi / base; + const auto screenScale = int(base::SafeRound(screenScaleExact * 4)) * 25; -- 2.37.3 diff --git a/net-im/telegram-desktop/telegram_desktop-4.5.3.recipe b/net-im/telegram-desktop/telegram_desktop-4.6.0.recipe similarity index 98% rename from net-im/telegram-desktop/telegram_desktop-4.5.3.recipe rename to net-im/telegram-desktop/telegram_desktop-4.6.0.recipe index d97969c72..c0296fbcf 100644 --- a/net-im/telegram-desktop/telegram_desktop-4.5.3.recipe +++ b/net-im/telegram-desktop/telegram_desktop-4.6.0.recipe @@ -5,7 +5,7 @@ COPYRIGHT="2013-2023 Telegram" LICENSE="GNU GPL v3" REVISION="1" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz" -CHECKSUM_SHA256="3e338607708751813df36b677904e2e652f8adfac669da418c8dab4588a4f70f" +CHECKSUM_SHA256="7a3f9697dad1d8f857eac4e44641bdd0aac152ac599d87cc49f7cd8a7a8a9c47" SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz" SOURCE_DIR="tdesktop-$portVersion-full" srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"