Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2022-06-23 23:02:45 +10:00
parent 4b8ad59f14
commit 98fd0fff33
3 changed files with 92 additions and 146 deletions

View File

@@ -1,6 +1,6 @@
From 3b38a6407751e4c28e6a1b0d4fddc474858b83af Mon Sep 17 00:00:00 2001
From 03e34ef2a47bf2b6f7afa6aee86ca919c2d5eff1 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 17 Apr 2022 18:05:07 +1000
Date: Thu, 23 Jun 2022 21:37:04 +1000
Subject: Add Haiku support
@@ -928,5 +928,5 @@ index 9b8ec54..7ffb710 100644
add_library(lib_tgvoip_bundled_options INTERFACE)
target_compile_options(lib_tgvoip_bundled_options
--
2.30.2
2.36.1

View File

@@ -1,11 +1,11 @@
From 6e9cf57c17b31566846babc3881eb5be32af22f6 Mon Sep 17 00:00:00 2001
From a44a606c6e72bb1b0e3b9b066e7d4a7614c3265a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 17 Apr 2022 18:28:44 +1000
Date: Thu, 23 Jun 2022 21:38:54 +1000
Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index 2caed21..f537c44 100644
index f97c09b..558423a 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -95,6 +95,15 @@ PRIVATE
@@ -21,10 +21,10 @@ index 2caed21..f537c44 100644
+ )
+endif()
+
target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h)
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1279,6 +1288,16 @@ else()
@@ -1324,6 +1333,16 @@ else()
)
endif()
@@ -41,7 +41,7 @@ index 2caed21..f537c44 100644
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp
@@ -1424,7 +1443,7 @@ if (build_macstore)
@@ -1478,7 +1497,7 @@ if (build_macstore)
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")
@@ -71,10 +71,10 @@ index 875845f..c301075 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 b21704b..ff29acc 100644
index e866838..092c1c0 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -779,7 +779,7 @@ private:
@@ -777,7 +777,7 @@ private:
rpl::variable<float64> _dialogsWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
@@ -84,10 +84,10 @@ index b21704b..ff29acc 100644
rpl::variable<bool> _systemDarkModeEnabled = false;
WindowPosition _windowPosition; // per-window
diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp
index 1641a58..3856c5e 100644
index 9e9b5a4..546dfa9 100644
--- a/Telegram/SourceFiles/core/sandbox.cpp
+++ b/Telegram/SourceFiles/core/sandbox.cpp
@@ -261,9 +261,12 @@ Sandbox::~Sandbox() = default;
@@ -256,9 +256,12 @@ Sandbox::~Sandbox() = default;
bool Sandbox::event(QEvent *e) {
if (e->type() == QEvent::Quit && !Quitting()) {
@@ -103,7 +103,7 @@ index 1641a58..3856c5e 100644
} else if (e->type() == QEvent::Close) {
Quit();
}
@@ -273,7 +276,7 @@ bool Sandbox::event(QEvent *e) {
@@ -268,7 +271,7 @@ bool Sandbox::event(QEvent *e) {
void Sandbox::socketConnected() {
LOG(("Socket connected, this is not the first application instance, sending show command..."));
_secondInstance = true;
@@ -113,10 +113,10 @@ index 1641a58..3856c5e 100644
const QStringList &lst(cSendPaths());
for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) {
diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
index 405129b..c3e19b9 100644
index 2307aff..d458544 100644
--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
@@ -19,6 +19,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -18,6 +18,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <giomm.h>
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -132,7 +132,7 @@ index 405129b..c3e19b9 100644
namespace Platform {
namespace File {
@@ -41,6 +50,23 @@ void UnsafeOpenEmailLink(const QString &email) {
@@ -40,6 +49,23 @@ void UnsafeOpenEmailLink(const QString &email) {
}
bool UnsafeShowOpenWith(const QString &filepath) {
@@ -157,7 +157,7 @@ index 405129b..c3e19b9 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 4f0202b..26a6ba0 100644
index 246dcff..6fcafa6 100644
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -40,6 +40,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -171,7 +171,7 @@ index 4f0202b..26a6ba0 100644
#include <QtCore/QSize>
#include <QtCore/QMimeData>
#include <QtGui/QWindow>
@@ -451,11 +455,17 @@ bool MainWindow::hasTrayIcon() const {
@@ -244,7 +248,11 @@ void MainWindow::initHook() {
bool MainWindow::isActiveForTrayMenu() {
updateIsActive();
@@ -182,35 +182,7 @@ index 4f0202b..26a6ba0 100644
+#endif
}
void MainWindow::psShowTrayMenu() {
+#ifndef Q_OS_HAIKU
_trayIconMenuXEmbed->popup(QCursor::pos());
+#endif
}
void MainWindow::psTrayMenuUpdated() {
@@ -469,6 +479,10 @@ void MainWindow::psSetupTrayIcon() {
Core::App().unreadBadge(),
Core::App().unreadBadgeMuted()));
+#ifdef Q_OS_HAIKU
+ trayIcon->setContextMenu(trayIconMenu);
+#endif
+
attachToTrayIcon(trayIcon);
}
updateIconCounters();
@@ -548,8 +562,10 @@ void MainWindow::updateIconCounters() {
}
void MainWindow::initTrayMenuHook() {
+#ifndef Q_OS_HAIKU
_trayIconMenuXEmbed.emplace(nullptr, trayIconMenu);
_trayIconMenuXEmbed->deleteOnHide(false);
+#endif
}
void MainWindow::createGlobalMenu() {
void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
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..8605b28
@@ -486,10 +458,10 @@ index 0000000..8605b28
+} // namespace Notifications
+} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index 277e11a..d9ead21 100644
index 0115f61..27eda5a 100644
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
@@ -32,6 +32,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -31,6 +31,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/linux/base_linux_xcb_utilities.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
@@ -498,9 +470,9 @@ index 277e11a..d9ead21 100644
+#endif
+
#include <QtWidgets/QApplication>
#include <QtWidgets/QSystemTrayIcon>
#include <QtCore/QStandardPaths>
#include <QtCore/QProcess>
@@ -58,8 +62,36 @@ using namespace Platform;
@@ -55,8 +59,36 @@ using namespace Platform;
using Platform::internal::WaylandIntegration;
namespace Platform {
@@ -537,45 +509,39 @@ index 277e11a..d9ead21 100644
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
constexpr auto kIconName = "telegram"_cs;
@@ -492,37 +524,6 @@ void psActivateProcess(uint64 pid) {
// objc_activateProgram();
@@ -391,7 +423,11 @@ bool AutostartSupported() {
// in folders with names started with a dot
// and doesn't provide any api to add an app to autostart
// thus, autostart isn't supported in snap
+#ifdef Q_OS_HAIKU
+ return true;
+#else
return !InSnap();
+#endif
}
-namespace {
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
@@ -400,7 +436,10 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
done(enabled);
}
});
-
-#ifdef __HAIKU__
-void HaikuAutostart(bool start) {
- const auto home = QDir::homePath();
- if (home.isEmpty()) {
- return;
- }
-
- QFile file(home + "/config/settings/boot/launch/telegram-desktop");
- if (start) {
- if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
- QTextStream out(&file);
- out
- << "#!/bin/bash" << Qt::endl
- << "cd /system/apps" << Qt::endl
- << "./Telegram -autostart" << " &" << Qt::endl;
- file.close();
- file.setPermissions(file.permissions()
- | QFileDevice::ExeOwner
- | QFileDevice::ExeGroup
- | QFileDevice::ExeOther);
- }
- } else {
- file.remove();
- }
-}
-#endif // __HAIKU__
-
-} // namespace
-
QString psAppDataPath() {
// Previously we used ~/.TelegramDesktop, so look there first.
// If we find data there, we should still use it.
@@ -536,8 +537,11 @@ QString psAppDataPath() {
+#ifdef Q_OS_HAIKU
+ HaikuAutostart(enabled);
+ return;
+#else
const auto silent = !done;
if (InFlatpak()) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -417,6 +456,7 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
QFile::remove(autostart + QGuiApplication::desktopFileName());
}
}
+#endif
}
bool AutostartSkip() {
@@ -462,8 +502,11 @@ QString psAppDataPath() {
return oldPath;
}
}
@@ -588,20 +554,32 @@ index 277e11a..d9ead21 100644
}
void psDoCleanup() {
@@ -702,7 +706,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
@@ -612,6 +655,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
add("mate-volume-control");
}
}
-#ifdef __HAIKU__
+#ifdef Q_OS_HAIKU
add("Media");
#endif // __ HAIKU__
+ add("Media");
add("pavucontrol-qt");
add("pavucontrol");
add("alsamixergui");
diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
index 050c872..8c74df4 100644
--- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
@@ -300,7 +300,7 @@ void Tray::createIcon() {
const auto showXEmbed = [=] {
_aboutToShowRequests.fire({});
InvokeQueued(_menuXEmbed.get(), [=] {
- _menuXEmbed->popup(QCursor::pos());
+// _menuXEmbed->popup(QCursor::pos());
});
};
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
index 38e1b33..3f1b9ed 100644
index df88634..bf4502a 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
@@ -973,7 +973,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
@@ -976,7 +976,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
}
void MediaManager::setAudioInputDevice(std::string id) {
@@ -611,10 +589,10 @@ index 38e1b33..3f1b9ed 100644
SetAudioInputDeviceById(_audioDeviceModule.get(), id);
#endif
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
index 6aa2b05..99960d2 100644
index e5cc95a..1ab53d0 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
@@ -2845,7 +2845,7 @@ public:
@@ -2848,7 +2848,7 @@ public:
}
void setAudioOutputDevice(const std::string &id) {
@@ -623,7 +601,7 @@ index 6aa2b05..99960d2 100644
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
SetAudioOutputDeviceById(_audioDeviceModule.get(), id);
});
@@ -2853,7 +2853,7 @@ public:
@@ -2856,7 +2856,7 @@ public:
}
void setAudioInputDevice(const std::string &id) {
@@ -663,10 +641,10 @@ index 0000000..3a57ce2
+
+#endif
diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
index 4b5f72a..84a6f22 100644
index 883754c..87b5f34 100644
--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
@@ -27,8 +27,58 @@
@@ -26,8 +26,58 @@
#include <stdio.h>
#include <fcntl.h>
@@ -725,19 +703,18 @@ index 4b5f72a..84a6f22 100644
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
bool PortalShowInFolder(const QString &filepath) {
@@ -152,6 +202,12 @@ bool ShowInFolder(const QString &filepath) {
return true;
}
@@ -98,6 +148,11 @@ bool DBusShowInFolder(const QString &filepath) {
} // namespace
bool ShowInFolder(const QString &filepath) {
+#ifdef Q_OS_HAIKU
+ if (HaikuShowInFolder(filepath)) {
+ return true;
+ }
+#endif
+
if (ProcessShowInFolder(filepath)) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
if (DBusShowInFolder(filepath)) {
return true;
}
diff --git a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
index 033dcbd..bf7d541 100644
--- a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
@@ -779,7 +756,7 @@ index 033dcbd..bf7d541 100644
if (::Platform::IsX11()) {
const auto xcbResult = XCBLastUserInputTime();
diff --git a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
index 8f059c1..b41e2a2 100644
index 434cb1f..f25cb90 100644
--- a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
@@ -21,6 +21,10 @@
@@ -791,10 +768,10 @@ index 8f059c1..b41e2a2 100644
+#endif
+
#include <QtGui/QWindow>
#include <private/qguiapplication_p.h>
#include <QtWidgets/QWidget>
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 20aed5e..61d46fc 100644
index 2d11264..0c322f2 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 @@
@@ -807,40 +784,9 @@ index 20aed5e..61d46fc 100644
+
#include <QtCore/QFile>
#include <QtCore/QProcess>
#include <QtGui/QWindow>
diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
index 6e88a80..c8d3dcb 100644
--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
@@ -620,7 +620,7 @@ TitleControls::Layout TitleControlsLayout() {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
-#ifdef __HAIKU__
+#ifdef Q_OS_HAIKU
return TitleControls::Layout{
.left = {
TitleControls::Control::Close,
@@ -630,7 +630,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Maximize,
}
};
-#else // __HAIKU__
+#else // Q_OS_HAIKU
return TitleControls::Layout{
.right = {
TitleControls::Control::Minimize,
@@ -638,7 +638,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Close,
}
};
-#endif // !__HAIKU__
+#endif // !Q_OS_HAIKU
}
} // namespace Platform
#include <QtWidgets/QWidget>
diff --git a/Telegram/lib_ui/ui/ui_utility.cpp b/Telegram/lib_ui/ui/ui_utility.cpp
index e66055d..e31d635 100644
index ee6173d..b9c0837 100644
--- a/Telegram/lib_ui/ui/ui_utility.cpp
+++ b/Telegram/lib_ui/ui/ui_utility.cpp
@@ -9,6 +9,10 @@
@@ -855,7 +801,7 @@ index e66055d..e31d635 100644
#include <QtGui/QWindow>
#include <QtGui/QtEvents>
diff --git a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
index 9955bd3..ca023c1 100644
index 87c285a..6d0d46f 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 @@
@@ -871,7 +817,7 @@ index 9955bd3..ca023c1 100644
#include "base/timer.h"
diff --git a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.cpp b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.cpp
index 092b667..204e259 100644
index bb6d91a..3c4a188 100644
--- a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.cpp
+++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.cpp
@@ -4,6 +4,11 @@
@@ -887,5 +833,5 @@ index 092b667..204e259 100644
#include "webrtc/webrtc_create_adm.h"
--
2.30.2
2.36.1

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2022 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="9735f30610ff62b01cbdb0b945d32c494cec245961023c9860d9dd5268b9fe1e"
CHECKSUM_SHA256="f4ff20e1ac8ffdd4066d708f835fb1168c83bf4b74a20a52c9a31a0305e5a0c7"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"