autoupdate on card_entry add
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
use std::cell::RefCell;
|
||||
use std::sync::OnceLock;
|
||||
|
||||
use glib::subclass::InitializingObject;
|
||||
use glib::Properties;
|
||||
use gtk::glib::subclass::Signal;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, prelude::*, Button, CompositeTemplate, Label, Picture};
|
||||
|
||||
@@ -42,6 +44,15 @@ impl ObjectSubclass for CardEntry {
|
||||
}
|
||||
#[glib::derived_properties]
|
||||
impl ObjectImpl for CardEntry {
|
||||
|
||||
fn signals() -> &'static [Signal] {
|
||||
static SIGNALS: OnceLock<Vec<Signal>> = OnceLock::new();
|
||||
SIGNALS.get_or_init(|| {
|
||||
vec![Signal::builder("created")
|
||||
.build()]
|
||||
})
|
||||
}
|
||||
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
|
||||
@@ -57,7 +68,6 @@ impl ObjectImpl for CardEntry {
|
||||
.bind_property("reading", reading_label_binding, "label")
|
||||
.sync_create()
|
||||
.build();
|
||||
|
||||
}
|
||||
|
||||
fn dispose(&self) {
|
||||
|
||||
Reference in New Issue
Block a user