diff --git a/README.md b/README.md index 9589e523b..aa6f19cd0 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,26 @@ -# [Telegram Desktop][telegram_desktop] – Official Messenger +# Kotatogram – experimental [Telegram Desktop][telegram_desktop] fork. -This is the complete source code and the build instructions for the alpha version of the official desktop client for the [Telegram][telegram] messenger, based on the [Telegram API][telegram_api] and the [MTProto][telegram_proto] secure protocol. +Original README with build instructions and licenses could be found in [Telegram Desktop repository][telegram_desktop_readme]. -[![Version](https://badge.fury.io/gh/telegramdesktop%2Ftdesktop.svg)](https://github.com/telegramdesktop/tdesktop/releases) -[![Build Status](https://travis-ci.org/telegramdesktop/tdesktop.svg?branch=dev)](https://travis-ci.org/telegramdesktop/tdesktop) -[![Build status](https://ci.appveyor.com/api/projects/status/uiw2y768iy4i5bu8/branch/dev?svg=true)](https://ci.appveyor.com/project/telegramdesktop/tdesktop) +There will be builds of Kotatogram for Windows, and possibly Linux. No autoupdates for now. -[![Preview of Telegram Desktop][preview_image]][preview_image_url] +Expect a lot of breaking changes. -The source code is published under GPLv3 with OpenSSL exception, the license is available [here][license]. +## Changes -## Supported systems - -* Windows XP - Windows 10 (**not** RT) -* Mac OS X 10.8 - Mac OS X 10.11 -* Mac OS X 10.6 - Mac OS X 10.7 (separate build) -* Ubuntu 12.04 - Ubuntu 19.04 -* Fedora 22 - Fedora 30 -* [Snappy](https://snapcraft.io/telegram-desktop) -* [Flathub](https://flathub.org/apps/details/org.telegram.desktop) - -## Third-party - -* Qt 5.3.2 and 5.6.2, slightly patched ([LGPL](http://doc.qt.io/qt-5/lgpl.html)) -* OpenSSL 1.0.1g ([OpenSSL License](https://www.openssl.org/source/license.html)) -* zlib 1.2.8 ([zlib License](http://www.zlib.net/zlib_license.html)) -* libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)) -* LZMA SDK 9.20 ([public domain](http://www.7-zip.org/sdk.html)) -* liblzma ([public domain](http://tukaani.org/xz/)) -* Google Breakpad ([License](https://chromium.googlesource.com/breakpad/breakpad/+/master/LICENSE)) -* Google Crashpad ([Apache License 2.0](https://chromium.googlesource.com/crashpad/crashpad/+/master/LICENSE)) -* GYP ([BSD License](https://github.com/bnoordhuis/gyp/blob/master/LICENSE)) -* Ninja ([Apache License 2.0](https://github.com/ninja-build/ninja/blob/master/COPYING)) -* OpenAL Soft ([LGPL](https://github.com/kcat/openal-soft/blob/master/COPYING)) -* Opus codec ([BSD License](http://www.opus-codec.org/license/)) -* FFmpeg ([LGPL](https://www.ffmpeg.org/legal.html)) -* Guideline Support Library ([MIT License](https://github.com/Microsoft/GSL/blob/master/LICENSE)) -* Mapbox Variant ([BSD License](https://github.com/mapbox/variant/blob/master/LICENSE)) -* Range-v3 ([Boost License](https://github.com/ericniebler/range-v3/blob/master/LICENSE.txt)) -* Open Sans font ([Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)) -* Emoji alpha codes ([MIT License](https://github.com/emojione/emojione/blob/master/extras/alpha-codes/LICENSE.md)) -* Catch test framework ([Boost License](https://github.com/philsquared/Catch/blob/master/LICENSE.txt)) -* xxHash ([BSD License](https://github.com/Cyan4973/xxHash/blob/dev/LICENSE)) - -## Build instructions - -* [Visual Studio 2019][msvc] -* [Xcode 10][xcode] -* [GYP/CMake on GNU/Linux][cmake] +* Mention user by name, even if username was set (right mouse click on mention suggestion). +* Clickable links in user bios. +* Custom font start options: + * `-mainfont` to set main font family (e.g. `-mainfont "Open Sans"`). + * `-semiboldfont` to set semibold font family (`-semiboldfont "Open Sans Semibold"`). + * `-semiboldisbold` - if you want set semibold font to be bold. If you pass `Open Sans Bold` to `-semiboldfont`, that won't work. You should use family name (e.g. `-semiboldfont "Open Sans" -semiboldisbold`) + * `-monospacefont` to set monospaced font (e.g. `-monospacefont "Consolas"`) +* You can set "Nobody" in profile photo privacy. +* Minimum photo size in chat has been increased to 200px, so captions should be more readable. +* Maximum sticker size in chat has been decreased to 128px. +* Maximum caption field height has been increased to 150px (should fit about 5 lines). +* Allow interface scales `75-99` to be saved after restarting without start option. [//]: # (LINKS) -[telegram]: https://telegram.org [telegram_desktop]: https://desktop.telegram.org -[telegram_api]: https://core.telegram.org -[telegram_proto]: https://core.telegram.org/mtproto -[license]: LICENSE -[msvc]: docs/building-msvc.md -[xcode]: docs/building-xcode.md -[xcode_old]: docs/building-xcode-old.md -[cmake]: docs/building-cmake.md -[preview_image]: https://github.com/telegramdesktop/tdesktop/blob/dev/docs/assets/preview.png "Preview of Telegram Desktop" -[preview_image_url]: https://raw.githubusercontent.com/telegramdesktop/tdesktop/dev/docs/assets/preview.png +[telegram_desktop_readme]: https://github.com/telegramdesktop/tdesktop/blob/dev/README.md diff --git a/Telegram/Resources/art/favicon.ico b/Telegram/Resources/art/favicon.ico index 5c23320d6..7a3551000 100644 Binary files a/Telegram/Resources/art/favicon.ico and b/Telegram/Resources/art/favicon.ico differ diff --git a/Telegram/Resources/art/icon128.png b/Telegram/Resources/art/icon128.png index 0a2c3b969..59e7e25b3 100644 Binary files a/Telegram/Resources/art/icon128.png and b/Telegram/Resources/art/icon128.png differ diff --git a/Telegram/Resources/art/icon128@2x.png b/Telegram/Resources/art/icon128@2x.png index 4a7bbb4e4..f4616cc30 100644 Binary files a/Telegram/Resources/art/icon128@2x.png and b/Telegram/Resources/art/icon128@2x.png differ diff --git a/Telegram/Resources/art/icon16.png b/Telegram/Resources/art/icon16.png index a3553a4bc..b753bbb18 100644 Binary files a/Telegram/Resources/art/icon16.png and b/Telegram/Resources/art/icon16.png differ diff --git a/Telegram/Resources/art/icon16@2x.png b/Telegram/Resources/art/icon16@2x.png index 32b6a5686..c19f3b6db 100644 Binary files a/Telegram/Resources/art/icon16@2x.png and b/Telegram/Resources/art/icon16@2x.png differ diff --git a/Telegram/Resources/art/icon256.ico b/Telegram/Resources/art/icon256.ico index 3a53b3b51..4749c1f79 100644 Binary files a/Telegram/Resources/art/icon256.ico and b/Telegram/Resources/art/icon256.ico differ diff --git a/Telegram/Resources/art/icon256.png b/Telegram/Resources/art/icon256.png index 2e818f129..5ecf12d4a 100644 Binary files a/Telegram/Resources/art/icon256.png and b/Telegram/Resources/art/icon256.png differ diff --git a/Telegram/Resources/art/icon256@2x.png b/Telegram/Resources/art/icon256@2x.png index dc2da2b33..ef4fc7d25 100644 Binary files a/Telegram/Resources/art/icon256@2x.png and b/Telegram/Resources/art/icon256@2x.png differ diff --git a/Telegram/Resources/art/icon32.png b/Telegram/Resources/art/icon32.png index 231c1e335..66868915e 100644 Binary files a/Telegram/Resources/art/icon32.png and b/Telegram/Resources/art/icon32.png differ diff --git a/Telegram/Resources/art/icon32@2x.png b/Telegram/Resources/art/icon32@2x.png index c4e635afe..74697abfd 100644 Binary files a/Telegram/Resources/art/icon32@2x.png and b/Telegram/Resources/art/icon32@2x.png differ diff --git a/Telegram/Resources/art/icon48.png b/Telegram/Resources/art/icon48.png index ff2b2c759..5e214df0a 100644 Binary files a/Telegram/Resources/art/icon48.png and b/Telegram/Resources/art/icon48.png differ diff --git a/Telegram/Resources/art/icon48@2x.png b/Telegram/Resources/art/icon48@2x.png index c2d9bb58c..fb526b10c 100644 Binary files a/Telegram/Resources/art/icon48@2x.png and b/Telegram/Resources/art/icon48@2x.png differ diff --git a/Telegram/Resources/art/icon512.png b/Telegram/Resources/art/icon512.png index 7dc492002..28c5b8685 100644 Binary files a/Telegram/Resources/art/icon512.png and b/Telegram/Resources/art/icon512.png differ diff --git a/Telegram/Resources/art/icon512@2x.png b/Telegram/Resources/art/icon512@2x.png index 59ed2b9ab..d9ae73b8e 100644 Binary files a/Telegram/Resources/art/icon512@2x.png and b/Telegram/Resources/art/icon512@2x.png differ diff --git a/Telegram/Resources/art/icon64.png b/Telegram/Resources/art/icon64.png index b4111e8db..7fea82e8f 100644 Binary files a/Telegram/Resources/art/icon64.png and b/Telegram/Resources/art/icon64.png differ diff --git a/Telegram/Resources/art/icon64@2x.png b/Telegram/Resources/art/icon64@2x.png index 0a2c3b969..8a55764f0 100644 Binary files a/Telegram/Resources/art/icon64@2x.png and b/Telegram/Resources/art/icon64@2x.png differ diff --git a/Telegram/Resources/art/logo_256.png b/Telegram/Resources/art/logo_256.png index 2e818f129..e03acca61 100644 Binary files a/Telegram/Resources/art/logo_256.png and b/Telegram/Resources/art/logo_256.png differ diff --git a/Telegram/Resources/art/logo_256_no_margin.png b/Telegram/Resources/art/logo_256_no_margin.png index 1a94181b9..1d4b3d4c2 100644 Binary files a/Telegram/Resources/art/logo_256_no_margin.png and b/Telegram/Resources/art/logo_256_no_margin.png differ diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index fa3fa511b..8689090c3 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -223,6 +223,9 @@ namespace App { void initMedia() { if (!::monofont) { QString family; + if (!cMonospaceFont().isEmpty()) { + tryFontFamily(family, cMonospaceFont()); + } tryFontFamily(family, qsl("Consolas")); tryFontFamily(family, qsl("Liberation Mono")); tryFontFamily(family, qsl("Menlo")); diff --git a/Telegram/SourceFiles/boxes/about_box.cpp b/Telegram/SourceFiles/boxes/about_box.cpp index 45f82a765..2ffb611fd 100644 --- a/Telegram/SourceFiles/boxes/about_box.cpp +++ b/Telegram/SourceFiles/boxes/about_box.cpp @@ -27,11 +27,12 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace { rpl::producer Text1() { - return tr::lng_about_text1( - lt_api_link, - tr::lng_about_text1_api( - ) | Ui::Text::ToLink("https://core.telegram.org/api"), - Ui::Text::WithEntities); + return rpl::single( + qsl("Unofficial experimental fork of ") + + Ui::Text::Link( + "Telegram Desktop", + "https://github.com/telegramdesktop/tdesktop") + + qsl(".")); } rpl::producer Text2() { @@ -39,19 +40,25 @@ rpl::producer Text2() { lt_gpl_link, rpl::single(Ui::Text::Link( "GNU GPL", - "https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE")), + "https://github.com/kotatogram/kotatogram-desktop/blob/master/LICENSE")), lt_github_link, rpl::single(Ui::Text::Link( "GitHub", - "https://github.com/telegramdesktop/tdesktop")), + "https://github.com/kotatogram/kotatogram-desktop")), Ui::Text::WithEntities); } rpl::producer Text3() { - return tr::lng_about_text3( - lt_faq_link, - tr::lng_about_text3_faq() | Ui::Text::ToLink(telegramFaqLink()), - Ui::Text::WithEntities); + return rpl::single( + qsl("Visit ") + + Ui::Text::Link( + "Telegram FAQ", + telegramFaqLink()) + + qsl(" or ") + + Ui::Text::Link( + "Kotatogram channel", + telegramFaqLink()) + + qsl(" for more info.")); } } // namespace @@ -64,7 +71,7 @@ AboutBox::AboutBox(QWidget *parent) } void AboutBox::prepare() { - setTitle(rpl::single(qsl("Telegram Desktop"))); + setTitle(rpl::single(qsl("Kotatogram Desktop"))); addButton(tr::lng_close(), [this] { closeBox(); }); diff --git a/Telegram/SourceFiles/boxes/boxes.style b/Telegram/SourceFiles/boxes/boxes.style index 5e151ca73..8cbb512bc 100644 --- a/Telegram/SourceFiles/boxes/boxes.style +++ b/Telegram/SourceFiles/boxes/boxes.style @@ -563,7 +563,7 @@ autoDownloadLimitPadding: margins(22px, 8px, 22px, 8px); confirmCaptionArea: InputField(defaultInputField) { textMargins: margins(1px, 26px, 31px, 4px); - heightMax: 78px; + heightMax: 150px; } confirmBg: windowBgOver; confirmMaxHeight: 245px; diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp index 7d178ad24..6f41f42d8 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.cpp @@ -879,7 +879,7 @@ void FieldAutocompleteInner::setRecentInlineBotsInRows(int32 bots) { void FieldAutocompleteInner::mousePressEvent(QMouseEvent *e) { selectByMouse(e->globalPos()); - if (e->button() == Qt::LeftButton) { + if (e->button() == Qt::LeftButton || e->button() == Qt::RightButton) { if (_overDelete && _sel >= 0 && _sel < (_mrows->isEmpty() ? _hrows->size() : _recentInlineBotsInRows)) { bool removed = false; if (_mrows->isEmpty()) { @@ -909,7 +909,11 @@ void FieldAutocompleteInner::mousePressEvent(QMouseEvent *e) { selectByMouse(e->globalPos()); } else if (_srows->empty()) { - chooseSelected(FieldAutocomplete::ChooseMethod::ByClick); + if (e->button() == Qt::LeftButton) { + chooseSelected(FieldAutocomplete::ChooseMethod::ByClick); + } else if (e->button() == Qt::RightButton) { + chooseSelected(FieldAutocomplete::ChooseMethod::ByRightClick); + } } else { _down = _sel; _previewTimer.callOnce(QApplication::startDragTime()); @@ -932,7 +936,11 @@ void FieldAutocompleteInner::mouseReleaseEvent(QMouseEvent *e) { if (_sel < 0 || _sel != pressed || _srows->empty()) return; - chooseSelected(FieldAutocomplete::ChooseMethod::ByClick); + if (e->button() == Qt::LeftButton) { + chooseSelected(FieldAutocomplete::ChooseMethod::ByClick); + } else if (e->button() == Qt::RightButton) { + chooseSelected(FieldAutocomplete::ChooseMethod::ByRightClick); + } } void FieldAutocompleteInner::enterEventHook(QEvent *e) { diff --git a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h index c0880c5d2..29ab8b69f 100644 --- a/Telegram/SourceFiles/chat_helpers/field_autocomplete.h +++ b/Telegram/SourceFiles/chat_helpers/field_autocomplete.h @@ -70,6 +70,7 @@ public: ByEnter, ByTab, ByClick, + ByRightClick, }; bool chooseSelected(ChooseMethod method) const; diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 52d2662e3..6a7eb4980 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -11,7 +11,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "settings.h" constexpr str_const AppNameOld = "Telegram Win (Unofficial)"; -constexpr str_const AppName = "Telegram Desktop"; +constexpr str_const AppName = "Kotatogram Desktop"; constexpr str_const AppId = "{53F49750-6209-4FBF-9CA8-7A333C87D1ED}"; // used in updater.cpp and Setup.iss for Windows constexpr str_const AppFile = "Telegram"; diff --git a/Telegram/SourceFiles/core/crash_report_window.cpp b/Telegram/SourceFiles/core/crash_report_window.cpp index 79f26fbc6..8ac61313f 100644 --- a/Telegram/SourceFiles/core/crash_report_window.cpp +++ b/Telegram/SourceFiles/core/crash_report_window.cpp @@ -167,7 +167,7 @@ NotStartedWindow::NotStartedWindow() : _label(this) , _log(this) , _close(this) { - _label.setText(qsl("Could not start Telegram Desktop!\nYou can see complete log below:")); + _label.setText(qsl("Could not start Kotatogram Desktop!\nYou can see complete log below:")); _log.setPlainText(Logs::full()); @@ -303,9 +303,9 @@ LastCrashedWindow::LastCrashedWindow( connect(&_networkSettings, SIGNAL(clicked()), this, SLOT(onNetworkSettings())); if (_sendingState == SendingNoReport) { - _label.setText(qsl("Last time Telegram Desktop was not closed properly.")); + _label.setText(qsl("Last time Kotatogram Desktop was not closed properly.")); } else { - _label.setText(qsl("Last time Telegram Desktop crashed :(")); + _label.setText(qsl("Last time Kotatogram Desktop crashed :(")); } if (_updaterData) { @@ -364,7 +364,7 @@ LastCrashedWindow::LastCrashedWindow( connect(&_showReport, SIGNAL(clicked()), this, SLOT(onViewReport())); _saveReport.setText(qsl("SAVE TO FILE")); connect(&_saveReport, SIGNAL(clicked()), this, SLOT(onSaveReport())); - _getApp.setText(qsl("GET THE LATEST OFFICIAL VERSION OF TELEGRAM DESKTOP")); + _getApp.setText(qsl("GET THE LATEST VERSION OF KOTATOGRAM DESKTOP")); connect(&_getApp, SIGNAL(clicked()), this, SLOT(onGetApp())); _send.setText(qsl("SEND CRASH REPORT")); @@ -496,12 +496,12 @@ void LastCrashedWindow::onCheckingFinished() { LOG(("Crash report check for sending done, result: %1").arg(QString::fromUtf8(result))); if (result == "Old") { - _pleaseSendReport.setText(qsl("This report is about some old version of Telegram Desktop.")); + _pleaseSendReport.setText(qsl("This report is about some old version of Kotatogram Desktop.")); _sendingState = SendingTooOld; updateControls(); return; } else if (result == "Unofficial") { - _pleaseSendReport.setText(qsl("You use some custom version of Telegram Desktop.")); + _pleaseSendReport.setText(qsl("You use some custom version of Kotatogram Desktop.")); _sendingState = SendingUnofficial; updateControls(); return; @@ -781,7 +781,7 @@ void LastCrashedWindow::updateControls() { } QRect scr(QApplication::primaryScreen()->availableGeometry()); - QSize s(2 * padding + QFontMetrics(_label.font()).width(qsl("Last time Telegram Desktop was not closed properly.")) + padding + _networkSettings.width(), h); + QSize s(2 * padding + QFontMetrics(_label.font()).width(qsl("Last time Kotatogram Desktop was not closed properly.")) + padding + _networkSettings.width(), h); if (s == size()) { resizeEvent(0); } else { diff --git a/Telegram/SourceFiles/core/crash_reports.cpp b/Telegram/SourceFiles/core/crash_reports.cpp index ce938a3fa..b0e722ae1 100644 --- a/Telegram/SourceFiles/core/crash_reports.cpp +++ b/Telegram/SourceFiles/core/crash_reports.cpp @@ -435,7 +435,7 @@ StartResult Start() { fclose(f); LOG(("Opened '%1' for reading, the previous " - "Telegram Desktop launch was not finished properly :( " + "Kotatogram Desktop launch was not finished properly :( " "Crash log size: %2").arg(ReportPath).arg(lastdump.size())); return lastdump; diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp index 9237e629d..55248d1e4 100644 --- a/Telegram/SourceFiles/core/launcher.cpp +++ b/Telegram/SourceFiles/core/launcher.cpp @@ -391,6 +391,10 @@ void Launcher::processArguments() { { "-workdir" , KeyFormat::OneValue }, { "--" , KeyFormat::OneValue }, { "-scale" , KeyFormat::OneValue }, + { "-mainfont" , KeyFormat::OneValue }, + { "-semiboldfont" , KeyFormat::OneValue }, + { "-semiboldisbold" , KeyFormat::NoValues }, + { "-monospacefont" , KeyFormat::OneValue }, }; auto parseResult = QMap(); auto parsingKey = QByteArray(); @@ -448,6 +452,11 @@ void Launcher::processArguments() { ? kInterfaceScaleAuto : value; } + + gMainFont = parseResult.value("-mainfont", {}).join(QString()); + gSemiboldFont = parseResult.value("-semiboldfont", {}).join(QString()); + gSemiboldFontIsBold = parseResult.contains("-semiboldisbold"); + gMonospaceFont = parseResult.value("-monospacefont", {}).join(QString()); } int Launcher::executeApplication() { diff --git a/Telegram/SourceFiles/core/shortcuts.cpp b/Telegram/SourceFiles/core/shortcuts.cpp index e732ccef8..bb1fed68a 100644 --- a/Telegram/SourceFiles/core/shortcuts.cpp +++ b/Telegram/SourceFiles/core/shortcuts.cpp @@ -338,7 +338,7 @@ void Manager::writeDefaultFile() { return; } const char *defaultHeader = R"HEADER( -// This is a list of default shortcuts for Telegram Desktop +// This is a list of default shortcuts for Kotatogram Desktop // Please don't modify it, its content is not used in any way // You can place your own shortcuts in the 'shortcuts-custom.json' file diff --git a/Telegram/SourceFiles/core/version.h b/Telegram/SourceFiles/core/version.h index c5815787b..3034e8566 100644 --- a/Telegram/SourceFiles/core/version.h +++ b/Telegram/SourceFiles/core/version.h @@ -16,6 +16,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #endif // TDESKTOP_OFFICIAL_TARGET constexpr auto AppVersion = 1008008; -constexpr auto AppVersionStr = "1.8.8"; +constexpr auto AppVersionStr = "1.8.8-KTG1"; constexpr auto AppBetaVersion = false; constexpr auto AppAlphaVersion = TDESKTOP_ALPHA_VERSION; diff --git a/Telegram/SourceFiles/export/output/export_output_abstract.cpp b/Telegram/SourceFiles/export/output/export_output_abstract.cpp index e39468b12..73cf3480e 100644 --- a/Telegram/SourceFiles/export/output/export_output_abstract.cpp +++ b/Telegram/SourceFiles/export/output/export_output_abstract.cpp @@ -169,8 +169,8 @@ Stats AbstractWriter::produceTestExample( auto sessions = Data::SessionsList(); auto session = Data::Session(); - session.applicationName = "Telegram Desktop"; - session.applicationVersion = "1.3.8"; + session.applicationName = "Kotatogram Desktop"; + session.applicationVersion = "1.8.8"; session.country = "GB"; session.created = date(); session.deviceModel = "PC"; diff --git a/Telegram/SourceFiles/export/output/export_output_html.cpp b/Telegram/SourceFiles/export/output/export_output_html.cpp index 17dc6d19e..b5a6ee341 100644 --- a/Telegram/SourceFiles/export/output/export_output_html.cpp +++ b/Telegram/SourceFiles/export/output/export_output_html.cpp @@ -977,7 +977,7 @@ auto HtmlWriter::Wrap::pushMessage( dialog, basePath, "This message is not supported by this version " - "of Telegram Desktop. Please update the application.") }; + "of Kotatogram Desktop. Please update the application.") }; } const auto wrapReplyToLink = [&](const QByteArray &text) { diff --git a/Telegram/SourceFiles/export/output/export_output_text.cpp b/Telegram/SourceFiles/export/output/export_output_text.cpp index be0ebd507..d8eecb06c 100644 --- a/Telegram/SourceFiles/export/output/export_output_text.cpp +++ b/Telegram/SourceFiles/export/output/export_output_text.cpp @@ -104,7 +104,7 @@ QByteArray SerializeMessage( if (message.media.content.is()) { return "Error! This message is not supported " - "by this version of Telegram Desktop. " + "by this version of Kotatogram Desktop. " "Please update the application."; } diff --git a/Telegram/SourceFiles/export/view/export_view_settings.cpp b/Telegram/SourceFiles/export/view/export_view_settings.cpp index 1a6e4fd32..fdb89b911 100644 --- a/Telegram/SourceFiles/export/view/export_view_settings.cpp +++ b/Telegram/SourceFiles/export/view/export_view_settings.cpp @@ -256,7 +256,7 @@ void SettingsWidget::addLocationLabel( }) | rpl::distinct_until_changed( ) | rpl::map([](const QString &path) { const auto text = IsDefaultPath(path) - ? QString("Downloads/Telegram Desktop") + ? QString("Downloads/Kotatogram Desktop") : path; return Ui::Text::Link( QDir::toNativeSeparators(text), diff --git a/Telegram/SourceFiles/history/history.style b/Telegram/SourceFiles/history/history.style index 583f7725c..7c687681a 100644 --- a/Telegram/SourceFiles/history/history.style +++ b/Telegram/SourceFiles/history/history.style @@ -9,10 +9,10 @@ using "basic.style"; using "dialogs/dialogs.style"; using "ui/widgets/widgets.style"; -minPhotoSize: 100px; +minPhotoSize: 200px; minVideoSize: 160px; maxMediaSize: 430px; -maxStickerSize: 256px; +maxStickerSize: 128px; maxGifSize: 320px; maxVideoMessageSize: 240px; maxSignatureSize: 144px; diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index fb8119468..b25c7f644 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -376,7 +376,7 @@ HistoryWidget::HistoryWidget( InitMessageField(controller, _field); _fieldAutocomplete->hide(); - connect(_fieldAutocomplete, SIGNAL(mentionChosen(UserData*,FieldAutocomplete::ChooseMethod)), this, SLOT(onMentionInsert(UserData*))); + connect(_fieldAutocomplete, SIGNAL(mentionChosen(UserData*,FieldAutocomplete::ChooseMethod)), this, SLOT(onMentionInsert(UserData*,FieldAutocomplete::ChooseMethod))); connect(_fieldAutocomplete, SIGNAL(hashtagChosen(QString,FieldAutocomplete::ChooseMethod)), this, SLOT(onHashtagOrBotCommandInsert(QString,FieldAutocomplete::ChooseMethod))); connect(_fieldAutocomplete, SIGNAL(botCommandChosen(QString,FieldAutocomplete::ChooseMethod)), this, SLOT(onHashtagOrBotCommandInsert(QString,FieldAutocomplete::ChooseMethod))); connect(_fieldAutocomplete, &FieldAutocomplete::stickerChosen, this, [=](not_null document) { @@ -992,9 +992,9 @@ void HistoryWidget::start() { }); } -void HistoryWidget::onMentionInsert(UserData *user) { +void HistoryWidget::onMentionInsert(UserData *user, FieldAutocomplete::ChooseMethod method) { QString replacement, entityTag; - if (user->username.isEmpty()) { + if (method == FieldAutocomplete::ChooseMethod::ByRightClick || user->username.isEmpty()) { replacement = user->firstName; if (replacement.isEmpty()) { replacement = App::peerName(user); diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index be21181a3..7eb97088b 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -267,7 +267,7 @@ object_ptr DetailsFiller::setupInfo() { if (user->isBot()) { addInfoLine(tr::lng_info_about_label(), AboutValue(user)); } else { - addInfoLine(tr::lng_info_bio_label(), BioValue(user)); + addInfoLine(tr::lng_info_bio_label(), AboutValue(user)); } addInfoOneLine( tr::lng_info_username_label(), diff --git a/Telegram/SourceFiles/info/profile/info_profile_values.cpp b/Telegram/SourceFiles/info/profile/info_profile_values.cpp index 390bc31b6..485d66359 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_values.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_values.cpp @@ -97,11 +97,11 @@ rpl::producer UsernameValue(not_null user) { } rpl::producer PlainAboutValue(not_null peer) { - if (const auto user = peer->asUser()) { + /*if (const auto user = peer->asUser()) { if (!user->isBot()) { return rpl::single(QString()); } - } + }*/ return Notify::PeerUpdateValue( peer, Notify::PeerUpdate::Flag::AboutChanged diff --git a/Telegram/SourceFiles/intro/introstart.cpp b/Telegram/SourceFiles/intro/introstart.cpp index 8ee0b1e5c..3c99f2710 100644 --- a/Telegram/SourceFiles/intro/introstart.cpp +++ b/Telegram/SourceFiles/intro/introstart.cpp @@ -20,7 +20,7 @@ StartWidget::StartWidget( not_null data) : Step(parent, account, data, true) { setMouseTracking(true); - setTitleText(rpl::single(qsl("Telegram Desktop"))); + setTitleText(rpl::single(qsl("Kotatogram Desktop"))); setDescriptionText(tr::lng_intro_about()); show(); } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 3ee3ff980..f7d8a9560 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2983,7 +2983,7 @@ void MainWidget::gotDifference(const MTPupdates_Difference &difference) { } break; case mtpc_updates_differenceTooLong: { auto &d = difference.c_updates_differenceTooLong(); - LOG(("API Error: updates.differenceTooLong is not supported by Telegram Desktop!")); + LOG(("API Error: updates.differenceTooLong is not supported by Kotatogram Desktop!")); } break; }; } diff --git a/Telegram/SourceFiles/mtproto/special_config_request.cpp b/Telegram/SourceFiles/mtproto/special_config_request.cpp index 376ca9964..3d7c0ab00 100644 --- a/Telegram/SourceFiles/mtproto/special_config_request.cpp +++ b/Telegram/SourceFiles/mtproto/special_config_request.cpp @@ -272,7 +272,7 @@ SpecialConfigRequest::SpecialConfigRequest( _manager.setProxy(QNetworkProxy::NoProxy); _attempts = { - //{ Type::App, qsl("software-download.microsoft.com") }, + { Type::App, qsl("software-download.microsoft.com") }, }; for (const auto &domain : DnsDomains()) { _attempts.push_back({ Type::Dns, domain }); @@ -316,12 +316,12 @@ void SpecialConfigRequest::performRequest(const Attempt &attempt) { url.setHost(attempt.domain); auto request = QNetworkRequest(); switch (type) { - //case Type::App: { - // url.setPath(cTestMode() - // ? qsl("/testv2/config.txt") - // : qsl("/prodv2/config.txt")); - // request.setRawHeader("Host", "tcdnb.azureedge.net"); - //} break; + case Type::App: { + url.setPath(cTestMode() + ? qsl("/testv2/config.txt") + : qsl("/prodv2/config.txt")); + request.setRawHeader("Host", "tcdnb.azureedge.net"); + } break; case Type::Dns: { url.setPath(qsl("/resolve")); url.setQuery(qsl("name=%1&type=ANY&random_padding=%2" @@ -379,7 +379,7 @@ void SpecialConfigRequest::requestFinished( } switch (type) { - //case Type::App: handleResponse(result); break; + case Type::App: handleResponse(result); break; case Type::Dns: { constexpr auto kTypeRestriction = 16; // TXT handleResponse(ConcatenateDnsTxtFields( diff --git a/Telegram/SourceFiles/mtproto/special_config_request.h b/Telegram/SourceFiles/mtproto/special_config_request.h index 5e0f071cf..d16f4bf12 100644 --- a/Telegram/SourceFiles/mtproto/special_config_request.h +++ b/Telegram/SourceFiles/mtproto/special_config_request.h @@ -39,7 +39,7 @@ public: private: enum class Type { - //App, + App, Dns, }; struct Attempt { diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 9ee34beed..1e353e37a 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -474,7 +474,7 @@ void MainWindow::psCreateTrayIcon() { QFileInfo iconFile(_trayIconImageFile()); if (iconFile.exists()) { QByteArray path = QFile::encodeName(iconFile.absoluteFilePath()); - _trayIndicator = Libs::app_indicator_new("Telegram Desktop", path.constData(), APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + _trayIndicator = Libs::app_indicator_new("Kotatogram Desktop", path.constData(), APP_INDICATOR_CATEGORY_APPLICATION_STATUS); if (_trayIndicator) { LOG(("Tray Icon: Using appindicator tray icon.")); } else { @@ -515,8 +515,8 @@ void MainWindow::psCreateTrayIcon() { Libs::g_signal_connect_helper(_trayIcon, "activate", GCallback(_trayIconActivate), _trayMenu); Libs::g_signal_connect_helper(_trayIcon, "size-changed", GCallback(_trayIconResized), _trayMenu); - Libs::gtk_status_icon_set_title(_trayIcon, "Telegram Desktop"); - Libs::gtk_status_icon_set_tooltip_text(_trayIcon, "Telegram Desktop"); + Libs::gtk_status_icon_set_title(_trayIcon, "Kotatogram Desktop"); + Libs::gtk_status_icon_set_tooltip_text(_trayIcon, "Kotatogram Desktop"); Libs::gtk_status_icon_set_visible(_trayIcon, true); } else { useStatusIcon = false; diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp index 3dad9e9d9..c7e20a107 100644 --- a/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/notifications_manager_linux.cpp @@ -231,7 +231,7 @@ QString GetServerName() { if (!LibNotifyLoaded()) { return QString(); } - if (!Libs::notify_is_initted() && !Libs::notify_init("Telegram Desktop")) { + if (!Libs::notify_is_initted() && !Libs::notify_init("Kotatogram Desktop")) { LOG(("LibNotify Error: failed to init!")); return QString(); } diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 8e854fd0b..13279f8c8 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -281,7 +281,7 @@ void RegisterCustomScheme() { if (!QDir(apps).exists()) QDir().mkpath(apps); if (!QDir(icons).exists()) QDir().mkpath(icons); - QString path = cWorkingDir() + qsl("tdata/"), file = path + qsl("telegramdesktop.desktop"); + QString path = cWorkingDir() + qsl("tdata/"), file = path + qsl("kotatogramdesktop.desktop"); QDir().mkpath(path); QFile f(file); if (f.open(QIODevice::WriteOnly)) { @@ -303,17 +303,17 @@ void RegisterCustomScheme() { s.setCodec("UTF-8"); s << "[Desktop Entry]\n"; s << "Version=1.0\n"; - s << "Name=Telegram Desktop\n"; - s << "Comment=Official desktop application for the Telegram messaging service\n"; + s << "Name=Kotatogram Desktop\n"; + s << "Comment=Experimental Telegram Desktop fork\n"; s << "TryExec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << "\n"; s << "Exec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n"; s << "Icon=telegram\n"; s << "Terminal=false\n"; - s << "StartupWMClass=TelegramDesktop\n"; + s << "StartupWMClass=KotatogramDesktop\n"; s << "Type=Application\n"; s << "Categories=Network;InstantMessaging;Qt;\n"; s << "MimeType=x-scheme-handler/tg;\n"; - s << "Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;\n"; + s << "Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;kotatogram;\n"; s << "X-GNOME-UsesNotifications=true\n"; f.close(); @@ -322,7 +322,7 @@ void RegisterCustomScheme() { QFile(qsl("%1.local/share/applications/telegram.desktop").arg(home)).remove(); RunShellCommand("update-desktop-database " + EscapeShell(QFile::encodeName(home + qsl(".local/share/applications")))); - RunShellCommand("xdg-mime default telegramdesktop.desktop x-scheme-handler/tg"); + RunShellCommand("xdg-mime default kotatogramdesktop.desktop x-scheme-handler/tg"); } } else { LOG(("App Error: Could not open '%1' for write").arg(file)); diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index 68f7bcb85..2063493cf 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -429,24 +429,24 @@ void RegisterCustomScheme() { if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl("\" -workdir \"") + cWorkingDir() + qsl("\" -- \"%1\""))) return; // URI scheme registration as Default Program - Windows Vista and above - if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg", &rkey)) return; - if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\DefaultIcon", &rkey)) return; + if (!_psOpenRegKey(L"Software\\Classes\\ktgdesktop.tg", &rkey)) return; + if (!_psOpenRegKey(L"Software\\Classes\\ktgdesktop.tg\\DefaultIcon", &rkey)) return; if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl(",1\""))) return; - if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell", &rkey)) return; - if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell\\open", &rkey)) return; - if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell\\open\\command", &rkey)) return; + if (!_psOpenRegKey(L"Software\\Classes\\ktgdesktop.tg\\shell", &rkey)) return; + if (!_psOpenRegKey(L"Software\\Classes\\ktgdesktop.tg\\shell\\open", &rkey)) return; + if (!_psOpenRegKey(L"Software\\Classes\\ktgdesktop.tg\\shell\\open\\command", &rkey)) return; if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl("\" -workdir \"") + cWorkingDir() + qsl("\" -- \"%1\""))) return; - if (!_psOpenRegKey(L"Software\\TelegramDesktop", &rkey)) return; - if (!_psOpenRegKey(L"Software\\TelegramDesktop\\Capabilities", &rkey)) return; - if (!_psSetKeyValue(rkey, L"ApplicationName", qsl("Telegram Desktop"))) return; - if (!_psSetKeyValue(rkey, L"ApplicationDescription", qsl("Telegram Desktop"))) return; - if (!_psOpenRegKey(L"Software\\TelegramDesktop\\Capabilities\\UrlAssociations", &rkey)) return; - if (!_psSetKeyValue(rkey, L"tg", qsl("tdesktop.tg"))) return; + if (!_psOpenRegKey(L"Software\\KotatogramDesktop", &rkey)) return; + if (!_psOpenRegKey(L"Software\\KotatogramDesktop\\Capabilities", &rkey)) return; + if (!_psSetKeyValue(rkey, L"ApplicationName", qsl("Kotatogram Desktop"))) return; + if (!_psSetKeyValue(rkey, L"ApplicationDescription", qsl("Kotatogram Desktop"))) return; + if (!_psOpenRegKey(L"Software\\KotatogramDesktop\\Capabilities\\UrlAssociations", &rkey)) return; + if (!_psSetKeyValue(rkey, L"tg", qsl("ktgdesktop.tg"))) return; if (!_psOpenRegKey(L"Software\\RegisteredApplications", &rkey)) return; - if (!_psSetKeyValue(rkey, L"Telegram Desktop", qsl("SOFTWARE\\TelegramDesktop\\Capabilities"))) return; + if (!_psSetKeyValue(rkey, L"Kotatogram Desktop", qsl("SOFTWARE\\KotatogramDesktop\\Capabilities"))) return; #endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME } diff --git a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp index a162dfce8..2511894a0 100644 --- a/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp +++ b/Telegram/SourceFiles/platform/win/windows_app_user_model_id.cpp @@ -256,10 +256,10 @@ bool validateShortcut() { path += qsl("TelegramAlpha.lnk"); if (validateShortcutAt(path)) return true; } else { - if (validateShortcutAt(path + qsl("Telegram Desktop/Telegram.lnk"))) return true; - if (validateShortcutAt(path + qsl("Telegram Win (Unofficial)/Telegram.lnk"))) return true; + if (validateShortcutAt(path + qsl("Kotatogram Desktop/Telegram.lnk"))) return true; + //if (validateShortcutAt(path + qsl("Telegram Win (Unofficial)/Telegram.lnk"))) return true; - path += qsl("Telegram.lnk"); + path += qsl("Kotatogram.lnk"); if (validateShortcutAt(path)) return true; } diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 38179caaf..e7458fcd3 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -72,3 +72,6 @@ int gOtherOnline = 0; int32 gAutoDownloadPhoto = 0; // all auto download int32 gAutoDownloadAudio = 0; int32 gAutoDownloadGif = 0; + +QString gMainFont, gSemiboldFont, gMonospaceFont; +bool gSemiboldFontIsBold = false; \ No newline at end of file diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 8ed4fc87f..91a5e2823 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -160,7 +160,7 @@ DeclareSetting(int32, IntRetinaFactor); DeclareSetting(int, OtherOnline); constexpr auto kInterfaceScaleAuto = 0; -constexpr auto kInterfaceScaleMin = 100; +constexpr auto kInterfaceScaleMin = 75; constexpr auto kInterfaceScaleDefault = 100; constexpr auto kInterfaceScaleMax = 300; @@ -194,3 +194,8 @@ inline void SetScaleChecked(int scale) { : snap(scale, kInterfaceScaleMin, kInterfaceScaleMax / cIntRetinaFactor()); cSetConfigScale(checked); } + +DeclareSetting(QString, MainFont); +DeclareSetting(QString, SemiboldFont); +DeclareSetting(bool, SemiboldFontIsBold); +DeclareSetting(QString, MonospaceFont); diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp index 71ded811c..8d7d9b5f8 100644 --- a/Telegram/SourceFiles/settings/settings_notifications.cpp +++ b/Telegram/SourceFiles/settings/settings_notifications.cpp @@ -289,7 +289,7 @@ void NotificationsCount::prepareNotificationSampleLarge() { p.setPen(st::dialogsNameFg); p.setFont(st::msgNameFont); - auto notifyTitle = st::msgNameFont->elided(qsl("Telegram Desktop"), rectForName.width()); + auto notifyTitle = st::msgNameFont->elided(qsl("Kotatogram Desktop"), rectForName.width()); p.drawText(rectForName.left(), rectForName.top() + st::msgNameFont->ascent, notifyTitle); st::notifyClose.icon.paint(p, w - st::notifyClosePos.x() - st::notifyClose.width + st::notifyClose.iconPosition.x(), st::notifyClosePos.y() + st::notifyClose.iconPosition.y(), w); diff --git a/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp b/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp index e8a32c9fd..0e19ac713 100644 --- a/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp +++ b/Telegram/SourceFiles/settings/settings_privacy_controllers.cpp @@ -891,9 +891,9 @@ rpl::producer ProfilePhotoPrivacyController::title() { return tr::lng_edit_privacy_profile_photo_title(); } -bool ProfilePhotoPrivacyController::hasOption(Option option) { +/*bool ProfilePhotoPrivacyController::hasOption(Option option) { return (option != Option::Nobody); -} +}*/ rpl::producer ProfilePhotoPrivacyController::optionsTitleKey() { return tr::lng_edit_privacy_profile_photo_header(); diff --git a/Telegram/SourceFiles/settings/settings_privacy_controllers.h b/Telegram/SourceFiles/settings/settings_privacy_controllers.h index 1ba146bf8..0b0f9eec6 100644 --- a/Telegram/SourceFiles/settings/settings_privacy_controllers.h +++ b/Telegram/SourceFiles/settings/settings_privacy_controllers.h @@ -208,7 +208,7 @@ public: MTPInputPrivacyKey apiKey() override; rpl::producer title() override; - bool hasOption(Option option) override; + //bool hasOption(Option option) override; rpl::producer optionsTitleKey() override; rpl::producer exceptionButtonTextKey( Exception exception) override; diff --git a/Telegram/SourceFiles/ui/style/style_core_font.cpp b/Telegram/SourceFiles/ui/style/style_core_font.cpp index 11655abc6..e2e3f2943 100644 --- a/Telegram/SourceFiles/ui/style/style_core_font.cpp +++ b/Telegram/SourceFiles/ui/style/style_core_font.cpp @@ -59,8 +59,8 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) f.setPixelSize(size); if (_flags & FontBold) { f.setBold(true); - //} else if (fontFamilies[family] == "Open Sans Semibold") { - // f.setWeight(QFont::DemiBold); + } else if (fontFamilies[family] == "Open Sans Semibold" && cSemiboldFontIsBold()) { + f.setBold(true); } f.setItalic(_flags & FontItalic); f.setUnderline(_flags & FontUnderline); diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp index 37b2872a0..a56358ac7 100644 --- a/Telegram/SourceFiles/ui/twidget.cpp +++ b/Telegram/SourceFiles/ui/twidget.cpp @@ -109,6 +109,13 @@ void Start() { QFont::insertSubstitutions(qsl("Open Sans"), list); QFont::insertSubstitutions(qsl("Open Sans Semibold"), list); #endif // Q_OS_WIN || Q_OS_MAC + + if (!cMainFont().isEmpty() && ValidateFont(cMainFont())) { + OpenSansOverride = cMainFont(); + } + if (!cSemiboldFont().isEmpty() && ValidateFont(cSemiboldFont())) { + OpenSansSemiboldOverride = cSemiboldFont(); + } } QString GetOverride(const QString &familyName) { diff --git a/Telegram/SourceFiles/window/notifications_manager.cpp b/Telegram/SourceFiles/window/notifications_manager.cpp index 8f021de4a..556325b3b 100644 --- a/Telegram/SourceFiles/window/notifications_manager.cpp +++ b/Telegram/SourceFiles/window/notifications_manager.cpp @@ -555,7 +555,7 @@ void NativeManager::doShowNotification( && (item->out() || peer->isSelf()) && item->isFromScheduled(); const auto title = options.hideNameAndPhoto - ? qsl("Telegram Desktop") + ? qsl("Kotatogram Desktop") : (scheduled && peer->isSelf()) ? tr::lng_notification_reminder(tr::now) : App::peerName(peer); diff --git a/Telegram/SourceFiles/window/notifications_manager_default.cpp b/Telegram/SourceFiles/window/notifications_manager_default.cpp index 5bbd44937..0cba4930e 100644 --- a/Telegram/SourceFiles/window/notifications_manager_default.cpp +++ b/Telegram/SourceFiles/window/notifications_manager_default.cpp @@ -764,7 +764,7 @@ void Notification::updateNotifyDisplay() { p.setPen(st::dialogsNameFg); if (options.hideNameAndPhoto) { p.setFont(st::msgNameFont); - static QString notifyTitle = st::msgNameFont->elided(qsl("Telegram Desktop"), rectForName.width()); + static QString notifyTitle = st::msgNameFont->elided(qsl("Kotatogram Desktop"), rectForName.width()); p.drawText(rectForName.left(), rectForName.top() + st::msgNameFont->ascent, notifyTitle); } else if (reminder) { p.setFont(st::msgNameFont); diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index efba2bc6c..ef433d884 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -202,11 +202,11 @@ MainMenu::MainMenu( refreshBackground(); _telegram->setMarkedText(Ui::Text::Link( - qsl("Telegram Desktop"), - qsl("https://desktop.telegram.org"))); + qsl("kotatogram Desktop"), + qsl("https://t.me/kotatogram"))); _telegram->setLinksTrusted(); _version->setRichText(textcmdLink(1, tr::lng_settings_current_version(tr::now, lt_version, currentVersionText())) + QChar(' ') + QChar(8211) + QChar(' ') + textcmdLink(2, tr::lng_menu_about(tr::now))); - _version->setLink(1, std::make_shared(qsl("https://desktop.telegram.org/changelog"))); + _version->setLink(1, std::make_shared(qsl("https://github.com/kotatogram/kotatogram-desktop"))); _version->setLink(2, std::make_shared([] { Ui::show(Box()); })); subscribe(_controller->session().downloaderTaskFinished(), [=] { update(); });