mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 2167402d81242930a264307e531980d502030ffa Mon Sep 17 00:00:00 2001
|
||||
From b23d285386ee8af2fc3de314f6a0f85f39d7e79a Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 16 May 2020 11:47:01 +1000
|
||||
Date: Sat, 6 Jun 2020 13:36:40 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ index 645d886..3a0a0e9 100644
|
||||
add_subdirectory(cmake)
|
||||
add_subdirectory(Telegram)
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index bc4b446..bd85137 100644
|
||||
index 385c9e9..a933789 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -119,7 +119,7 @@ PRIVATE
|
||||
@@ -120,7 +120,7 @@ PRIVATE
|
||||
desktop-app::external_minizip
|
||||
desktop-app::external_qt
|
||||
desktop-app::external_qr_code_generator
|
||||
@@ -52,7 +52,7 @@ index bc4b446..bd85137 100644
|
||||
desktop-app::external_auto_updates
|
||||
tdesktop::lib_tgvoip
|
||||
desktop-app::external_openssl
|
||||
@@ -829,6 +829,18 @@ PRIVATE
|
||||
@@ -840,6 +840,18 @@ PRIVATE
|
||||
platform/win/windows_event_filter.cpp
|
||||
platform/win/windows_event_filter.h
|
||||
platform/win/wrapper_wrl_implements_h.h
|
||||
@@ -71,7 +71,7 @@ index bc4b446..bd85137 100644
|
||||
platform/platform_audio.h
|
||||
platform/platform_file_utilities.h
|
||||
platform/platform_launcher.h
|
||||
@@ -1196,7 +1208,7 @@ endif()
|
||||
@@ -1209,7 +1221,7 @@ endif()
|
||||
|
||||
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
|
||||
|
||||
@@ -81,7 +81,7 @@ index bc4b446..bd85137 100644
|
||||
init_target(Updater)
|
||||
|
||||
diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp
|
||||
index 732c516..822dcaf 100644
|
||||
index 5119097..5720d73 100644
|
||||
--- a/Telegram/SourceFiles/calls/calls_call.cpp
|
||||
+++ b/Telegram/SourceFiles/calls/calls_call.cpp
|
||||
@@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service.
|
||||
@@ -92,20 +92,6 @@ index 732c516..822dcaf 100644
|
||||
#include "calls/calls_call.h"
|
||||
|
||||
#include "main/main_session.h"
|
||||
@@ -27,6 +28,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#define NEED_TO_RESTORE_SLOTS
|
||||
#endif // slots
|
||||
|
||||
+// Don't include SupportDefs.h
|
||||
+#ifdef __HAIKU__
|
||||
+#define _SUPPORT_DEFS_H
|
||||
+typedef int32 status_t;
|
||||
+typedef uint32 type_code;
|
||||
+#endif
|
||||
+
|
||||
#include <VoIPController.h>
|
||||
#include <VoIPServerConfig.h>
|
||||
|
||||
diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp
|
||||
index 588bf05..3f6a103 100644
|
||||
--- a/Telegram/SourceFiles/core/update_checker.cpp
|
||||
@@ -121,10 +107,10 @@ index 588bf05..3f6a103 100644
|
||||
if (!updater.exists()) {
|
||||
QFileInfo current(curUpdater);
|
||||
diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp
|
||||
index 1d7d4aa..69612bd 100644
|
||||
index 64fddfb..511cd7f 100644
|
||||
--- a/Telegram/SourceFiles/data/data_session.cpp
|
||||
+++ b/Telegram/SourceFiles/data/data_session.cpp
|
||||
@@ -203,7 +203,7 @@ Session::Session(not_null<Main::Session*> session)
|
||||
@@ -226,7 +226,7 @@ Session::Session(not_null<Main::Session*> session)
|
||||
_cache->open(Local::cacheKey());
|
||||
_bigFileCache->open(Local::cacheBigFileKey());
|
||||
|
||||
@@ -134,10 +120,10 @@ index 1d7d4aa..69612bd 100644
|
||||
if (wasVersion >= 1007011 && wasVersion < 1007015) {
|
||||
_bigFileCache->clear();
|
||||
diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp
|
||||
index 5e6c687..f626625 100644
|
||||
index 17a2561..27b5de5 100644
|
||||
--- a/Telegram/SourceFiles/mainwindow.cpp
|
||||
+++ b/Telegram/SourceFiles/mainwindow.cpp
|
||||
@@ -142,7 +142,7 @@ void MainWindow::createTrayIconMenu() {
|
||||
@@ -143,7 +143,7 @@ void MainWindow::createTrayIconMenu() {
|
||||
? tr::lng_disable_notifications_from_tray(tr::now)
|
||||
: tr::lng_enable_notifications_from_tray(tr::now);
|
||||
|
||||
@@ -146,7 +132,7 @@ index 5e6c687..f626625 100644
|
||||
trayIconMenu->addAction(tr::lng_open_from_tray(tr::now), this, SLOT(showFromTray()));
|
||||
}
|
||||
trayIconMenu->addAction(tr::lng_minimize_to_tray(tr::now), this, SLOT(minimizeToTray()));
|
||||
@@ -593,7 +593,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
@@ -596,7 +596,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
if (!trayIconMenu || (Platform::IsWindows() && !force)) return;
|
||||
|
||||
auto actions = trayIconMenu->actions();
|
||||
@@ -155,7 +141,7 @@ index 5e6c687..f626625 100644
|
||||
auto minimizeAction = actions.at(1);
|
||||
minimizeAction->setEnabled(isVisible());
|
||||
} else {
|
||||
@@ -607,7 +607,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
@@ -610,7 +610,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
? tr::lng_minimize_to_tray(tr::now)
|
||||
: tr::lng_open_from_tray(tr::now));
|
||||
}
|
||||
@@ -165,10 +151,10 @@ index 5e6c687..f626625 100644
|
||||
? tr::lng_disable_notifications_from_tray(tr::now)
|
||||
: tr::lng_enable_notifications_from_tray(tr::now);
|
||||
diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
index b44f0e5..28c8d47 100644
|
||||
index b2234b6..e3e89ce 100644
|
||||
--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
+++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
@@ -363,7 +363,7 @@ OverlayWidget::OverlayWidget()
|
||||
@@ -365,7 +365,7 @@ OverlayWidget::OverlayWidget()
|
||||
|
||||
hide();
|
||||
createWinId();
|
||||
@@ -984,10 +970,10 @@ index 0000000..b6f3490
|
||||
+resource app_signature "application/x-vnd.tg-notify-gate";
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..774487f
|
||||
index 0000000..20564da
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
@@ -0,0 +1,222 @@
|
||||
@@ -0,0 +1,230 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1127,17 +1113,23 @@ index 0000000..774487f
|
||||
+void Manager::Private::clearNotification(PeerId peerId, MsgId msgId) {
|
||||
+}
|
||||
+
|
||||
+bool Manager::Private::showNotification(PeerData *peer, MsgId msgId, const QString &title, \
|
||||
+ const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) {
|
||||
+bool Manager::Private::showNotification(PeerData *peer,
|
||||
+ std::shared_ptr<Data::CloudImageView> &userpicView,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
+ const QString &msg,
|
||||
+ bool hideNameAndPhoto,
|
||||
+ bool hideReplyButton) {
|
||||
+ auto titleText = title;
|
||||
+ auto subtitleText = subtitle;
|
||||
+ auto msgText = msg;
|
||||
+
|
||||
+ const auto key = hideNameAndPhoto
|
||||
+ ? InMemoryKey()
|
||||
+ : peer->userpicUniqueKey();
|
||||
+ : peer->userpicUniqueKey(userpicView);
|
||||
+
|
||||
+ auto userpicPath = _cachedUserpics.get(key, peer);
|
||||
+ auto userpicPath = _cachedUserpics.get(key, peer, userpicView);
|
||||
+ BBitmap *icon = BTranslationUtils::GetBitmapFile(userpicPath.toUtf8().data());
|
||||
+ QString args = QString("%1 %2").arg(peer->id).arg(msgId);
|
||||
+ BNotification notify(B_INFORMATION_NOTIFICATION);
|
||||
@@ -1180,6 +1172,7 @@ index 0000000..774487f
|
||||
+
|
||||
+void Manager::doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ std::shared_ptr<Data::CloudImageView> &userpicView,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
@@ -1188,6 +1181,7 @@ index 0000000..774487f
|
||||
+ bool hideReplyButton) {
|
||||
+ _private->showNotification(
|
||||
+ peer,
|
||||
+ userpicView,
|
||||
+ msgId,
|
||||
+ title,
|
||||
+ subtitle,
|
||||
@@ -1212,10 +1206,10 @@ index 0000000..774487f
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..e2218b8
|
||||
index 0000000..256467b
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
@@ -0,0 +1,127 @@
|
||||
@@ -0,0 +1,130 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1256,7 +1250,8 @@ index 0000000..e2218b8
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+inline void FlashBounce() {
|
||||
+inline bool SkipFlashBounce() {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void Finish();
|
||||
@@ -1288,6 +1283,7 @@ index 0000000..e2218b8
|
||||
+protected:
|
||||
+ void doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ std::shared_ptr<Data::CloudImageView> &userpicView,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
@@ -1311,7 +1307,8 @@ index 0000000..e2218b8
|
||||
+ explicit Private(Manager *instance, Type type);
|
||||
+ bool init();
|
||||
+
|
||||
+ bool showNotification(PeerData *peer, MsgId msgId, const QString &title, const QString &subtitle, \
|
||||
+ bool showNotification(PeerData *peer, std::shared_ptr<Data::CloudImageView> &userpicView, \
|
||||
+ MsgId msgId, const QString &title, const QString &subtitle, \
|
||||
+ const QString &msg, bool hideNameAndPhoto, bool hideReplyButton);
|
||||
+ void clearAll();
|
||||
+ void clearFromHistory(History *history);
|
||||
@@ -1345,10 +1342,10 @@ index 0000000..e2218b8
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..06f4d28
|
||||
index 0000000..c36d7c3
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
@@ -0,0 +1,255 @@
|
||||
@@ -0,0 +1,259 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1403,6 +1400,10 @@ index 0000000..06f4d28
|
||||
+ return "telegram";
|
||||
+}
|
||||
+
|
||||
+bool AutostartSupported() {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+} // namespace Platform
|
||||
+
|
||||
+namespace {
|
||||
@@ -1818,10 +1819,10 @@ index f0cdb15..b66690f 100644
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_LINUX
|
||||
diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h
|
||||
index 18ebd6c..c2a85ff 100644
|
||||
index db963f5..c283af8 100644
|
||||
--- a/Telegram/SourceFiles/platform/platform_specific.h
|
||||
+++ b/Telegram/SourceFiles/platform/platform_specific.h
|
||||
@@ -51,8 +51,10 @@ void finish();
|
||||
@@ -52,8 +52,10 @@ void finish();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "platform/mac/specific_mac.h"
|
||||
@@ -1881,10 +1882,10 @@ index 56acbb9..ef16c47 100644
|
||||
|
||||
#ifdef NEED_TO_RESTORE_SLOTS
|
||||
diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp
|
||||
index e4e456e..41f5817 100644
|
||||
index 38e1662..b4dc3f8 100644
|
||||
--- a/Telegram/SourceFiles/settings/settings_notifications.cpp
|
||||
+++ b/Telegram/SourceFiles/settings/settings_notifications.cpp
|
||||
@@ -629,7 +629,7 @@ void SetupNotificationsContent(
|
||||
@@ -633,7 +633,7 @@ void SetupNotificationsContent(
|
||||
return QString();
|
||||
} else if (Platform::IsWindows()) {
|
||||
return tr::lng_settings_use_windows(tr::now);
|
||||
@@ -2897,19 +2898,19 @@ index 83841a0..4a300b1 100644
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN || Q_OS_HAIKU
|
||||
diff --git a/Telegram/lib_base/base/platform/base_platform_info.h b/Telegram/lib_base/base/platform/base_platform_info.h
|
||||
index 37b0b76..d7a5a2c 100644
|
||||
index b70a3ed..839533e 100644
|
||||
--- a/Telegram/lib_base/base/platform/base_platform_info.h
|
||||
+++ b/Telegram/lib_base/base/platform/base_platform_info.h
|
||||
@@ -46,6 +46,8 @@ namespace Platform {
|
||||
[[nodiscard]] constexpr bool IsLinux32Bit();
|
||||
@@ -53,6 +53,8 @@ enum class OutdateReason {
|
||||
[[nodiscard]] constexpr bool IsLinux64Bit();
|
||||
[[nodiscard]] QString GetGlibCVersion();
|
||||
|
||||
+[[nodiscard]] constexpr bool IsHaiku();
|
||||
+
|
||||
void Start(QJsonObject settings);
|
||||
void Finish();
|
||||
|
||||
@@ -53,8 +55,10 @@ void Finish();
|
||||
@@ -60,8 +62,10 @@ void Finish();
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include "base/platform/mac/base_info_mac.h"
|
||||
@@ -3464,7 +3465,7 @@ index 0000000..f682740
|
||||
+
|
||||
+#endif // CRL_USE_LINUX_TIME
|
||||
diff --git a/Telegram/lib_ui/CMakeLists.txt b/Telegram/lib_ui/CMakeLists.txt
|
||||
index c117a78..47a291d 100644
|
||||
index 87d41a8..284e7e3 100644
|
||||
--- a/Telegram/lib_ui/CMakeLists.txt
|
||||
+++ b/Telegram/lib_ui/CMakeLists.txt
|
||||
@@ -84,6 +84,10 @@ PRIVATE
|
||||
@@ -3835,10 +3836,10 @@ index 2ac58d4..6aed2b8 100644
|
||||
set_source_files_properties(${not_linux_sources} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set_source_files_properties(${not_linux_sources} PROPERTIES SKIP_AUTOGEN TRUE)
|
||||
diff --git a/cmake/options.cmake b/cmake/options.cmake
|
||||
index 79845bf..014f486 100644
|
||||
index 80b7405..705de6f 100644
|
||||
--- a/cmake/options.cmake
|
||||
+++ b/cmake/options.cmake
|
||||
@@ -58,6 +58,8 @@ if (WIN32)
|
||||
@@ -65,6 +65,8 @@ if (WIN32)
|
||||
include(cmake/options_win.cmake)
|
||||
elseif (APPLE)
|
||||
include(cmake/options_mac.cmake)
|
||||
@@ -3884,10 +3885,10 @@ index 0000000..063f1ce
|
||||
+ $<IF:$<CONFIG:Debug>,,-Ofast>
|
||||
+)
|
||||
diff --git a/cmake/variables.cmake b/cmake/variables.cmake
|
||||
index 8d489a3..4b6d879 100644
|
||||
index 17bb351..f02e702 100644
|
||||
--- a/cmake/variables.cmake
|
||||
+++ b/cmake/variables.cmake
|
||||
@@ -62,6 +62,7 @@ set(build_osx 0)
|
||||
@@ -63,6 +63,7 @@ set(build_osx 0)
|
||||
set(build_macstore 0)
|
||||
set(build_winstore 0)
|
||||
set(build_linux32 0)
|
||||
@@ -3895,7 +3896,7 @@ index 8d489a3..4b6d879 100644
|
||||
|
||||
if (WIN32)
|
||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp")
|
||||
@@ -73,6 +74,12 @@ elseif (APPLE)
|
||||
@@ -74,6 +75,12 @@ elseif (APPLE)
|
||||
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
|
||||
set(build_macstore 1)
|
||||
endif()
|
||||
@@ -3908,7 +3909,7 @@ index 8d489a3..4b6d879 100644
|
||||
else()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(build_linux32 1)
|
||||
@@ -93,8 +100,8 @@ else()
|
||||
@@ -94,8 +101,8 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -3922,27 +3923,3 @@ index 8d489a3..4b6d879 100644
|
||||
--
|
||||
2.26.0
|
||||
|
||||
|
||||
From 0123a59b475c00cfd390aca43f3237bcf9a55783 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 16 May 2020 12:23:54 +1000
|
||||
Subject: Fix SkipFlashBounce func
|
||||
|
||||
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
index e2218b8..82310f2 100644
|
||||
--- a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
@@ -38,7 +38,8 @@ inline bool SkipToast() {
|
||||
return false;
|
||||
}
|
||||
|
||||
-inline void FlashBounce() {
|
||||
+inline bool SkipFlashBounce() {
|
||||
+ return false;
|
||||
}
|
||||
|
||||
void Finish();
|
||||
--
|
||||
2.26.0
|
||||
|
||||
@@ -6,7 +6,7 @@ LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
|
||||
CHECKSUM_SHA256="3b0000e763b600a650c62115cd9cc608734c53efd81252f98cc9dfe8ee11cc8c"
|
||||
CHECKSUM_SHA256="a2c04523ecc7de1b95e4400dba5bf592952619403c2a7feb9b56daf957a6557c"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="0663103551379b958b2e79c51d51d163ec484300"
|
||||
Reference in New Issue
Block a user