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

Adds Settings Dialog #38

Merged
merged 15 commits into from
Oct 3, 2024
Merged

Conversation

DrPaulSharp
Copy link
Collaborator

Closes #20

This PR introduces a settings dialog, with tabs mapped to the settings groups established in the settings model. Project settings are updated with any changes made, excluding resetting to the global default.

This PR also addresses a bug in the code in that menu actions affecting a project were all enabled (unlike the taskbar which was correctly disabled), causing the GUI to crash in some cases. The appropriate menu actions have been disabled on startup.

Copy link
Contributor

@StephenNneji StephenNneji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please see comments

rascal2/widgets/inputs.py Outdated Show resolved Hide resolved
rascal2/ui/view.py Outdated Show resolved Hide resolved
rascal2/ui/view.py Outdated Show resolved Hide resolved
rascal2/ui/view.py Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Outdated Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Outdated Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Outdated Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Outdated Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Outdated Show resolved Hide resolved
rascal2/dialogs/settings_dialog.py Show resolved Hide resolved
@DrPaulSharp DrPaulSharp force-pushed the settings branch 4 times, most recently from 729d7e8 to 219821b Compare October 2, 2024 15:46
@@ -22,6 +22,26 @@ def get_global_settings() -> QtCore.QSettings:
)


def delete_local_settings(path: str | PathLike) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this should be in the Setting class with a catchy name like delete_cache or something

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I was thinking about this, but does the settings file correspond with a particular instance of the Settings object? (The save routine is in the object as well though so . . .)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it does, we are just saving to the same place so it may not seem that way

tests/test_dialogs.py Outdated Show resolved Hide resolved
@DrPaulSharp DrPaulSharp merged commit 30def2c into RascalSoftware:main Oct 3, 2024
4 checks passed
@DrPaulSharp DrPaulSharp deleted the settings branch October 3, 2024 14:09
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.

Create settings dialog
2 participants