enthought / enthought/envisage

The tasks PreferencesDialog should support disabling the 'OK' button

Open
#104 2 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
Python
Stars
89
Forks
27
Avg merge
14h 48m
Merged PRs (30d)
7

Description

The [PreferencesDialog](https://github.com/enthought/envisage/blob/master/envisage/ui/tasks/preferences_dialog.py) will call apply on all the preference panes when 'OK" is pressed. However some times it is useful to be able to veto closing the dialog because the current settings in a pane are invalid or partial

I think that one way of having this behavior is if each `PreferencePane` has a `veto_apply` Boolean trait that the `PreferencesDialog` can monitor to make a decision on closing the window and enabling/disabling the 'OK' button.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with envisage/ui/tasks/preferences_dialog.py and inspect how PreferencesDialog calls apply on each PreferencePane and manages the OK button. Trace the existing pane traits and dialog lifecycle, then define the veto behavior so invalid or partial settings disable OK and prevent closing or applying; done means all panes can consistently veto the action.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.