code: Use new glib::clone! syntax
This commit is contained in:
parent
44bd845be4
commit
e9dc3d810c
16 changed files with 801 additions and 464 deletions
|
|
@ -98,12 +98,14 @@ mod imp {
|
|||
}
|
||||
|
||||
pub fn set_drop_target(&self, drop_target: gtk::DropTarget) {
|
||||
drop_target.connect_current_drop_notify(
|
||||
glib::clone!(@weak self.revealer as revealer => move |target| {
|
||||
drop_target.connect_current_drop_notify(glib::clone!(
|
||||
#[weak(rename_to = revealer)]
|
||||
self.revealer,
|
||||
move |target| {
|
||||
let reveal = target.current_drop().is_some();
|
||||
revealer.set_reveal_child(reveal);
|
||||
}),
|
||||
);
|
||||
}
|
||||
));
|
||||
|
||||
self.drop_target.set(drop_target).unwrap();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue