From e274ba39cd6d8f1c73033ac1e60e5bce89205ce2 Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Mon, 28 Nov 2022 22:26:14 +0000 Subject: [PATCH] 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. --- src/modules/custom.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/custom.rs b/src/modules/custom.rs index ca6997d..159c22e 100644 --- a/src/modules/custom.rs +++ b/src/modules/custom.rs @@ -42,7 +42,7 @@ pub struct Widget { label: Option, name: Option, class: Option, - exec: Option, + on_click: Option, orientation: Option, } @@ -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(),