Skip to content

Commit

Permalink
refactor(custom): rename exec to on_click for consistency
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JakeStanger committed Nov 28, 2022
1 parent 8c75bc4 commit e274ba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit e274ba3

Please sign in to comment.