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

explorer: improve settings modification #465

Merged
merged 1 commit into from
Mar 10, 2021
Merged

Conversation

mike-hunhoff
Copy link
Collaborator

@mike-hunhoff mike-hunhoff commented Mar 10, 2021

addresses #463.

created a new Settings button that, when clicked, opens a new dialog to modify the various capa explorer settings. displayed are the current values for each setting, or blank if the setting does not have a value yet. clicking Ok applies the settings, clicking Cancel retains the previous values.

Screen Shot 2021-03-09 at 2 21 29 PM

@mike-hunhoff mike-hunhoff changed the title improve settings modification explorer: improve settings modification Mar 10, 2021
Copy link
Collaborator

@williballenthin williballenthin left a comment

Choose a reason for hiding this comment

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

nice work!

@@ -567,15 +598,15 @@ def load_capa_rules(self):

try:
# resolve rules directory - check self and settings first, then ask user
if not os.path.exists(settings.user.get("rule_path", "")):
if not os.path.exists(settings.user.get(CAPA_SETTINGS_RULE_PATH, "")):
Copy link
Collaborator

Choose a reason for hiding this comment

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

i like this

settings.user[CAPA_SETTINGS_RULE_PATH],
settings.user[CAPA_SETTINGS_RULEGEN_AUTHOR],
settings.user[CAPA_SETTINGS_RULEGEN_SCOPE],
) = dialog.get_values()
Copy link
Collaborator

Choose a reason for hiding this comment

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

i can see this growing out of control in the future, though its fine for right now.

if we add further settings, lets abstract the return value into some settings object or at least a dictionary.

Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

😻

@mike-hunhoff mike-hunhoff merged commit 06c958f into master Mar 10, 2021
@mike-hunhoff mike-hunhoff deleted the explorer/fix-463 branch March 10, 2021 18:30
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.

3 participants