mirror of
https://github.com/Zedfrigg/ironbar.git
synced 2025-09-16 03:36:58 +02:00
refactor: recv_glib
dependency arrays
Adds a dependency array system to `recv_glib` which internally clones the passed deps and then passes by reference to the callback. This cleans up a lot of the big `{}` blocks full of `widget.clone()` and removes a lot of boilerplate. Yay!
This commit is contained in:
parent
beab26a37e
commit
9d18ce52f5
31 changed files with 539 additions and 517 deletions
|
@ -73,7 +73,7 @@ pub fn load_css(style_path: PathBuf, application: Application) {
|
|||
}
|
||||
});
|
||||
|
||||
rx.recv_glib(move |path| {
|
||||
rx.recv_glib((), move |(), path| {
|
||||
info!("Reloading CSS");
|
||||
if let Err(err) = provider.load_from_file(&gio::File::for_path(path)) {
|
||||
error!("{:?}", Report::new(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue