Reverting taskbar flashing option

Now it's in TDesktop, so there is no need in it.
This commit is contained in:
Eric Kotato 2020-05-13 00:23:08 +03:00
parent 6b983c89d2
commit eb41186df3
10 changed files with 4 additions and 26 deletions

View file

@ -16,6 +16,5 @@
// "show_phone_in_drawer": true,
// "scales": [],
// "confirm_before_calls": false,
// "no_taskbar_flash": false,
// "recent_stickers_limit": 20
}

View file

@ -2432,7 +2432,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ktg_net_speed_boost_big" = "Big";
"ktg_settings_system" = "System";
"ktg_settings_no_taskbar_flash" = "Disable taskbar flashing";
"ktg_settings_other" = "Other";
"ktg_profile_copy_id" = "Copy ID";

View file

@ -66,7 +66,6 @@
"ktg_net_speed_boost_medium": "Среднее",
"ktg_net_speed_boost_big": "Высокое",
"ktg_settings_system": "Система",
"ktg_settings_no_taskbar_flash": "Отключить мигание на панели задач",
"ktg_settings_other": "Прочие",
"ktg_profile_copy_id": "Копировать ID",
"ktg_profile_bot_id": "ID бота",

View file

@ -185,7 +185,6 @@ QByteArray GenerateSettingsJson(bool areDefault = false) {
settings.insert(qsl("chat_list_lines"), DialogListLines());
settings.insert(qsl("disable_up_edit"), cDisableUpEdit());
settings.insert(qsl("confirm_before_calls"), cConfirmBeforeCall());
settings.insert(qsl("no_taskbar_flash"), cNoTaskbarFlashing());
settings.insert(qsl("recent_stickers_limit"), RecentStickersLimit());
settings.insert(qsl("userpic_corner_type"), cUserpicCornersType());
settings.insert(qsl("always_show_top_userpic"), cShowTopBarUserpic());
@ -400,10 +399,6 @@ bool Manager::readCustomFile() {
cSetConfirmBeforeCall(v);
});
ReadBoolOption(settings, "no_taskbar_flash", [&](auto v) {
cSetNoTaskbarFlashing(v);
});
ReadIntOption(settings, "recent_stickers_limit", [&](auto v) {
if (v >= 0 && v <= 200) {
SetRecentStickersLimit(v);

View file

@ -112,7 +112,6 @@ bool AddCustomReplace(QString from, QString to) {
}
bool gConfirmBeforeCall = false;
bool gNoTaskbarFlashing = false;
rpl::variable<int> gRecentStickersLimit = 20;
void SetRecentStickersLimit(int limit) {

View file

@ -87,7 +87,6 @@ using CustomReplacementsMap = QMap<QString, QString>;
DeclareRefSetting(CustomReplacementsMap, CustomReplaces);
bool AddCustomReplace(QString from, QString to);
DeclareSetting(bool, ConfirmBeforeCall);
DeclareSetting(bool, NoTaskbarFlashing);
void SetRecentStickersLimit(int limit);
[[nodiscard]] int RecentStickersLimit();

View file

@ -369,8 +369,6 @@ void SetupKotatoSystem(not_null<Ui::VerticalLayout*> container) {
AddSkip(container);
AddSubsectionTitle(container, tr::ktg_settings_system());
SettingsMenuCSwitch(ktg_settings_no_taskbar_flash, NoTaskbarFlashing);
const QMap<int, QString> trayIconOptions = {
{ 0, TrayIconLabel(0) },
{ 1, TrayIconLabel(1) },

View file

@ -6,7 +6,6 @@ For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "platform/linux/notifications_manager_linux.h"
#include "mainwindow.h"
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
#include "platform/linux/specific_linux.h"
@ -20,20 +19,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtDBus/QDBusError>
#include <QtDBus/QDBusMetaType>
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
#include <QtWidgets/QApplication>
namespace Platform {
namespace Notifications {
void FlashBounce() {
auto window = App::wnd();
if (!window) {
return;
}
QApplication::alert(window);
}
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
namespace {

View file

@ -19,6 +19,9 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace Platform {
namespace Notifications {
inline void FlashBounce() {
}
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
class NotificationData : public QObject {
Q_OBJECT

View file

@ -290,9 +290,7 @@ void System::showNext() {
}
}
if (alert) {
if (!cNoTaskbarFlashing()) {
Platform::Notifications::FlashBounce();
}
Platform::Notifications::FlashBounce();
if (Global::SoundNotify() && !Platform::Notifications::SkipAudio()) {
ensureSoundCreated();
_soundTrack->playOnce();