telegram-desktop: update to 2.7.2.

This commit is contained in:
John 2021-04-26 20:53:02 +02:00
parent c39165456d
commit 7419d9d30c
5 changed files with 14 additions and 120 deletions

View file

@ -0,0 +1,10 @@
--- Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h 2021-04-26 18:33:58.641158572 +0200
+++ - 2021-04-26 18:46:55.642218961 +0200
@@ -12,6 +12,7 @@
#undef signals
#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
#include <webkit2/webkit2.h>
#include <X11/Xlib.h>
#define signals public

View file

@ -1,10 +0,0 @@
--- Telegram/ThirdParty/tgcalls/tgcalls/group/StreamingPart.h 2021-03-17 21:29:27.000000000 +0100
+++ - 2021-03-21 21:11:50.643605199 +0100
@@ -3,6 +3,7 @@
#include "absl/types/optional.h"
#include <vector>
+#include <cstdint>
namespace tgcalls {

View file

@ -1,22 +0,0 @@
From 3582bca53a1e195a31760978dc41f67ce44fc7e4 Mon Sep 17 00:00:00 2001
From: Ilya Fedin <fedin-ilja2010@ya.ru>
Date: Mon, 22 Mar 2021 18:56:15 +0400
Subject: [PATCH] Fix build on 32-bit systems
---
base/platform/linux/base_last_input_linux.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/platform/linux/base_last_input_linux.cpp b/base/platform/linux/base_last_input_linux.cpp
index c51d890..b20bd03 100644
--- Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
+++ Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
@@ -135,7 +135,7 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
{},
"org.gnome.Mutter.IdleMonitor");
- const auto value = GlibVariantCast<ulong>(reply.get_child(0));
+ const auto value = GlibVariantCast<uint>(reply.get_child(0));
return (crl::now() - static_cast<crl::time>(value));
} catch (const Glib::Error &e) {
static const auto NotSupportedErrors = {

View file

@ -1,84 +0,0 @@
From c08a148bafc27f35011b805e773993300c55713f Mon Sep 17 00:00:00 2001
From: Ilya Fedin <fedin-ilja2010@ya.ru>
Date: Tue, 23 Mar 2021 18:27:13 +0400
Subject: [PATCH] Fix build on 32-bit systems
---
.../platform/linux/linux_mpris_support.cpp | 12 ++++++------
.../SourceFiles/platform/linux/main_window_linux.cpp | 4 ++--
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
index 3a3d05a1324..339ae554ef8 100644
--- Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
+++ Telegram/SourceFiles/platform/linux/linux_mpris_support.cpp
@@ -96,7 +96,7 @@ auto CreateMetadata(const Media::Player::TrackState &state) {
if (!Media::Player::IsStoppedOrStopping(state.state)) {
result["mpris:trackid"] = Glib::wrap(g_variant_new_object_path(
kFakeTrackPath.utf8().constData()));
- result["mpris:length"] = Glib::Variant<long>::create(
+ result["mpris:length"] = Glib::Variant<gint64>::create(
state.length * 1000);
const auto audioData = state.id.audio();
@@ -159,7 +159,7 @@ void HandleMethodCall(
} else if (method_name == "Previous") {
Media::Player::instance()->previous();
} else if (method_name == "Seek") {
- const auto offset = base::Platform::GlibVariantCast<long>(
+ const auto offset = base::Platform::GlibVariantCast<gint64>(
parametersCopy.get_child(0));
const auto state = Media::Player::instance()->getState(
@@ -170,7 +170,7 @@ void HandleMethodCall(
float64(state.position * 1000 + offset)
/ (state.length * 1000));
} else if (method_name == "SetPosition") {
- const auto position = base::Platform::GlibVariantCast<long>(
+ const auto position = base::Platform::GlibVariantCast<gint64>(
parametersCopy.get_child(1));
const auto state = Media::Player::instance()->getState(
@@ -251,7 +251,7 @@ void HandleGetProperty(
const auto state = Media::Player::instance()->getState(
kSongType);
- property = Glib::Variant<long>::create(state.position * 1000);
+ property = Glib::Variant<gint64>::create(state.position * 1000);
} else if (property_name == "Rate") {
property = Glib::Variant<float64>::create(1.0);
} else if (property_name == "Volume") {
@@ -315,7 +315,7 @@ void PlayerPropertyChanged(
}
}
-void Seeked(long position) {
+void Seeked(gint64 position) {
try {
const auto connection = Gio::DBus::Connection::get_sync(
Gio::DBus::BusType::BUS_TYPE_SESSION);
@@ -348,7 +348,7 @@ class MPRISSupport::Private {
std::map<Glib::ustring, Glib::VariantBase> metadata;
Glib::ustring playbackStatus;
- long position = 0;
+ gint64 position = 0;
rpl::lifetime lifetime;
};
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
index 139667ea6ff..624e5107a02 100644
--- Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -880,9 +880,9 @@ void MainWindow::updateIconCounters() {
if (counterSlice > 0) {
// According to the spec, it should be of 'x' D-Bus signature,
- // which corresponds to gint64 (signed long) type with glib
+ // which corresponds to gint64 type with glib
// https://wiki.ubuntu.com/Unity/LauncherAPI#Low_level_DBus_API:_com.canonical.Unity.LauncherEntry
- dbusUnityProperties["count"] = Glib::Variant<long>::create(
+ dbusUnityProperties["count"] = Glib::Variant<gint64>::create(
counterSlice);
dbusUnityProperties["count-visible"] =
Glib::Variant<bool>::create(true);

View file

@ -1,7 +1,7 @@
# Template file for 'telegram-desktop'
pkgname=telegram-desktop
version=2.7.1
revision=2
version=2.7.2
revision=1
wrksrc="tdesktop-${version}-full"
build_style=cmake
build_helper="qemu"
@ -17,7 +17,7 @@ makedepends="alsa-lib-devel ffmpeg-devel libdbusmenu-glib-devel libopenal-devel
libva-devel rapidjson liblz4-devel liblzma-devel gtk+3-devel
MesaLib-devel libdbusmenu-qt5-devel qt5-wayland-devel libatomic-devel
xcb-util-keysyms-devel $(vopt_if spellcheck hunspell-devel)
kwayland-devel glibmm-devel tg_owt"
kwayland-devel glibmm-devel tg_owt webkit2gtk-devel"
depends="qt5-imageformats qt5-core>=5.15.2<5.15.3"
short_desc="Telegram Desktop messaging app"
maintainer="John <me@johnnynator.dev>"
@ -25,7 +25,7 @@ license="GPL-3.0-or-later, OpenSSL"
homepage="https://desktop.telegram.org/"
changelog="https://github.com/telegramdesktop/tdesktop/blob/v${version}/changelog.txt"
distfiles="https://github.com/telegramdesktop/tdesktop/releases/download/v${version}/tdesktop-${version}-full.tar.gz"
checksum=41bfbe1ee63da9a6af7cf7d11b1cdd13a6754b51b294ac5a9d56f5f11dfbdd05
checksum=b67acb650e72efb8f8d3eb9175f210f5820d9cabb7f12891a197da6a69f454de
build_options="spellcheck"
build_options_default="spellcheck"