toggle find action depending of content type

This commit is contained in:
yggverse 2024-12-16 14:17:34 +02:00
parent 3c82ab9de9
commit 957e56cc3e
3 changed files with 42 additions and 25 deletions

View file

@ -19,13 +19,12 @@ impl Find {
/// Create new `Self`
pub fn new() -> Self {
Self {
simple_action: SimpleAction::new_stateful(
&uuid_string_random(),
None,
&DEFAULT_STATE.to_variant(),
),
}
let simple_action =
SimpleAction::new_stateful(&uuid_string_random(), None, &DEFAULT_STATE.to_variant());
simple_action.set_enabled(false);
Self { simple_action }
}
// Actions