mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From dfab16578d4b93441bf1fd6ca47f0187f41ee12a Mon Sep 17 00:00:00 2001
|
||||
From 709a4e177ce6f34daf347abf83580f2017d802a1 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 16 Feb 2023 22:08:26 +1000
|
||||
Date: Mon, 20 Mar 2023 23:39:55 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
From 1189d7b595a071b5305c979851de3d90a19eff1e Mon Sep 17 00:00:00 2001
|
||||
From 66b30418988748acff7d6369e62ea8d1d56b0ce7 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 16 Feb 2023 22:08:47 +1000
|
||||
Date: Mon, 20 Mar 2023 23:40:14 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index d647177..dbf5c86 100644
|
||||
index 8165566..c36bf55 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -90,6 +90,15 @@ PRIVATE
|
||||
@@ -24,7 +24,7 @@ index d647177..dbf5c86 100644
|
||||
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
|
||||
nice_target_sources(Telegram ${src_loc}
|
||||
PRIVATE
|
||||
@@ -1403,6 +1412,16 @@ else()
|
||||
@@ -1409,6 +1418,16 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -41,7 +41,7 @@ index d647177..dbf5c86 100644
|
||||
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
remove_target_sources(Telegram ${src_loc}
|
||||
platform/linux/linux_wayland_integration.cpp
|
||||
@@ -1551,7 +1570,7 @@ if (build_macstore)
|
||||
@@ -1564,7 +1583,7 @@ if (build_macstore)
|
||||
else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>: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 95490bb..b06406d 100644
|
||||
index 111bf6c..aecadca 100644
|
||||
--- a/Telegram/SourceFiles/core/core_settings.h
|
||||
+++ b/Telegram/SourceFiles/core/core_settings.h
|
||||
@@ -853,7 +853,7 @@ private:
|
||||
@@ -893,7 +893,7 @@ private:
|
||||
rpl::variable<float64> _dialogsWidthRatio; // per-window
|
||||
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
|
||||
bool _notifyFromAll = true;
|
||||
@@ -84,7 +84,7 @@ index 95490bb..b06406d 100644
|
||||
rpl::variable<bool> _systemDarkModeEnabled = false;
|
||||
rpl::variable<WindowTitleContent> _windowTitleContent;
|
||||
diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp
|
||||
index 7be76f0..be2f33b 100644
|
||||
index 0dbe352..5df5a8e 100644
|
||||
--- a/Telegram/SourceFiles/core/sandbox.cpp
|
||||
+++ b/Telegram/SourceFiles/core/sandbox.cpp
|
||||
@@ -236,7 +236,7 @@ void Sandbox::setupScreenScale() {
|
||||
@@ -96,7 +96,7 @@ index 7be76f0..be2f33b 100644
|
||||
const auto base = (basePair.first + basePair.second) * 0.5;
|
||||
const auto screenScaleExact = dpi / base;
|
||||
const auto screenScale = int(base::SafeRound(screenScaleExact * 20)) * 5;
|
||||
@@ -260,9 +260,12 @@ Sandbox::~Sandbox() = default;
|
||||
@@ -259,9 +259,12 @@ Sandbox::~Sandbox() = default;
|
||||
|
||||
bool Sandbox::event(QEvent *e) {
|
||||
if (e->type() == QEvent::Quit && !Quitting()) {
|
||||
@@ -112,7 +112,7 @@ index 7be76f0..be2f33b 100644
|
||||
} else if (e->type() == QEvent::Close) {
|
||||
Quit();
|
||||
}
|
||||
@@ -272,7 +275,7 @@ bool Sandbox::event(QEvent *e) {
|
||||
@@ -271,7 +274,7 @@ bool Sandbox::event(QEvent *e) {
|
||||
void Sandbox::socketConnected() {
|
||||
LOG(("Socket connected, this is not the first application instance, sending show command..."));
|
||||
_secondInstance = true;
|
||||
@@ -194,7 +194,7 @@ index ada8cd6..0f19120 100644
|
||||
updateUnityCounter();
|
||||
}
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
index 8b74da5..905f987 100644
|
||||
index 3f074db..2e1a1f9 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
@@ -21,6 +21,9 @@ namespace Platform {
|
||||
@@ -209,10 +209,10 @@ index 8b74da5..905f987 100644
|
||||
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
|
||||
index 0000000..21935f0
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
|
||||
@@ -0,0 +1,278 @@
|
||||
@@ -0,0 +1,294 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -230,12 +230,20 @@ index 0000000..f01fa5c
|
||||
+
|
||||
+#include "platform/linux/notifications_manager_linux.h"
|
||||
+
|
||||
+#include "window/notifications_utilities.h"
|
||||
+#include "history/history.h"
|
||||
+#include "lang/lang_keys.h"
|
||||
+#include "base/options.h"
|
||||
+#include "base/platform/base_platform_info.h"
|
||||
+#include "core/application.h"
|
||||
+#include "core/sandbox.h"
|
||||
+#include "core/core_settings.h"
|
||||
+#include "data/data_forum_topic.h"
|
||||
+#include "history/history.h"
|
||||
+#include "history/history_item.h"
|
||||
+#include "ui/empty_userpic.h"
|
||||
+#include "main/main_session.h"
|
||||
+#include "lang/lang_keys.h"
|
||||
+#include "base/weak_ptr.h"
|
||||
+#include "window/notifications_utilities.h"
|
||||
+#include "styles/style_window.h"
|
||||
+
|
||||
+#define USE_HAIKU_UINT64
|
||||
+#include "base/haiku_types.h"
|
||||
@@ -303,6 +311,14 @@ index 0000000..f01fa5c
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void MaybePlaySoundForCustom(Fn<void()> playSound) {
|
||||
+ playSound();
|
||||
+}
|
||||
+
|
||||
+void MaybeFlashBounceForCustom(Fn<void()> flashBounce) {
|
||||
+ flashBounce();
|
||||
+}
|
||||
+
|
||||
+void Create(Window::Notifications::System *system) {
|
||||
+ if (Core::App().settings().nativeNotifications() && Supported()) {
|
||||
+ auto result = std::make_unique<Manager>(system);
|
||||
@@ -477,22 +493,22 @@ index 0000000..f01fa5c
|
||||
+
|
||||
+void Manager::doClearFromTopic(not_null<Data::ForumTopic*> topic) { }
|
||||
+
|
||||
+bool Manager::doSkipAudio() const {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+bool Manager::doSkipToast() const {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+bool Manager::doSkipFlashBounce() const {
|
||||
+ return false;
|
||||
+void Manager::doMaybePlaySound(Fn<void()> playSound) {
|
||||
+ playSound();
|
||||
+}
|
||||
+
|
||||
+void Manager::doMaybeFlashBounce(Fn<void()> flashBounce) {
|
||||
+ flashBounce();
|
||||
+}
|
||||
+
|
||||
+} // namespace Notifications
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
index 6eba0da..31e486e 100644
|
||||
index 2f8e506..d89ca73 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
|
||||
@@ -540,7 +556,7 @@ index 6eba0da..31e486e 100644
|
||||
constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs;
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -603,6 +634,9 @@ std::optional<bool> IsDarkMode() {
|
||||
@@ -602,6 +633,9 @@ std::optional<bool> IsDarkMode() {
|
||||
}
|
||||
|
||||
bool AutostartSupported() {
|
||||
@@ -550,7 +566,7 @@ index 6eba0da..31e486e 100644
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
return true;
|
||||
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -611,6 +645,10 @@ bool AutostartSupported() {
|
||||
@@ -610,6 +644,10 @@ bool AutostartSupported() {
|
||||
}
|
||||
|
||||
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||
@@ -561,7 +577,7 @@ index 6eba0da..31e486e 100644
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
const auto success = [&] {
|
||||
const auto silent = !done;
|
||||
@@ -681,7 +719,11 @@ QString psAppDataPath() {
|
||||
@@ -680,7 +718,11 @@ QString psAppDataPath() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +589,7 @@ index 6eba0da..31e486e 100644
|
||||
}
|
||||
|
||||
void psDoCleanup() {
|
||||
@@ -823,6 +865,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||
@@ -822,6 +864,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||
add("mate-volume-control");
|
||||
}
|
||||
}
|
||||
@@ -582,7 +598,7 @@ index 6eba0da..31e486e 100644
|
||||
add("pavucontrol");
|
||||
add("alsamixergui");
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
index 754b0b5..0fa4f2e 100644
|
||||
index 67002f4..fba71cf 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
|
||||
@@ -317,7 +317,7 @@ void Tray::createIcon() {
|
||||
@@ -790,7 +806,7 @@ index 3eeb0d2..da2c6f8 100644
|
||||
#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 123288b..5d0c03a 100644
|
||||
index 2e6170f..f509ce4 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 @@
|
||||
@@ -835,7 +851,7 @@ index 283b340..fd01c34 100644
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QtEvents>
|
||||
diff --git a/Telegram/lib_ui/ui/widgets/popup_menu.cpp b/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
index 9f5709d..0768a2e 100644
|
||||
index ff81dbc..4ad5c58 100644
|
||||
--- a/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
+++ b/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
@@ -18,6 +18,10 @@
|
||||
@@ -3,9 +3,9 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
|
||||
HOMEPAGE="https://www.telegram.org/"
|
||||
COPYRIGHT="2013-2023 Telegram"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
|
||||
CHECKSUM_SHA256="3448d879afdc7c5c06d2b0f9cabe339b08093cb25f380a3e398d32daa96a9c36"
|
||||
CHECKSUM_SHA256="527049b875e39013616524f532a3aec787fcbb82b7d87159e1a99dfbea40329f"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
|
||||
Reference in New Issue
Block a user