mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
rename variable
This commit is contained in:
parent
879e2c4f27
commit
052a219d9b
@ -27,7 +27,7 @@ impl List {
|
|||||||
// * wanted only to append items after `DropDown` init
|
// * wanted only to append items after `DropDown` init
|
||||||
let factory = SignalListItemFactory::new();
|
let factory = SignalListItemFactory::new();
|
||||||
|
|
||||||
factory.connect_setup(|_, dropdown| {
|
factory.connect_setup(|_, this| {
|
||||||
// Init widget for dropdown item
|
// Init widget for dropdown item
|
||||||
let widget = Box::builder()
|
let widget = Box::builder()
|
||||||
.orientation(gtk::Orientation::Vertical)
|
.orientation(gtk::Orientation::Vertical)
|
||||||
@ -45,15 +45,14 @@ impl List {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
dropdown
|
this.downcast_ref::<ListItem>()
|
||||||
.downcast_ref::<ListItem>()
|
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.set_child(Some(&widget));
|
.set_child(Some(&widget));
|
||||||
});
|
});
|
||||||
|
|
||||||
factory.connect_bind(|_, dropdown| {
|
factory.connect_bind(|_, this| {
|
||||||
// Downcast requirements
|
// Downcast requirements
|
||||||
let list_item = dropdown.downcast_ref::<ListItem>().unwrap();
|
let list_item = this.downcast_ref::<ListItem>().unwrap();
|
||||||
let item = list_item.item().and_downcast::<Item>().unwrap();
|
let item = list_item.item().and_downcast::<Item>().unwrap();
|
||||||
let container = list_item.child().and_downcast::<Box>().unwrap();
|
let container = list_item.child().and_downcast::<Box>().unwrap();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user