Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Sep 19, 2020

Conversation

pajlada
Copy link
Member

@pajlada pajlada commented Sep 13, 2020

Pull request checklist:

  • CHANGELOG.md was updated, if applicable

Description

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.

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.
@pajlada pajlada merged commit 913193f into master Sep 19, 2020
@pajlada pajlada deleted the chore/clean-up-window-layout-loading branch September 19, 2020 15:14
@zneix zneix mentioned this pull request Sep 23, 2020
3 tasks
pajlada pushed a commit that referenced this pull request Oct 10, 2020
Fixes a small bug introduced in #1964. "Moderation mode" would be written to the settings file but wouldn't be loaded.

Closes #2032
@leon-richardt
Copy link
Collaborator

Possibly related to following error which user Turtoise#6731 posted on Discord?
parent-window_error

@pajlada
Copy link
Member Author

pajlada commented Oct 15, 2020

Possibly related to following error which user Turtoise#6731 posted on Discord?
parent-window_error

More likely #1940

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants