* 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
This is done by deliberately setting and reading the enabled state of
the widget whenever the stateChanged event happens.
If the stateChanged event happens while the widget is not enabled, we
know the event must have been triggered by our "check user follow state"
event, and then we don't act upon that event
On macOS, trying to display a dialog before showing the main window
(like when starting minimized) leads to a crash. The dialog will now
show before the main window is opened, preventing this issue.
* (#1874) Disable update checking for unsupported platforms
As described #1874, only Windows, macOS and GNU/Linux are officially
supplied with builds. Thus checking for updates is unnecessary if we
are e.g. on FreeBSD, OpenBSD, illumos distros and possibly other
Operating Systems.
This fixes#1874 by ifdef-ing the 3 officially supported platforms
when checking for updates. Otherwise a debug warning will be emitted
and in the settings the checkbox for beta-updates is hidden and
replaced by a message, explaining the reason for why there are no beta
updates.
* Update CHANGELOG
In accordance with #1874
* (#1874) Move platform check into checkForUpdates
As discussed in #1914
* (#1874) Move check for supported OS to a seperate function.
As requested in #1914
* fixed SearchWindow memory leak
* Update CHANGELOG.md
* added DebugCount for BaseWindow
* [Bug Fix] Color of second user highlight cannot be set (#1898)
* Highlighting: Fix bug preventing user highlight from being set
Before this commit, only the row of a clicked cell was checked, but not
the tab it was clicked in.
Since the "Whispers" row is the second row in the "Messages" tab on the
highlighting page, the color picker was not opened for the second entry
in the "Users" tab either. This commit fixes the bug by also checking
tab the cell was clicked in.
* Update CHANGELOG.md
* Emote Popup Improvements (#1895)
* Put exact matching emotes first
* Close GenericListView on Escape press
* smol fix
* fixed emote input when not in the first char
* fixes#1902
* closes#1904
Co-authored-by: Leon Richardt <leon.richardt@gmail.com>
Co-authored-by: Daniel <24928223+dnsge@users.noreply.github.com>
* Highlighting: Fix bug preventing user highlight from being set
Before this commit, only the row of a clicked cell was checked, but not
the tab it was clicked in.
Since the "Whispers" row is the second row in the "Messages" tab on the
highlighting page, the color picker was not opened for the second entry
in the "Users" tab either. This commit fixes the bug by also checking
tab the cell was clicked in.
* Update CHANGELOG.md
* Add missing includes
We would normally have these included in another file already, or even
the precompiled headers, but having the files included here too makes
testing single parts easier.
* Modify the regex building of highlight phrases for non-regex phrases
For phrases like !test, the word boundary checking we did before was not
enough, so we now check for either a word boundary, a whitespace
character, or the line start/end.
* Add tests for ensuring I haven't fully broken the highlight system
* Add changelog entry