diff options
author | Dan Elkouby | 2019-12-29 14:24:15 +0200 |
---|---|---|
committer | Dan Elkouby | 2019-12-29 15:27:18 +0200 |
commit | 0964327125a8bc35fe18c2f5e8bc22cf6e57c969 (patch) | |
tree | 56c395d10ab9b027a157b41bd29e5b809399dc2e | |
parent | 49bd5aa5790a7e0fda365ba49b030f6ea8413af2 (diff) | |
download | aur-0964327125a8bc35fe18c2f5e8bc22cf6e57c969.tar.gz |
Add customizations
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | always_clear_history_for_everyone.patch | 16 | ||||
-rw-r--r-- | always_delete_for_everyone.patch | 16 | ||||
-rw-r--r-- | always_pin_without_notify.patch | 16 | ||||
-rw-r--r-- | always_send_as_photo_or_album.patch | 23 | ||||
-rw-r--r-- | clicky_sticker_panel.patch | 84 | ||||
-rw-r--r-- | dont_pulse_mentions.patch | 23 | ||||
-rw-r--r-- | no_circles.patch | 15 |
10 files changed, 260 insertions, 13 deletions
@@ -1,7 +1,7 @@ -pkgbase = telegram-desktop - pkgdesc = Official Telegram Desktop client +pkgbase = telegram-desktop9 + pkgdesc = Official Telegram Desktop client (personal build) pkgver = 1.8.15 - pkgrel = 2 + pkgrel = 1 url = https://desktop.telegram.org/ arch = x86_64 license = GPL3 @@ -21,6 +21,8 @@ pkgbase = telegram-desktop depends = openssl optdepends = libnotify: desktop notifications optdepends = ttf-opensans: default Open Sans font family + provides = telegram-desktop + conflicts = telegram-desktop source = tdesktop::git+https://github.com/telegramdesktop/tdesktop.git#tag=v1.8.15 source = libtgvoip::git+https://github.com/telegramdesktop/libtgvoip source = variant::git+https://github.com/mapbox/variant @@ -38,6 +40,13 @@ pkgbase = telegram-desktop source = tdesktop_lottie_animation_qtdebug.patch source = Revert-Change-some-private-header-includes.patch source = Use-system-wide-font.patch + source = always_delete_for_everyone.patch + source = always_clear_history_for_everyone.patch + source = always_pin_without_notify.patch + source = always_send_as_photo_or_album.patch + source = clicky_sticker_panel.patch + source = dont_pulse_mentions.patch + source = no_circles.patch sha512sums = SKIP sha512sums = SKIP sha512sums = SKIP @@ -55,6 +64,13 @@ pkgbase = telegram-desktop sha512sums = 79fcbee94f09df6b443c2b967afe4cba367985af13004b130da27f7bdf20974f76148a8056e98ce92000fabed80a1ff3cb2d332f6f8c70eed8aa909281533cd5 sha512sums = 087dd821690dfedf1c275f264a0223b123e31ab9ee95050023930470bc9c866958cae00e2fd9132e6f7efbc4f1dfc3fdc20f8fba1fc9472d92bd702eaa60adb0 sha512sums = 2c1bb75449b4634befa3edaac5d20e4b29ede21119549d9a3895dda9d4723f618dd950ee32133e04186fa65d07f80081ba3e3d5585209ba9112aa754d06fbb5c + sha512sums = 83af5f5d18bc26d2de5318b97f31956f34ceb0c14efa8cf36c310a543c8c7d3a448c4c448f2fac1e552b40816273bb5139666ff2fa20e2762148ee69ac20d4cb + sha512sums = d32c2e0544b858842317b704e58016e028555a3baad6b22226e826c11dac8a412c808ffe8a7ea0f3f23c00c591e1a6e652c2ba63d8369491e188560f8296d0cb + sha512sums = 91a0edab6408a223db77b75df5a913ffd36efa79340e8d78fa01ac2c3b6e09d5a5fc7fa214ccd40473093809f86b7aef199cebf56a1d5821c20083c4a3e5780b + sha512sums = 8b4560deaa06ee20eeaa0d6b855f7a8e922804698f9b274875ece8842231bcf688a31f588cb5c726152b3e7b8784c0b5f61eed0eb48e5392dfdfd72117ee8bb1 + sha512sums = 4f5b61073b4bd28d2cf92cb6bddb91a50518c4ce801d178366b3760ee2cf1692164546e439049c9ba821e23bff2e3080a42bfabf6fa46d613fd56905b405f340 + sha512sums = 128c139e2e7cd3b12a4a31af1cac1c326b5ed95763499c95a2484efe12cf5f448e3c8e83d73e90169651478e091abfbe505a9001bbb49e8f9fa139cca3aa5012 + sha512sums = 048c6784fb0bb9182d07916fdfab9f9952cdcb1998b0f780ce74bf03b61ae62774611819db7de5fec5019b9158b42c3912ca28797aeca41a881493e5822afcd8 -pkgname = telegram-desktop +pkgname = telegram-desktop9 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a1d8ee9f96bf --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +Catch2 +GSL +crl +libtgvoip +rlottie +tdesktop +variant +xxHash + +src +pkg + +*.pkg.tar* @@ -1,13 +1,14 @@ -# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com> +# Maintainer: Dan Elkouby <streetwalkermc@gmail.com> +# Contributor: Sven-Hendrik Haase <svenstaro@gmail.com> # Contributor: hexchain <i@hexchain.org> # Thanks Nicholas Guriev <guriev-ns@ya.ru> for the patches! # https://github.com/mymedia2/tdesktop -pkgname=telegram-desktop +pkgname=telegram-desktop9 pkgver=1.8.15 -pkgrel=2 -pkgdesc='Official Telegram Desktop client' +pkgrel=1 +pkgdesc='Official Telegram Desktop client (personal build)' arch=('x86_64') url="https://desktop.telegram.org/" license=('GPL3') @@ -15,6 +16,8 @@ depends=('ffmpeg' 'hicolor-icon-theme' 'minizip' 'openal' 'qt5-base' 'qt5-imagef makedepends=('cmake' 'git' 'gyp' 'range-v3' 'python' 'libappindicator-gtk3' 'dos2unix') optdepends=('libnotify: desktop notifications' 'ttf-opensans: default Open Sans font family') +provides=('telegram-desktop') +conflicts=('telegram-desktop') source=( "tdesktop::git+https://github.com/telegramdesktop/tdesktop.git#tag=v$pkgver" "libtgvoip::git+https://github.com/telegramdesktop/libtgvoip" @@ -34,6 +37,14 @@ source=( "tdesktop_lottie_animation_qtdebug.patch" "Revert-Change-some-private-header-includes.patch" "Use-system-wide-font.patch" + + "always_delete_for_everyone.patch" + "always_clear_history_for_everyone.patch" + "always_pin_without_notify.patch" + "always_send_as_photo_or_album.patch" + "clicky_sticker_panel.patch" + "dont_pulse_mentions.patch" + "no_circles.patch" ) sha512sums=('SKIP' 'SKIP' @@ -51,7 +62,14 @@ sha512sums=('SKIP' 'd5cd7ecb5583258462c21a9ae3d4e8ae8c709d47d7ce2c45f8ae23100d24993398b8372021957b9a4607b3988f366e1c0cf64d724d901cb70212665c481217e9' '79fcbee94f09df6b443c2b967afe4cba367985af13004b130da27f7bdf20974f76148a8056e98ce92000fabed80a1ff3cb2d332f6f8c70eed8aa909281533cd5' '087dd821690dfedf1c275f264a0223b123e31ab9ee95050023930470bc9c866958cae00e2fd9132e6f7efbc4f1dfc3fdc20f8fba1fc9472d92bd702eaa60adb0' - '2c1bb75449b4634befa3edaac5d20e4b29ede21119549d9a3895dda9d4723f618dd950ee32133e04186fa65d07f80081ba3e3d5585209ba9112aa754d06fbb5c') + '2c1bb75449b4634befa3edaac5d20e4b29ede21119549d9a3895dda9d4723f618dd950ee32133e04186fa65d07f80081ba3e3d5585209ba9112aa754d06fbb5c' + '83af5f5d18bc26d2de5318b97f31956f34ceb0c14efa8cf36c310a543c8c7d3a448c4c448f2fac1e552b40816273bb5139666ff2fa20e2762148ee69ac20d4cb' + 'd32c2e0544b858842317b704e58016e028555a3baad6b22226e826c11dac8a412c808ffe8a7ea0f3f23c00c591e1a6e652c2ba63d8369491e188560f8296d0cb' + '91a0edab6408a223db77b75df5a913ffd36efa79340e8d78fa01ac2c3b6e09d5a5fc7fa214ccd40473093809f86b7aef199cebf56a1d5821c20083c4a3e5780b' + '8b4560deaa06ee20eeaa0d6b855f7a8e922804698f9b274875ece8842231bcf688a31f588cb5c726152b3e7b8784c0b5f61eed0eb48e5392dfdfd72117ee8bb1' + '4f5b61073b4bd28d2cf92cb6bddb91a50518c4ce801d178366b3760ee2cf1692164546e439049c9ba821e23bff2e3080a42bfabf6fa46d613fd56905b405f340' + '128c139e2e7cd3b12a4a31af1cac1c326b5ed95763499c95a2484efe12cf5f448e3c8e83d73e90169651478e091abfbe505a9001bbb49e8f9fa139cca3aa5012' + '048c6784fb0bb9182d07916fdfab9f9952cdcb1998b0f780ce74bf03b61ae62774611819db7de5fec5019b9158b42c3912ca28797aeca41a881493e5822afcd8') prepare() { cd "$srcdir/tdesktop" @@ -74,6 +92,14 @@ prepare() { patch -Np1 -i "$srcdir/Revert-Change-some-private-header-includes.patch" patch -Np1 -i "$srcdir/Use-system-wide-font.patch" + patch -Np1 -i "$srcdir/always_delete_for_everyone.patch" + patch -Np1 -i "$srcdir/always_clear_history_for_everyone.patch" + patch -Np1 -i "$srcdir/always_pin_without_notify.patch" + patch -Np1 -i "$srcdir/always_send_as_photo_or_album.patch" + patch -Np1 -i "$srcdir/clicky_sticker_panel.patch" + patch -Np1 -i "$srcdir/dont_pulse_mentions.patch" + patch -Np1 -i "$srcdir/no_circles.patch" + unix2dos "$srcdir/tdesktop/.appveyor/install.bat" # disable static-qt for rlottie sed "/RLOTTIE_WITH_STATIC_QT/d" -i "$srcdir/tdesktop/Telegram/gyp/lib_rlottie.gyp" @@ -86,7 +112,7 @@ prepare() { build() { cd "$srcdir/tdesktop" export LANG=en_US.UTF-8 - export GYP_DEFINES="TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME,TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION" + export GYP_DEFINES="TDESKTOP_DISABLE_CRASH_REPORTS,TDESKTOP_DISABLE_AUTOUPDATE,TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME,TDESKTOP_DISABLE_DESKTOP_FILE_GENERATION,TDESKTOP_FORCE_GTK_FILE_DIALOG" export EXTRA_FLAGS="-Winvalid-pch" export CPPFLAGS="$CPPFLAGS $EXTRA_FLAGS" export CXXFLAGS="$CXXFLAGS $EXTRA_FLAGS" @@ -95,11 +121,10 @@ build() { # See https://github.com/telegramdesktop/tdesktop/commit/65b2db216033aa08b7bc846df27843e566f08981 and # https://github.com/telegramdesktop/tdesktop/issues/4717 # The official API_ID seems to be 2040 while the API_HASH is "b18441a1ff607e10a989891a5462e627". - # We're going to use the defaults for now but might at some point use the official ones from the official binaries as noted above. gyp \ - -Dapi_id=17349 \ - -Dapi_hash=344583e45741c457fe1862106095a5eb \ + -Dapi_id=2040 \ + -Dapi_hash=b18441a1ff607e10a989891a5462e627 \ -Dbuild_defines=${GYP_DEFINES} \ -Gconfig=Release \ --depth=Telegram/gyp --generator-output=../.. -Goutput_dir=out Telegram/gyp/Telegram.gyp --format=cmake diff --git a/always_clear_history_for_everyone.patch b/always_clear_history_for_everyone.patch new file mode 100644 index 000000000000..b19de25b070c --- /dev/null +++ b/always_clear_history_for_everyone.patch @@ -0,0 +1,16 @@ +Description: Selects the "clear history for {other party}" by default +Credits: novie + +diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp +index 1f392acb9..dccf06391 100644 +--- a/Telegram/SourceFiles/boxes/confirm_box.cpp ++++ b/Telegram/SourceFiles/boxes/confirm_box.cpp +@@ -522,7 +522,7 @@ void DeleteMessagesBox::prepare() { + : st::attentionBoxButton); + } + if (auto revoke = revokeText(peer)) { +- _revoke.create(this, revoke->checkbox, false, st::defaultBoxCheckbox); ++ _revoke.create(this, revoke->checkbox, true, st::defaultBoxCheckbox); + appendDetails(std::move(revoke->description)); + } + } else if (_moderateFrom) { diff --git a/always_delete_for_everyone.patch b/always_delete_for_everyone.patch new file mode 100644 index 000000000000..f401a6ae1bb3 --- /dev/null +++ b/always_delete_for_everyone.patch @@ -0,0 +1,16 @@ +Description: Selects the delete for {other party} checkbox by default +Credits: novie + +diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp +index 4f8699f37..369048168 100644 +--- a/Telegram/SourceFiles/boxes/confirm_box.cpp ++++ b/Telegram/SourceFiles/boxes/confirm_box.cpp +@@ -545,7 +545,7 @@ void DeleteMessagesBox::prepare() { + auto count = int(_ids.size()); + if (hasScheduledMessages()) { + } else if (auto revoke = revokeText(peer)) { +- _revoke.create(this, revoke->checkbox, false, st::defaultBoxCheckbox); ++ _revoke.create(this, revoke->checkbox, true, st::defaultBoxCheckbox); + appendDetails(std::move(revoke->description)); + } else if (peer->isChannel()) { + if (peer->isMegagroup()) { diff --git a/always_pin_without_notify.patch b/always_pin_without_notify.patch new file mode 100644 index 000000000000..18ed7c2c7653 --- /dev/null +++ b/always_pin_without_notify.patch @@ -0,0 +1,16 @@ +Description: Deselects the "Notify all members" checkbox by default +Credits: novie + +diff --git a/Telegram/SourceFiles/boxes/confirm_box.cpp b/Telegram/SourceFiles/boxes/confirm_box.cpp +index c80aea98b..8ae53cddc 100644 +--- a/Telegram/SourceFiles/boxes/confirm_box.cpp ++++ b/Telegram/SourceFiles/boxes/confirm_box.cpp +@@ -401,7 +401,7 @@ void PinMessageBox::prepare() { + addButton(tr::lng_cancel(), [this] { closeBox(); }); + + if (_peer->isChat() || _peer->isMegagroup()) { +- _notify.create(this, tr::lng_pinned_notify(tr::now), true, st::defaultBoxCheckbox); ++ _notify.create(this, tr::lng_pinned_notify(tr::now), false, st::defaultBoxCheckbox); + } + + auto height = st::boxPadding.top() + _text->height() + st::boxPadding.bottom(); diff --git a/always_send_as_photo_or_album.patch b/always_send_as_photo_or_album.patch new file mode 100644 index 000000000000..77e05223600c --- /dev/null +++ b/always_send_as_photo_or_album.patch @@ -0,0 +1,23 @@ +Description: Disables loading the previous way media was sent, so it always selects either +photo or album by default. +Credits: udf + +diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp +index 2f4c45c48..ed9bf4bb6 100644 +--- a/Telegram/SourceFiles/boxes/send_files_box.cpp ++++ b/Telegram/SourceFiles/boxes/send_files_box.cpp +@@ -1498,14 +1498,6 @@ void SendFilesBox::initSendWay() { + ? SendFilesWay::Album + : SendFilesWay::Photos; + } +- const auto way = _controller->session().settings().sendFilesWay(); +- if (way == SendFilesWay::Files) { +- return way; +- } else if (way == SendFilesWay::Album) { +- return _list.albumIsPossible +- ? SendFilesWay::Album +- : SendFilesWay::Photos; +- } + return (_list.albumIsPossible && !_albumPhotosCount) + ? SendFilesWay::Album + : SendFilesWay::Photos; diff --git a/clicky_sticker_panel.patch b/clicky_sticker_panel.patch new file mode 100644 index 000000000000..47a514b2bb29 --- /dev/null +++ b/clicky_sticker_panel.patch @@ -0,0 +1,84 @@ +Description: open the sticker panel by clicking rather than hovering, disable persistent column +Credits: JuanPotato, novie + +diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +index fad55a7d9..7bb7f09e0 100644 +--- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp ++++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +@@ -237,10 +237,12 @@ void TabbedPanel::leaveEventHook(QEvent *e) { + } + + void TabbedPanel::otherEnter() { ++ return; + showAnimated(); + } + + void TabbedPanel::otherLeave() { ++ return; + if (preventAutoHide()) { + return; + } +diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp +index fd549bf9a..245fb7357 100644 +--- a/Telegram/SourceFiles/history/history_widget.cpp ++++ b/Telegram/SourceFiles/history/history_widget.cpp +@@ -3909,6 +3909,7 @@ void HistoryWidget::onModerateKeyActivate(int index, bool *outHandled) { + + void HistoryWidget::pushTabbedSelectorToThirdSection( + const Window::SectionShow ¶ms) { ++ return; + if (!_history || !_tabbedPanel) { + return; + } else if (!_canSendMessages) { +@@ -3950,18 +3951,7 @@ void HistoryWidget::setTabbedPanel(std::unique_ptr<TabbedPanel> panel) { + } + + void HistoryWidget::toggleTabbedSelectorMode() { +- if (_tabbedPanel) { +- if (controller()->canShowThirdSection() && !Adaptive::OneColumn()) { +- session().settings().setTabbedSelectorSectionEnabled(true); +- session().saveSettingsDelayed(); +- pushTabbedSelectorToThirdSection( +- Window::SectionShow::Way::ClearStack); +- } else { +- _tabbedPanel->toggleAnimated(); +- } +- } else { +- controller()->closeThirdSection(); +- } ++ _tabbedPanel->toggleAnimated(); + } + + void HistoryWidget::recountChatWidth() { +diff --git a/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp b/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp +index 41e8e143e..4f973c46c 100644 +--- a/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp ++++ b/Telegram/SourceFiles/history/view/history_view_compose_controls.cpp +@@ -337,6 +337,7 @@ void ComposeControls::escape() { + + void ComposeControls::pushTabbedSelectorToThirdSection( + const Window::SectionShow ¶ms) { ++ return; + if (!_tabbedPanel) { + return; + //} else if (!_canSendMessages) { +@@ -383,18 +384,7 @@ void ComposeControls::setTabbedPanel( + } + + void ComposeControls::toggleTabbedSelectorMode() { +- if (_tabbedPanel) { +- if (_window->canShowThirdSection() && !Adaptive::OneColumn()) { +- session().settings().setTabbedSelectorSectionEnabled(true); +- session().saveSettingsDelayed(); +- pushTabbedSelectorToThirdSection( +- Window::SectionShow::Way::ClearStack); +- } else { +- _tabbedPanel->toggleAnimated(); +- } +- } else { +- _window->closeThirdSection(); +- } ++ _tabbedPanel->toggleAnimated(); + } + + void ComposeControls::updateHeight() { diff --git a/dont_pulse_mentions.patch b/dont_pulse_mentions.patch new file mode 100644 index 000000000000..ec978229ff05 --- /dev/null +++ b/dont_pulse_mentions.patch @@ -0,0 +1,23 @@ +Description: disables visual distractions from incoming mentions +Credits: novie + +diff --git a/Telegram/SourceFiles/history/history_inner_widget.cpp b/Telegram/SourceFiles/history/history_inner_widget.cpp +index 305f9c71d..c0add9da2 100644 +--- a/Telegram/SourceFiles/history/history_inner_widget.cpp ++++ b/Telegram/SourceFiles/history/history_inner_widget.cpp +@@ -626,7 +626,6 @@ void HistoryInner::paintEvent(QPaintEvent *e) { + } + if (item->isUnreadMention() && !item->isUnreadMedia()) { + readMentions.insert(item); +- _widget->enqueueMessageHighlight(view); + } + + int32 h = view->height(); +@@ -672,7 +671,6 @@ void HistoryInner::paintEvent(QPaintEvent *e) { + } + if (item->isUnreadMention() && !item->isUnreadMedia()) { + readMentions.insert(item); +- _widget->enqueueMessageHighlight(view); + } + } + p.translate(0, h); diff --git a/no_circles.patch b/no_circles.patch new file mode 100644 index 000000000000..4d0a56d69928 --- /dev/null +++ b/no_circles.patch @@ -0,0 +1,15 @@ +Description: changes all round pictures to rounded rectangles +Credits: novie + +diff --git a/Telegram/SourceFiles/ui/image/image.cpp b/Telegram/SourceFiles/ui/image/image.cpp +index 559e0e9b5..24afa50e7 100644 +--- a/Telegram/SourceFiles/ui/image/image.cpp ++++ b/Telegram/SourceFiles/ui/image/image.cpp +@@ -609,6 +609,7 @@ const QPixmap &Image::pixCircled( + Data::FileOrigin origin, + int32 w, + int32 h) const { ++ return pixRounded(origin, w, h, ImageRoundRadius::Large, RectPart::AllCorners); + checkSource(); + + if (w <= 0 || !width() || !height()) { |