1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-04-19 19:34:24 +02:00

refactor(custom): rename exec to on_click for consistency

BREAKING CHANGE: This changes the option on buttons in the `custom` module. Any uses of the module must be updated to use the new custom widget attribute name.
This commit is contained in:
Jake Stanger 2022-11-28 22:26:14 +00:00
parent 8c75bc46ac
commit e274ba39cd
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61

View file

@ -42,7 +42,7 @@ pub struct Widget {
label: Option<String>,
name: Option<String>,
class: Option<String>,
exec: Option<String>,
on_click: Option<String>,
orientation: Option<String>,
}
@ -135,7 +135,7 @@ impl Widget {
button.style_context().add_class(&class);
}
if let Some(exec) = self.exec {
if let Some(exec) = self.on_click {
button.connect_clicked(move |button| {
tx.try_send(ExecEvent {
cmd: exec.clone(),