From 300852bbf559fb714b87c4a27685363a5960198c Mon Sep 17 00:00:00 2001 From: Felix Schmid Date: Sat, 6 Oct 2018 16:11:51 +0200 Subject: [PATCH 1/5] added the settings shortcut to the keybindings window --- src/widgets/settingspages/KeyboardSettingsPage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/widgets/settingspages/KeyboardSettingsPage.cpp b/src/widgets/settingspages/KeyboardSettingsPage.cpp index 14090e112..4cdb17c99 100644 --- a/src/widgets/settingspages/KeyboardSettingsPage.cpp +++ b/src/widgets/settingspages/KeyboardSettingsPage.cpp @@ -42,6 +42,7 @@ KeyboardSettingsPage::KeyboardSettingsPage() form->addRow(new QLabel("Ctrl + F"), new QLabel("Search in current channel")); form->addRow(new QLabel("Ctrl + E"), new QLabel("Open Emote menu")); + form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu")); } } // namespace chatterino From a196129171c29bea46857848894555192e6e2156 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 6 Oct 2018 17:17:05 +0000 Subject: [PATCH 2/5] Fix wrong format syntax --- src/providers/ffz/FfzEmotes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/ffz/FfzEmotes.cpp b/src/providers/ffz/FfzEmotes.cpp index a718eb705..54efde13e 100644 --- a/src/providers/ffz/FfzEmotes.cpp +++ b/src/providers/ffz/FfzEmotes.cpp @@ -147,7 +147,7 @@ void FfzEmotes::loadEmotes() void FfzEmotes::loadChannel(const QString &channelName, std::function callback) { - log("[FFZEmotes] Reload FFZ Channel Emotes for channel %s\n", channelName); + log("[FFZEmotes] Reload FFZ Channel Emotes for channel {}\n", channelName); NetworkRequest request("https://api.frankerfacez.com/v1/room/" + channelName); From 67d9910bd5ed4ed1e29dbc2ef156cc9f9a15c163 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 6 Oct 2018 17:18:00 +0000 Subject: [PATCH 3/5] Fix uninitialized memory usage error --- src/widgets/splits/Split.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widgets/splits/Split.hpp b/src/widgets/splits/Split.hpp index d9499b9b2..9571c74da 100644 --- a/src/widgets/splits/Split.hpp +++ b/src/widgets/splits/Split.hpp @@ -94,6 +94,12 @@ private: SplitContainer *container_; IndirectChannel channel_; + bool moderationMode_{}; + bool isTopRightSplit_{}; + + bool isMouseOver_{}; + bool isDragging_{}; + QVBoxLayout *vbox_; SplitHeader *header_; ChannelView *view_; @@ -102,12 +108,6 @@ private: NullablePtr selectChannelDialog_; - bool moderationMode_{}; - bool isTopRightSplit_{}; - - bool isMouseOver_{}; - bool isDragging_{}; - pajlada::Signals::Connection channelIDChangedConnection_; pajlada::Signals::Connection usermodeChangedConnection_; pajlada::Signals::Connection roomModeChangedConnection_; From 98c1d61e7868fa9d6d6d77c2015544d672ba20d2 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 6 Oct 2018 17:18:53 +0000 Subject: [PATCH 4/5] reformat --- src/widgets/splits/SplitHeader.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 3d41eab16..255b41590 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -230,7 +230,8 @@ std::unique_ptr SplitHeader::createMainMenu() menu->addSeparator(); menu->addAction("Reload channel emotes", this, SLOT(reloadChannelEmotes())); - menu->addAction("Reload subscriber emotes", this, SLOT(reloadSubscriberEmotes())); + menu->addAction("Reload subscriber emotes", this, + SLOT(reloadSubscriberEmotes())); menu->addAction("Reconnect", this, SLOT(reconnect())); menu->addAction("Clear messages", this->split_, &Split::clear); // menu->addSeparator(); From 5dce212cb44a76e0623010993df0524c5e0fe388 Mon Sep 17 00:00:00 2001 From: apa420 <17131426+apa420@users.noreply.github.com> Date: Sat, 6 Oct 2018 17:51:13 +0200 Subject: [PATCH 5/5] Added functionality of making the flash taskbar last until the app is focused again (#767) * Added functionality of making the flash taskbar last until chatterino is focused again * added it for every flash taskbar Fixes #760 --- .../notifications/NotificationController.cpp | 9 +++++++-- src/providers/twitch/TwitchChannel.cpp | 10 ++++++++-- src/providers/twitch/TwitchMessageBuilder.cpp | 9 +++++++-- src/singletons/Settings.hpp | 5 ++++- src/widgets/settingspages/HighlightingPage.cpp | 3 +++ 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/controllers/notifications/NotificationController.cpp b/src/controllers/notifications/NotificationController.cpp index 2b68b130f..653db98c9 100644 --- a/src/controllers/notifications/NotificationController.cpp +++ b/src/controllers/notifications/NotificationController.cpp @@ -180,8 +180,13 @@ void NotificationController::getFakeTwitchChannelLiveStatus( getApp()->notifications->playSound(); } if (getSettings()->notificationFlashTaskbar) { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 2500); + if (getSettings()->longAlerts) { + QApplication::alert( + getApp()->windows->getMainWindow().window(), 0); + } else { + QApplication::alert( + getApp()->windows->getMainWindow().window(), 2500); + } } } return Success; diff --git a/src/providers/twitch/TwitchChannel.cpp b/src/providers/twitch/TwitchChannel.cpp index a219ce690..55d9b6506 100644 --- a/src/providers/twitch/TwitchChannel.cpp +++ b/src/providers/twitch/TwitchChannel.cpp @@ -408,8 +408,14 @@ void TwitchChannel::setLive(bool newLiveStatus) getApp()->notifications->playSound(); } if (getSettings()->notificationFlashTaskbar) { - QApplication::alert( - getApp()->windows->getMainWindow().window(), 2500); + if (getSettings()->longAlerts) { + QApplication::alert( + getApp()->windows->getMainWindow().window(), 0); + } else { + QApplication::alert( + getApp()->windows->getMainWindow().window(), + 2500); + } } } auto live = makeSystemMessage(this->getName() + " is live"); diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index 7589d54d0..16c967b1a 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -788,8 +788,13 @@ void TwitchMessageBuilder::parseHighlights(bool isPastMsg) } if (doAlert) { - QApplication::alert(getApp()->windows->getMainWindow().window(), - 2500); + if (getSettings()->longAlerts) { + QApplication::alert( + getApp()->windows->getMainWindow().window(), 0); + } else { + QApplication::alert( + getApp()->windows->getMainWindow().window(), 2500); + } } } } diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 5a2fae91a..491b0db81 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -117,7 +117,8 @@ public: BoolSetting enableLowercaseLink = {"/links/linkLowercase", true}; /// Ignored phrases - QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace", "***"}; + QStringSetting ignoredPhraseReplace = {"/ignore/ignoredPhraseReplace", + "***"}; /// Ingored Users BoolSetting enableTwitchIgnoredUsers = {"/ignore/enableTwitchIgnoredUsers", @@ -143,6 +144,8 @@ public: "/highlighting/whisperHighlight/enableTaskbarFlashing", false}; QStringSetting highlightColor = {"/highlighting/color", "#4B282C"}; + BoolSetting longAlerts = {"/highlighting/alerts", false}; + /// Logging BoolSetting enableLogging = {"/logging/enabled", false}; diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index 8d8ce400d..eb49b3452 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -149,6 +149,9 @@ HighlightingPage::HighlightingPage() layout.append(createCheckBox(ALWAYS_PLAY, getSettings()->highlightAlwaysPlaySound)); + layout.append(createCheckBox( + "Flash taskbar only stops highlighting when chatterino is focused", + getSettings()->longAlerts)); } // ---- misc