updating cards
This commit is contained in:
@@ -14,7 +14,7 @@ pub struct CardEntry {
|
||||
#[template_child]
|
||||
pub hieroglyph_label: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub reading_label: TemplateChild<Label>,
|
||||
pub translation_label: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub delete_button: TemplateChild<Button>,
|
||||
#[property(get, set)]
|
||||
@@ -22,7 +22,7 @@ pub struct CardEntry {
|
||||
#[property(get, set)]
|
||||
hieroglyph: RefCell<String>,
|
||||
#[property(get, set)]
|
||||
reading: RefCell<String>,
|
||||
translation: RefCell<String>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
@@ -51,9 +51,9 @@ impl ObjectImpl for CardEntry {
|
||||
.sync_create()
|
||||
.build();
|
||||
|
||||
let reading_label_binding: &Label = self.reading_label.as_ref();
|
||||
let translation_label_binding: &Label = self.translation_label.as_ref();
|
||||
self.obj()
|
||||
.bind_property("reading", reading_label_binding, "label")
|
||||
.bind_property("translation", translation_label_binding, "label")
|
||||
.sync_create()
|
||||
.build();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user