mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-03 05:28:53 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 11be30aa20a4c6adf6f1ca15945fdedc2fee8a6f Mon Sep 17 00:00:00 2001
|
||||
From 22c5f614912e3254ee9fb8b4d1eb6ef5de97f2f3 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 29 Jan 2020 20:58:11 +1000
|
||||
Date: Wed, 4 Mar 2020 20:20:54 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ index d427ad0..73ef023 100644
|
||||
add_subdirectory(cmake)
|
||||
add_subdirectory(Telegram)
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index ceaf120..f046af1 100644
|
||||
index a760408..6dd7fb9 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -94,7 +94,7 @@ PRIVATE
|
||||
@@ -96,7 +96,7 @@ PRIVATE
|
||||
desktop-app::external_zlib
|
||||
desktop-app::external_qt
|
||||
desktop-app::external_qr_code_generator
|
||||
@@ -52,7 +52,7 @@ index ceaf120..f046af1 100644
|
||||
desktop-app::external_auto_updates
|
||||
tdesktop::lib_tgvoip
|
||||
desktop-app::external_openssl
|
||||
@@ -766,6 +766,18 @@ PRIVATE
|
||||
@@ -799,6 +799,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 ceaf120..f046af1 100644
|
||||
platform/platform_audio.h
|
||||
platform/platform_file_utilities.h
|
||||
platform/platform_launcher.h
|
||||
@@ -1152,7 +1164,7 @@ endif()
|
||||
@@ -1165,7 +1177,7 @@ endif()
|
||||
|
||||
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
|
||||
|
||||
@@ -121,10 +121,10 @@ index 160571e..842ac9b 100644
|
||||
if (!updater.exists()) {
|
||||
QFileInfo current(curUpdater);
|
||||
diff --git a/Telegram/SourceFiles/data/data_session.cpp b/Telegram/SourceFiles/data/data_session.cpp
|
||||
index 1d6420c..5fe02ad 100644
|
||||
index 7fa9f0a..59b9bde 100644
|
||||
--- a/Telegram/SourceFiles/data/data_session.cpp
|
||||
+++ b/Telegram/SourceFiles/data/data_session.cpp
|
||||
@@ -196,7 +196,7 @@ Session::Session(not_null<Main::Session*> session)
|
||||
@@ -200,7 +200,7 @@ Session::Session(not_null<Main::Session*> session)
|
||||
_cache->open(Local::cacheKey());
|
||||
_bigFileCache->open(Local::cacheBigFileKey());
|
||||
|
||||
@@ -134,30 +134,30 @@ index 1d6420c..5fe02ad 100644
|
||||
if (wasVersion >= 1007011 && wasVersion < 1007015) {
|
||||
_bigFileCache->clear();
|
||||
diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp
|
||||
index ad106e5..924e995 100644
|
||||
index 6df70cd..6c9727c 100644
|
||||
--- a/Telegram/SourceFiles/mainwindow.cpp
|
||||
+++ b/Telegram/SourceFiles/mainwindow.cpp
|
||||
@@ -142,7 +142,7 @@ void MainWindow::firstShow() {
|
||||
@@ -142,7 +142,7 @@ void MainWindow::createTrayIconMenu() {
|
||||
? tr::lng_disable_notifications_from_tray(tr::now)
|
||||
: tr::lng_enable_notifications_from_tray(tr::now);
|
||||
|
||||
- if (Platform::IsLinux()) {
|
||||
+ if (Platform::IsLinux() || Platform::IsHaiku()) {
|
||||
trayIconMenu->addAction(tr::lng_open_from_tray(tr::now), this, SLOT(showFromTray()));
|
||||
trayIconMenu->addAction(tr::lng_minimize_to_tray(tr::now), this, SLOT(minimizeToTray()));
|
||||
trayIconMenu->addAction(notificationActionText, this, SLOT(toggleDisplayNotifyFromTray()));
|
||||
@@ -562,7 +562,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
}
|
||||
trayIconMenu->addAction(tr::lng_minimize_to_tray(tr::now), this, SLOT(minimizeToTray()));
|
||||
@@ -593,7 +593,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
if (!trayIconMenu || (Platform::IsWindows() && !force)) return;
|
||||
|
||||
auto iconMenu = trayIconMenu;
|
||||
auto actions = iconMenu->actions();
|
||||
auto actions = trayIconMenu->actions();
|
||||
- if (Platform::IsLinux()) {
|
||||
+ if (Platform::IsLinux() || Platform::IsHaiku()) {
|
||||
auto minimizeAction = actions.at(1);
|
||||
minimizeAction->setDisabled(!isVisible());
|
||||
minimizeAction->setEnabled(isVisible());
|
||||
} else {
|
||||
@@ -582,7 +582,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
iconMenu = nullptr;
|
||||
}
|
||||
@@ -607,7 +607,7 @@ void MainWindow::updateTrayMenu(bool force) {
|
||||
? tr::lng_minimize_to_tray(tr::now)
|
||||
: tr::lng_open_from_tray(tr::now));
|
||||
}
|
||||
- auto notificationAction = actions.at(Platform::IsLinux() ? 2 : 1);
|
||||
+ auto notificationAction = actions.at(Platform::IsLinux() || Platform::IsHaiku() ? 2 : 1);
|
||||
@@ -186,10 +186,10 @@ index c1234c4..4a4f89f 100644
|
||||
LOG(("Audio Playback Default Device: %1").arg(QString::fromLocal8Bit(device)));
|
||||
} else {
|
||||
diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
index 965b402..d5b635d 100644
|
||||
index df5e243..f825716 100644
|
||||
--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
+++ b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
@@ -289,7 +289,7 @@ OverlayWidget::OverlayWidget()
|
||||
@@ -363,7 +363,7 @@ OverlayWidget::OverlayWidget()
|
||||
|
||||
hide();
|
||||
createWinId();
|
||||
@@ -697,7 +697,7 @@ index 0000000..45d4cf8
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..cda837b
|
||||
index 0000000..c603575
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp
|
||||
@@ -0,0 +1,134 @@
|
||||
@@ -767,7 +767,7 @@ index 0000000..cda837b
|
||||
+ auto icon = QIcon(App::pixmapFromImageInPlace(Core::App().logoNoMargin()));
|
||||
+
|
||||
+ trayIcon->setIcon(icon);
|
||||
+ trayIcon->setToolTip(str_const_toString(AppName));
|
||||
+ trayIcon->setToolTip(AppName.utf8());
|
||||
+ connect(trayIcon, SIGNAL(messageClicked()), this, SLOT(showFromTray()));
|
||||
+ attachToTrayIcon(trayIcon);
|
||||
+ App::wnd()->updateTrayMenu();
|
||||
@@ -1361,7 +1361,7 @@ 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..5b7bd3b
|
||||
index 0000000..bd68563
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
@@ -0,0 +1,254 @@
|
||||
@@ -1495,7 +1495,7 @@ index 0000000..5b7bd3b
|
||||
+}
|
||||
+
|
||||
+QString psDownloadPath() {
|
||||
+ return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + str_const_toString(AppName) + '/';
|
||||
+ return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + AppName.utf8() + '/';
|
||||
+}
|
||||
+
|
||||
+void psDoCleanup() {
|
||||
@@ -1621,10 +1621,10 @@ index 0000000..5b7bd3b
|
||||
+}
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..35a5655
|
||||
index 0000000..c674859
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
@@ -0,0 +1,117 @@
|
||||
@@ -0,0 +1,114 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1650,9 +1650,6 @@ index 0000000..35a5655
|
||||
+inline void IgnoreApplicationActivationRightNow() {
|
||||
+}
|
||||
+
|
||||
+inline void StartTranslucentPaint(QPainter &p, QPaintEvent *e) {
|
||||
+}
|
||||
+
|
||||
+inline void InitOnTopPanel(QWidget *panel) {
|
||||
+}
|
||||
+
|
||||
@@ -1904,7 +1901,7 @@ index 9ec30eb..53152ee 100644
|
||||
}
|
||||
return QString();
|
||||
diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp
|
||||
index c4d4802..070ac91 100644
|
||||
index 50b9564..c85e35e 100644
|
||||
--- a/Telegram/SourceFiles/window/main_window.cpp
|
||||
+++ b/Telegram/SourceFiles/window/main_window.cpp
|
||||
@@ -117,7 +117,7 @@ QIcon CreateOfficialIcon(Main::Account *account) {
|
||||
@@ -2835,7 +2832,7 @@ index 215ac73..c247275 100644
|
||||
target_compile_options(lib_tgvoip
|
||||
PRIVATE
|
||||
diff --git a/Telegram/lib_base/CMakeLists.txt b/Telegram/lib_base/CMakeLists.txt
|
||||
index da416a7..4a7fbe9 100644
|
||||
index e4ea6be..a728127 100644
|
||||
--- a/Telegram/lib_base/CMakeLists.txt
|
||||
+++ b/Telegram/lib_base/CMakeLists.txt
|
||||
@@ -56,6 +56,18 @@ PRIVATE
|
||||
@@ -2857,7 +2854,7 @@ index da416a7..4a7fbe9 100644
|
||||
base/platform/base_platform_info.h
|
||||
base/platform/base_platform_last_input.h
|
||||
base/platform/base_platform_layout_switch.h
|
||||
@@ -142,7 +154,7 @@ PUBLIC
|
||||
@@ -143,7 +155,7 @@ PUBLIC
|
||||
desktop-app::lib_crl
|
||||
desktop-app::external_qt
|
||||
desktop-app::external_openssl
|
||||
@@ -2866,36 +2863,6 @@ index da416a7..4a7fbe9 100644
|
||||
desktop-app::external_variant
|
||||
desktop-app::external_ranges
|
||||
desktop-app::external_gsl
|
||||
diff --git a/Telegram/lib_base/base/build_config.h b/Telegram/lib_base/base/build_config.h
|
||||
index a02c9b0..cffaec4 100644
|
||||
--- a/Telegram/lib_base/base/build_config.h
|
||||
+++ b/Telegram/lib_base/base/build_config.h
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#define OS_MAC 1
|
||||
-#elif defined(__linux__) // __APPLE__
|
||||
+#elif defined(__HAIKU__) // __APPLE__
|
||||
+#define OS_HAIKU 1
|
||||
+#elif defined(__linux__) // __APPLE__ || __HAIKU__
|
||||
#define OS_LINUX 1
|
||||
-#elif defined(_WIN32) // __APPLE__ || __linux__
|
||||
+#elif defined(_WIN32) // __APPLE__ || __HAIKU__ || __linux__
|
||||
#define OS_WIN 1
|
||||
#else // __APPLE__ || __linux__ || _WIN32
|
||||
#error Please add support for your platform in base/build_config.h
|
||||
@@ -22,9 +24,9 @@
|
||||
|
||||
// For access to standard POSIXish features, use OS_POSIX instead of a
|
||||
// more specific macro.
|
||||
-#if defined(OS_MAC) || defined(OS_LINUX)
|
||||
+#if defined(OS_MAC) || defined(OS_LINUX) || defined(OS_HAIKU)
|
||||
#define OS_POSIX 1
|
||||
-#endif // OS_MAC || OS_LINUX
|
||||
+#endif // OS_MAC || OS_LINUX || OS_HAIKU
|
||||
|
||||
// Compiler detection.
|
||||
#if defined(__clang__)
|
||||
diff --git a/Telegram/lib_base/base/crash_report_writer.cpp b/Telegram/lib_base/base/crash_report_writer.cpp
|
||||
index 963a720..d67d6c3 100644
|
||||
--- a/Telegram/lib_base/base/crash_report_writer.cpp
|
||||
@@ -3490,26 +3457,26 @@ index 0000000..f682740
|
||||
+
|
||||
+#endif // CRL_USE_LINUX_TIME
|
||||
diff --git a/Telegram/lib_spellcheck/CMakeLists.txt b/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
index 282e732..c5a1b7e 100644
|
||||
index 349211f..a326222 100644
|
||||
--- a/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
+++ b/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
@@ -22,6 +22,10 @@ PRIVATE
|
||||
spellcheck/platform/mac/spellcheck_mac.mm
|
||||
spellcheck/platform/win/spellcheck_win.cpp
|
||||
spellcheck/platform/win/spellcheck_win.h
|
||||
+ spellcheck/platform/haiku/haiku_enchant.cpp
|
||||
+ spellcheck/platform/haiku/haiku_enchant.h
|
||||
+ spellcheck/platform/haiku/spellcheck_haiku.cpp
|
||||
+ spellcheck/platform/haiku/spellcheck_haiku.h
|
||||
spellcheck/spellcheck_utils.cpp
|
||||
spellcheck/spellcheck_utils.h
|
||||
spellcheck/spellcheck_types.h
|
||||
@@ -39,7 +43,7 @@ PUBLIC
|
||||
@@ -44,6 +44,10 @@ if (system_spellchecker)
|
||||
spellcheck/platform/mac/spellcheck_mac.mm
|
||||
spellcheck/platform/win/spellcheck_win.cpp
|
||||
spellcheck/platform/win/spellcheck_win.h
|
||||
+ spellcheck/platform/haiku/haiku_enchant.cpp
|
||||
+ spellcheck/platform/haiku/haiku_enchant.h
|
||||
+ spellcheck/platform/haiku/spellcheck_haiku.cpp
|
||||
+ spellcheck/platform/haiku/spellcheck_haiku.h
|
||||
)
|
||||
else()
|
||||
nice_target_sources(lib_spellcheck ${src_loc}
|
||||
@@ -73,7 +77,7 @@ PUBLIC
|
||||
desktop-app::lib_ui
|
||||
)
|
||||
|
||||
-if (LINUX)
|
||||
+if (LINUX OR HAIKU)
|
||||
-if (LINUX AND use_enchant)
|
||||
+if ((LINUX OR HAIKU) AND use_enchant)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_search_module(ENCHANT REQUIRED enchant-2 enchant)
|
||||
@@ -4207,10 +4174,10 @@ index 0000000..49d672c
|
||||
+
|
||||
+} // namespace Platform::Spellchecker
|
||||
diff --git a/Telegram/lib_spellcheck/spellcheck/platform/platform_spellcheck.h b/Telegram/lib_spellcheck/spellcheck/platform/platform_spellcheck.h
|
||||
index 6ad7201..333d642 100644
|
||||
index c3b8199..fdccb8e 100644
|
||||
--- a/Telegram/lib_spellcheck/spellcheck/platform/platform_spellcheck.h
|
||||
+++ b/Telegram/lib_spellcheck/spellcheck/platform/platform_spellcheck.h
|
||||
@@ -39,6 +39,8 @@ void CheckSpellingText(
|
||||
@@ -40,6 +40,8 @@ void UpdateLanguages(std::vector<int> languages);
|
||||
#include "spellcheck/platform/mac/spellcheck_mac.h"
|
||||
#elif defined Q_OS_WIN // Q_OS_MAC
|
||||
#include "spellcheck/platform/win/spellcheck_win.h"
|
||||
@@ -4238,10 +4205,10 @@ index 88c28e6..53599c6 100644
|
||||
ui/style/style_core.cpp
|
||||
diff --git a/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..7a1188b
|
||||
index 0000000..fef675e
|
||||
--- /dev/null
|
||||
+++ b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp
|
||||
@@ -0,0 +1,32 @@
|
||||
@@ -0,0 +1,35 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -4272,11 +4239,14 @@ index 0000000..7a1188b
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
+void IgnoreAllActivation(not_null<QWidget*> widget) {
|
||||
+}
|
||||
+
|
||||
+} // namespace Platform
|
||||
+} // namespace Ui
|
||||
diff --git a/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.h b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..37a2871
|
||||
index 0000000..c1419cb
|
||||
--- /dev/null
|
||||
+++ b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.h
|
||||
@@ -0,0 +1,44 @@
|
||||
@@ -4297,7 +4267,7 @@ index 0000000..37a2871
|
||||
+namespace Ui {
|
||||
+namespace Platform {
|
||||
+
|
||||
+inline void StartTranslucentPaint(QPainter &p, QPaintEvent *e) {
|
||||
+inline void StartTranslucentPaint(QPainter &p, gsl::span<const QRect> rects) {
|
||||
+}
|
||||
+
|
||||
+inline void InitOnTopPanel(not_null<QWidget*> panel) {
|
||||
@@ -4370,7 +4340,7 @@ index 0000000..ecb1277
|
||||
+
|
||||
+#include "ui/platform/ui_platform_window.h"
|
||||
diff --git a/Telegram/lib_ui/ui/platform/ui_platform_utility.h b/Telegram/lib_ui/ui/platform/ui_platform_utility.h
|
||||
index dec7e12..f24be72 100644
|
||||
index 4398ed7..0b03e4e 100644
|
||||
--- a/Telegram/lib_ui/ui/platform/ui_platform_utility.h
|
||||
+++ b/Telegram/lib_ui/ui/platform/ui_platform_utility.h
|
||||
@@ -37,8 +37,10 @@ void DrainMainQueue(); // Needed only if UseMainQueueGeneric() is false.
|
||||
@@ -4496,27 +4466,40 @@ index 0000000..a6c28f1
|
||||
+ endif()
|
||||
+endforeach()
|
||||
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
|
||||
index 4187ad3..68e36e3 100644
|
||||
index 9c69674..55b22d4 100644
|
||||
--- a/cmake/external/CMakeLists.txt
|
||||
+++ b/cmake/external/CMakeLists.txt
|
||||
@@ -5,16 +5,9 @@
|
||||
@@ -5,22 +5,22 @@
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
add_subdirectory(auto_updates)
|
||||
-add_subdirectory(crash_reports)
|
||||
+#add_subdirectory(crash_reports)
|
||||
if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||
add_subdirectory(dbusmenu_qt)
|
||||
endif()
|
||||
add_subdirectory(expected)
|
||||
-add_subdirectory(ffmpeg)
|
||||
+#add_subdirectory(ffmpeg)
|
||||
add_subdirectory(gsl)
|
||||
if (add_hunspell_library)
|
||||
add_subdirectory(hunspell)
|
||||
endif()
|
||||
add_subdirectory(iconv)
|
||||
-add_subdirectory(lz4)
|
||||
-add_subdirectory(openal)
|
||||
-add_subdirectory(openssl)
|
||||
-add_subdirectory(opus)
|
||||
-add_subdirectory(qt)
|
||||
+#add_subdirectory(lz4)
|
||||
+#add_subdirectory(openal)
|
||||
+#add_subdirectory(openssl)
|
||||
+#add_subdirectory(opus)
|
||||
+#add_subdirectory(qt)
|
||||
add_subdirectory(qr_code_generator)
|
||||
add_subdirectory(ranges)
|
||||
add_subdirectory(rlottie)
|
||||
@@ -23,4 +16,3 @@ if (APPLE)
|
||||
@@ -32,4 +32,3 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||
endif()
|
||||
add_subdirectory(variant)
|
||||
add_subdirectory(xxhash)
|
||||
@@ -4564,10 +4547,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 47102c0..4cce463 100644
|
||||
index 46186c6..822a6f0 100644
|
||||
--- a/cmake/options.cmake
|
||||
+++ b/cmake/options.cmake
|
||||
@@ -37,6 +37,8 @@ if (WIN32)
|
||||
@@ -44,6 +44,8 @@ if (WIN32)
|
||||
include(cmake/options_win.cmake)
|
||||
elseif (APPLE)
|
||||
include(cmake/options_mac.cmake)
|
||||
@@ -4613,10 +4596,10 @@ index 0000000..063f1ce
|
||||
+ $<IF:$<CONFIG:Debug>,,-Ofast>
|
||||
+)
|
||||
diff --git a/cmake/variables.cmake b/cmake/variables.cmake
|
||||
index 9d3b075..53448ac 100644
|
||||
index 3c71216..891d428 100644
|
||||
--- a/cmake/variables.cmake
|
||||
+++ b/cmake/variables.cmake
|
||||
@@ -41,6 +41,7 @@ set(build_osx 0)
|
||||
@@ -57,6 +57,7 @@ set(build_osx 0)
|
||||
set(build_macstore 0)
|
||||
set(build_winstore 0)
|
||||
set(build_linux32 0)
|
||||
@@ -4624,7 +4607,7 @@ index 9d3b075..53448ac 100644
|
||||
|
||||
if (WIN32)
|
||||
if (DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp")
|
||||
@@ -52,6 +53,12 @@ elseif (APPLE)
|
||||
@@ -68,6 +69,12 @@ elseif (APPLE)
|
||||
elseif (DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore")
|
||||
set(build_macstore 1)
|
||||
endif()
|
||||
@@ -4637,7 +4620,7 @@ index 9d3b075..53448ac 100644
|
||||
else()
|
||||
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(build_linux32 1)
|
||||
@@ -72,8 +79,8 @@ else()
|
||||
@@ -88,8 +95,8 @@ else()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -4651,3 +4634,90 @@ index 9d3b075..53448ac 100644
|
||||
--
|
||||
2.24.1
|
||||
|
||||
|
||||
From d281bb0103254dd6ce94234780ceae101068ec08 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 4 Mar 2020 21:47:43 +1000
|
||||
Subject: Fix tray menu
|
||||
|
||||
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp
|
||||
index c603575..20eaf46 100644
|
||||
--- a/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp
|
||||
@@ -52,12 +52,18 @@ void MainWindow::psStatusIconCheck() {
|
||||
}
|
||||
|
||||
void MainWindow::psShowTrayMenu() {
|
||||
+ _trayIconMenuEmbed->popup(QCursor::pos());
|
||||
}
|
||||
|
||||
void MainWindow::psTrayMenuUpdated() {
|
||||
}
|
||||
|
||||
void MainWindow::psSetupTrayIcon() {
|
||||
+ if (!_trayIconMenuEmbed) {
|
||||
+ _trayIconMenuEmbed = new Ui::PopupMenu(nullptr, trayIconMenu);
|
||||
+ _trayIconMenuEmbed->deleteOnHide(false);
|
||||
+ }
|
||||
+
|
||||
if (!trayIcon) {
|
||||
trayIcon = new QSystemTrayIcon(this);
|
||||
|
||||
@@ -75,13 +81,14 @@ void MainWindow::psSetupTrayIcon() {
|
||||
}
|
||||
|
||||
void MainWindow::workmodeUpdated(DBIWorkMode mode) {
|
||||
- psSetupTrayIcon();
|
||||
if (mode == dbiwmWindowOnly) {
|
||||
if (trayIcon) {
|
||||
trayIcon->setContextMenu(0);
|
||||
- delete trayIcon;
|
||||
- trayIcon = nullptr;
|
||||
+ trayIcon->deleteLater();
|
||||
}
|
||||
+ trayIcon = 0;
|
||||
+ } else {
|
||||
+ psSetupTrayIcon();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,6 +136,7 @@ void MainWindow::psUpdateMargins() {
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow() {
|
||||
+ delete _trayIconMenuEmbed;
|
||||
}
|
||||
|
||||
} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.h b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
|
||||
index 36ab559..90940c3 100644
|
||||
--- a/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
|
||||
@@ -4,12 +4,13 @@ This file is part of Telegram Desktop for Haiku,
|
||||
For license and copyright information please follow this link:
|
||||
https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
-Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+Copyright (c) 2018-2020 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platform/platform_main_window.h"
|
||||
+#include "ui/widgets/popup_menu.h"
|
||||
#include "base/flags.h"
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
@@ -60,6 +61,8 @@ private:
|
||||
void updateIconCounters();
|
||||
void psCreateTrayIcon();
|
||||
|
||||
+ Ui::PopupMenu *_trayIconMenuEmbed = nullptr;
|
||||
+
|
||||
QTimer _psCheckStatusIconTimer;
|
||||
int _psCheckStatusIconLeft = 100;
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
||||
@@ -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="260678b1e2c9638fa5d500880ddd9b6cd8338b1d235aee93c43ec9ab22a67d21"
|
||||
CHECKSUM_SHA256="d7bb9ad9e86d33333d733809e67daffc919d5dd32aeeaecd91c9ba9f5b3dfc22"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="0663103551379b958b2e79c51d51d163ec484300"
|
||||
@@ -36,6 +36,7 @@ REQUIRES="
|
||||
lib:libenchant_2$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libgthread_2.0$secondaryArchSuffix
|
||||
lib:libhunspell_1.7$secondaryArchSuffix
|
||||
lib:liblz4$secondaryArchSuffix
|
||||
lib:liblzma$secondaryArchSuffix
|
||||
lib:libminizip$secondaryArchSuffix
|
||||
@@ -60,11 +61,13 @@ BUILD_REQUIRES="
|
||||
devel:libenchant_2$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libgthread_2.0$secondaryArchSuffix
|
||||
devel:libhunspell_1.7$secondaryArchSuffix
|
||||
devel:liblz4$secondaryArchSuffix
|
||||
devel:liblzma$secondaryArchSuffix
|
||||
devel:libminizip$secondaryArchSuffix
|
||||
devel:libopenal$secondaryArchSuffix
|
||||
devel:libopus$secondaryArchSuffix
|
||||
devel:libqrcodegen$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
@@ -119,6 +122,10 @@ BUILD()
|
||||
-DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON \
|
||||
-DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_RLOTTIE=OFF \
|
||||
-DDESKTOP_APP_DISABLE_DBUS_INTEGRATION=ON \
|
||||
-DDESKTOP_APP_USE_PACKAGED_GSL=OFF \
|
||||
-DDESKTOP_APP_USE_PACKAGED_VARIANT=OFF \
|
||||
-DDESKTOP_APP_USE_PACKAGED_EXPECTED=OFF \
|
||||
-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF \
|
||||
-DTDESKTOP_API_ID=$TELEGRAM_API_ID \
|
||||
-DTDESKTOP_API_HASH=$TELEGRAM_API_HASH
|
||||
Reference in New Issue
Block a user