From 6ad708cfc1a2537a3cad5d25e16d97c7acf606fd Mon Sep 17 00:00:00 2001 From: Nefomemes Date: Thu, 28 Oct 2021 17:19:33 +0700 Subject: [PATCH] feat: use EchidnaSidebar in window ui file --- src/components/window/imp.rs | 5 +++-- src/components/window/window.ui | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/window/imp.rs b/src/components/window/imp.rs index 891f66b..ebb3a22 100644 --- a/src/components/window/imp.rs +++ b/src/components/window/imp.rs @@ -1,7 +1,7 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ - + use gtk::prelude::*; use gtk::subclass::prelude::*; use gtk::CompositeTemplate; @@ -11,6 +11,8 @@ use gtk::CompositeTemplate; pub struct EchidnaWindow { #[template_child] pub notebook: TemplateChild, + #[template_child] + pub sidebar: TemplateChild, } #[glib::object_subclass] @@ -19,7 +21,6 @@ impl ObjectSubclass for EchidnaWindow { type Type = super::EchidnaWindow; type ParentType = gtk::ApplicationWindow; - fn class_init(class: &mut Self::Class) { Self::bind_template(class); } diff --git a/src/components/window/window.ui b/src/components/window/window.ui index 4f0cf8c..41b64b2 100644 --- a/src/components/window/window.ui +++ b/src/components/window/window.ui @@ -15,7 +15,7 @@ 1 - + @@ -26,6 +26,7 @@ --> + 1 Hello from Echidna!