From 3ec5ad42dbf907f867c92f8faca38f8f46a1da8f Mon Sep 17 00:00:00 2001 From: Christopher Davis Date: Fri, 24 Sep 2021 06:25:33 -0700 Subject: [PATCH] Remove widgets::init() We don't need this since `TemplateChild` registers the type for us now. --- src/main.rs | 1 - src/widgets/mod.rs | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index c27181c..a98e7ed 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,6 @@ use application::IvApplication; fn main() { gtk::init().expect("Failed to initialize GTK."); libadwaita::init(); - widgets::init(); pretty_env_logger::init(); setlocale(LocaleCategory::LcAll, ""); diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index d9a71ac..69aeba8 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -17,16 +17,6 @@ // // SPDX-License-Identifier: GPL-3.0-or-later -use glib::prelude::*; - mod image_view; pub use image_view::IvImageView; - -pub fn init() { - // For each widget we use in a template, - // we need to ensure the type is set up. - // This is equivalent to doing g_type_ensure () - // in C. - IvImageView::static_type(); -}