-
-
Notifications
You must be signed in to change notification settings - Fork 419
Fix option profiles #2570
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
Fix option profiles #2570
Conversation
Move option dialog setting registration out of constructors. Fixes option profiles only working after options dialog has been opened.
@rdswift One detail I was unsure about was whether not persisting the profile when changed via menu was intentional or not. But IMHO it should be persisted. Otherwise it also is not properly applied. |
Not intentional. I agree with you that it should be persisted. |
I'm seeing a duplication of the changes that added the setting changed signal. Does this need to be rebased on the master branch? EDIT: Oops, I see that the signal code was actually moved to the parent class, as you had mentioned in Item 1 of your Solution description (which I obviously didn't read closely enough). Sorry about that. Please disregard my comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. The only thing I noticed was that you didn't update the copyright notice in most of the files. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good fix, and moving options back to OPTIONS makes things cleaner. LGTM.
I thought the changes were really minor, and also we should probably rerun our fix-headers script again. |
Summary
Problem
This addresses several issues with option profiles.
See also comment in #2569
Solution
setting_changed
signal and using it to listen to profile changes. If profiles are changed rebuild the full option menu and the CD lookup config.register_setting
static and have each option page define anOPTIONS
tuple again. It's a bit similar to old 2.x code, but the OPTIONS tuple is simplified and just consists of the name and the highlights.