Update cargo dependencies, fix icons
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use gtk::prelude::*;
|
||||
|
||||
use relm4::factory::FactoryVecDeque;
|
||||
use relm4::factory::{FactoryVecDeque, Position};
|
||||
use relm4::RelmListBoxExt;
|
||||
use relm4::{gtk, ComponentParts, ComponentSender, SimpleComponent};
|
||||
|
||||
@@ -21,6 +21,7 @@ pub enum SheetListingInput {
|
||||
Sort,
|
||||
Shuffle,
|
||||
ReloadSheets(Vec<Sheet>),
|
||||
None,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -54,10 +55,12 @@ impl SimpleComponent for SheetListingModel {
|
||||
|
||||
fn init(
|
||||
init: Self::Init,
|
||||
root: &Self::Root,
|
||||
root: Self::Root,
|
||||
sender: ComponentSender<Self>,
|
||||
) -> ComponentParts<Self> {
|
||||
let mut sheets = FactoryVecDeque::new(gtk::ListBox::default(), sender.input_sender());
|
||||
let mut sheets = FactoryVecDeque::builder()
|
||||
.launch(gtk::ListBox::default())
|
||||
.forward(sender.input_sender(), |_| SheetListingInput::None);
|
||||
for sheet_model_type in init {
|
||||
sheets.guard().push_back(sheet_model_type);
|
||||
}
|
||||
@@ -95,6 +98,7 @@ impl SimpleComponent for SheetListingModel {
|
||||
}
|
||||
sender.output(SheetListingOutput::ContentsChanged);
|
||||
}
|
||||
SheetListingInput::None => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user