Miniaudio now runs everything in a separate audio thread - this uses boost::asio's io_context.
Our miniaudio implementation is now also much simplified - it does not use its own resource manager or device. This might end up being stupid if sounds don't work after changing output device or locking or w/e
I've made the sound controller into an interface, meaning we can support multiple sound backends in Chatterino. I've added a Null sound backend that disables all sound. A QMediaPlayer or QSoundEffect or Qt backend could be added.
Miniaudio might idle & disable the device now too, not sure
I've added some unrelated changes in the form of a new setting type, and a new setting page helper function for it, which will hopefully make adding new enum settings easier in the future.
This setting stores its value as a string instead of an int, and uses magic_enum to convert between that string value and its enum value.
Themes are loaded from the Themes directory (under the Chatterino directory, so %APPDATA%/Chatterino2/Themes).
Themes are json files (see the built in themes as an example).
After importing a theme, you must restart Chatterino for it to show up in the settings
The scripting capabilities is locked behind a cmake flag, and is not enabled by default.
Co-authored-by: nerix <nerixdev@outlook.de>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
The `SettingsPage::onShow` handler that sets up the block
list is only called when the application settings dialog
has already been shown once before. This caused the blocked
user list to appear empty until the second time it was opened.
Correct this by explicitly regenerating the block list in the
constructor of `IgnoresPage`.
* feat: crashpad on windows
* feat: inline it
* feat: more crashpad
* chore: remove qBreakpad
* fix: add mention to crashpad
* refactor: version string
* feat: add crashpad module
* refactor: build crashpad from source
* fix: minor adjustments
* chore: add changelog entry
* fix: formatting and include
* fix: format
* build: use flags similar to release profile
* ci: build with crashpad on windows
* ci: recurse submodules
* ci: always include crashpad
* fix: try 7z
for some reason zstd just doesn't run
* fix: wrong path for symbols
* fix: copy
pls don't build
* ci: use new cache key
* fix: missing pragma
* ci: add workflow without crashpad
* docs: elevate changelog entry
* fix: add link to cmake issue
* fix: windows include issue
Someone (crashpad) includes Windows.h before winsock2.h
* fix: working directory
* fix: another working directory
Thanks Greenlandicsmiley, Nerixyz, Yoitsu, and helmak for helping debug & test this
* Remove QMediaPlayer includes
* Prefer local path when generating the sound path
* Update changelog entry number
* Disable pitch & spatialization control
This feature is enabled by default and can be disabled in settings with the "Enable BTTV live emotes updates" setting.
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
* Add checkbox for custom logging and table with channels to log on Logs page
* Add checkbox to enable and disable logging per channel
* Return from addMessage before logging if custom logging enabled and channel does not have logging enabled
* Use clang-format to fix formatting
* Add CHANGELOG.md entry
* Resolve PR comments
* Remove toggle for channels so any channel listed will be logged
* Move Only log channels listed below checkbox to just above table
* Fix formatting
* Re-order changelog
* ChannelLog constructor: Copy & move instead of const ref & copy
* ChannelLog::createEmpty: Curly brace initialize instead of repeating
name
* ChannelLog toString & createEmpty: nodiscard
* Use COUNT paradigm in model column
* Remove ChanneLoggingModel source file comments
* Use Column::Channel in getRowFromItem
* Rename `getItemFromRow` parameter and mark it as unused
* Curly brace initialize ChannelLog
* private & friend class the model
* Filter out channels to log using a set instead of iterating over a vector every time a message comes in
* Rename `ChannelLog::channel` member to `ChannelLog::channelName`
Also made it private
* mini comment on ChannelLog
Co-authored-by: Felanbird <41973452+Felanbird@users.noreply.github.com>
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
* Remove unused include util/Helpers.hpp
* SplitContainer::setTag fix parameter naming
* autofy/constify where possible
* More const auto ptr magicifying
* Make SplitNode::Type an enum class
* Move QuickSwitcherPopup includes from header to source file
* Remove unused DropRegion code
* use empty() instead of size() == 0
* Add curly braces everywhere
* Remove useless reinterpret_cast
It was casting Node* to Node*
* Clarify that the connect is QObject::connect
* SplitContainer::setSelected fix parameter naming
* Rename function variables to remove unneccesary underscore
Also move addSpacing parameter out of the layout function
* emplace_back where possible
* Name parameters
* Remove ineffective const from return type
* Make node getters const
* Flatten Node::releaseSplit
* Rename in-function variable to match code style
* [ACTUAL CODE CHANGE/MOVE] Move clamp logic to its own function
* name params
* applyFromDescriptorRecursively: rename node param to baseNode
* [ACTUAL CODE CHANGE/MOVE] Remove the many overloads for append/insertSplit
This utilizes the C++20 designed initializers aggregate initialization feature
* Remove unused includes
* [ACTUAL CODE CHANGE] Clean up dragging logic
There's no need to keep a pointer around to which split is being
dragged, it's already stored in the QDropEvent source()
* UNRELATED .clang-tidy: Only suggest UPPER_CASE for constant global variables
* Remove unused SplitContainer::getSplitCount function
* Use std::max in Node's clamp function
* Remove test code
* DraggedSplit.hpp: remove unused include
* Split `setDraggingSplit` into two functions, `startDraggingSplit` and `stopDraggingSplit`
* feat: c++ 20
* fix: c++ 20 deprecations
* fix(msvc): warnings
* chore: add changelog entry
* fix: formatting
* Update websocketpp to the `develop` branch
* Specify other template type in FlagsEnum != operator
* Remove the user of simple template ids in our websocketpp template class
Also standardizes the file a bit by using nested namespaces, using
pragma once
* fix: turn `MAGIC_MESSAGE_SUFFIX` into a `QString`
* hacky unhacky hacky const char hack
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)