diff --git a/src/ui/file_pane.rs b/src/ui/file_pane.rs index e4c61c2..574c2f4 100644 --- a/src/ui/file_pane.rs +++ b/src/ui/file_pane.rs @@ -328,7 +328,7 @@ impl FilePane { // move to a group let children = group.children().expect("Only a group can be a destination"); for record in records { - children.append(&record); + children.append(record); } } } diff --git a/src/ui/forms/entry.rs b/src/ui/forms/entry.rs index 2f7ee66..7dbcb80 100644 --- a/src/ui/forms/entry.rs +++ b/src/ui/forms/entry.rs @@ -48,7 +48,7 @@ impl FormWidget for gtk::Entry { } fn get_value(&self) -> Option { - get_value(&self) + get_value(self) } fn set_value(&self, value: Option<&String>) { diff --git a/src/ui/record_view/item.rs b/src/ui/record_view/item.rs index a655b80..ff000c0 100644 --- a/src/ui/record_view/item.rs +++ b/src/ui/record_view/item.rs @@ -180,11 +180,13 @@ glib::wrapper! { @extends gtk::Widget; } -impl PSRecordViewItem { - pub fn new() -> Self { +impl Default for PSRecordViewItem { + fn default() -> Self { glib::Object::builder().build() } +} +impl PSRecordViewItem { pub fn set_record_node(&self, record_node: Option) { self.imp().set_record_node(record_node); } diff --git a/src/ui/record_view/item_factory.rs b/src/ui/record_view/item_factory.rs index 3484ca0..8869cab 100644 --- a/src/ui/record_view/item_factory.rs +++ b/src/ui/record_view/item_factory.rs @@ -19,7 +19,7 @@ pub fn item_factory( ) -> gtk::ListItemFactory { let factory = gtk::SignalListItemFactory::new(); factory.connect_setup(move |_factory, list_item| { - let child = PSRecordViewItem::new(); + let child = PSRecordViewItem::default(); let popup_model = popup_model.clone(); child.connect_context_menu(move |_record| popup_model.borrow().clone()); list_item.set_child(Some(&child));