Split up Window Layout loading into a loading and application stage (#1964)

* 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 commit is contained in:
pajlada
2020-09-19 11:14:10 -04:00
committed by GitHub
parent 7eabba959b
commit 913193f8b5
8 changed files with 484 additions and 191 deletions
+1
View File
@@ -124,6 +124,7 @@ SOURCES += \
src/common/NetworkResult.cpp \
src/common/UsernameSet.cpp \
src/common/Version.cpp \
src/common/WindowDescriptors.cpp \
src/controllers/accounts/Account.cpp \
src/controllers/accounts/AccountController.cpp \
src/controllers/accounts/AccountModel.cpp \