general: Use glib::Object::builder for objects w/ props

Builders are more idiomatic rust code than the old
pattern.
This commit is contained in:
Christopher Davis 2022-11-24 12:26:04 -05:00
parent d1d53e4f4a
commit 583794a3ec
2 changed files with 6 additions and 6 deletions

View file

@ -255,7 +255,7 @@ glib::wrapper! {
#[gtk::template_callbacks]
impl LpWindow {
pub fn new<A: IsA<gtk::Application>>(app: &A) -> Self {
glib::Object::new(&[("application", app)])
glib::Object::builder().property("application", app).build()
}
fn toggle_fullscreen(&self, fullscreen: bool) {