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:
parent
8c75bc46ac
commit
e274ba39cd
1 changed files with 2 additions and 2 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Reference in a new issue