desktop actions
This commit is contained in:
parent
27bbd9bdb3
commit
9d53cfa9e5
1 changed files with 17 additions and 0 deletions
|
|
@ -1467,6 +1467,23 @@ impl cosmic::Application for CosmicAppList {
|
|||
.on_press(Message::Exec(exec.to_string(), None)),
|
||||
);
|
||||
}
|
||||
for action in desktop_info.actions().into_iter().flatten() {
|
||||
if action == "new-window" {
|
||||
continue;
|
||||
}
|
||||
|
||||
let Some(exec) = desktop_info.action_entry(action, "Exec") else {
|
||||
continue;
|
||||
};
|
||||
let Some(name) =
|
||||
desktop_info.action_entry_localized(action, "Name", &self.locales)
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
content = content.push(
|
||||
menu_button(name.into()).on_press(Message::Exec(exec.into(), None)),
|
||||
);
|
||||
}
|
||||
content = content.push(divider::horizontal::default());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue