Fix CLI arguments not being respected. This happened due to the addition of category-based logging (--help, --version) and changes to the window loading ( --channels), respectively.
When handling --channels, I took the liberty to refactor the previous version of window description (which relied on generating JSON) to directly building the WindowLayout.
Adds custom channel filters complete with their own mini-language. Filters can be created in settings, and applied by clicking the three dots to open the Split menu and selecting "Set filters".
* Experimental argument handling
* Restored browser extension launch functionality
Also moved check from BrowerExtension.cpp to Args.cpp as it is more relevant there and doesn't require passing arguments to a function in another file
* Fixed formatting
* Simplified Args.cpp code, added changelog entry
* Hid crash-recovery from help
* Dont save settings if launched with --channels
* Changed parsing method to t:channel
* Code cleanup
* Changed plaform delimeter to :, platform defaults to Twitch
Co-authored-by: fourtf <tf.four@gmail.com>
* Split up Window Layout loading into a loading and application stage
Previously, we were creating UI elements at while we were reading the window-layout.json file.
We now read the window-layout.json file fully first, which results in a
WindowLayout struct which is built up of a list of windows with a list
of tabs with a root node which contains containers and splits.
This WindowLayout can then be applied.
This will enable PRs like #1940 to start Chatterino with Window Layouts
that aren't defined in a json file.
This commit has deprecated loading of v1 window layouts (we're now on v2). If a v1 window layout is there, it will just be ignored and Chatterino will boot up as if it did not have a window layout at all, and on save that old window layout will be gone.
* Fix compile error for mac
Fixes#1546
This change introduces a "window timer" that runs every 100ms that we
use to update the pixmap if necessary, since there is no signal for "let
me know when this image is done loading".
* fallback logic for corrupted window layout
1. before saving the window-layout a backup will created to avoid corruption due to crashes while saving
2. when starting chatterino and the window-layout file returns and empty window layout (due to corruptio) the backup will be read and the layout will be build from this data
* Update WindowManager.hpp
* used QSaveFile instead of crude custom implementation
* implemented suggested feedback from review
* proper method call
was tired and slightly drunk Kapp
The window layout is only saved if something has been changed.
When something relevant to the window layout is changed, a save is
queued to run after 10 seconds.
If within those 10 seconds, another thing is changed, that timer is
reset and will run after 10 seconds again.
Events that cause the save to be queued up:
- Tab created
- Tab removed
- Tab moved
- Tab name changed
- Split created
- Split removed
- Split moved
- Split channel changed
- Split resized
- Window moved
- Window resized
What currently does not trigger the save to be queued up:
- Active tab changed