util/root: Use specific function to show toasts
This commit is contained in:
parent
3e69dc4c6f
commit
7b45009eed
5 changed files with 40 additions and 65 deletions
|
|
@ -91,16 +91,6 @@ mod imp {
|
|||
"win.show-help-overlay",
|
||||
);
|
||||
|
||||
klass.install_action(
|
||||
"win.show-toast",
|
||||
Some(VariantTy::TUPLE),
|
||||
move |win, _, var| {
|
||||
if let Some((ref toast, i)) = var.and_then(|v| v.get::<(String, i32)>()) {
|
||||
win.show_toast(toast, adw::ToastPriority::__Unknown(i));
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
WindowAction::init_actions_and_bindings(klass);
|
||||
|
||||
ActionPartGlobal::init_actions_and_bindings(klass);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue