diff options
author | Zac <zacary.gillerat@connect.qut.edu.au> | 2020-12-10 14:18:29 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-12-11 09:36:44 +0100 |
commit | dea399ff08320562cd4abe9df25c7c97d4a4215a (patch) | |
tree | 2f2c2a0c44b50b49eac60bf56267603a521d9d2e /.gitignore | |
parent | df44ab85999310c1ab596cab8c9a670da9adb1b0 (diff) | |
download | serenity-dea399ff08320562cd4abe9df25c7c97d4a4215a.zip |
FileManager: focus_dependent_delete_action is correctly enabled/disabled
The focus_dependent_delete_action that sits in the file manager's
toolbar would always remain enabled, even if nothing was selected,
activating it if nothing was selected would then crash the application.
The action is now correctly enabled/disabled, but due to the way
selection works in TreeViews, something is always selected, what really
matters is if the TreeView has something selected, and it has focus.
As it currently stands, there is no way to know when the TreeView's
is_focused status changes. In order for this to work I added a callback
to the Widget class which fires when a widget receives or looses focus.
In that callback, the focus_dependent_delete_action's enabled value is
recalculated.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions