diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-19 09:11:04 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-19 09:11:04 +0000 |
| commit | b6fc855a131f67cce42d6407540def729af087ec (patch) | |
| tree | ecc043587f1aba9ad50669c733e02c85029a39a8 /schist_gtk4_gui/src/window.rs | |
| parent | 9e28aff1c045d7b31b6efb526a80b08048a23d99 (diff) | |
Factors out CategoriesView
Diffstat (limited to 'schist_gtk4_gui/src/window.rs')
| -rw-r--r-- | schist_gtk4_gui/src/window.rs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/schist_gtk4_gui/src/window.rs b/schist_gtk4_gui/src/window.rs index b1ca9f6..b612e92 100644 --- a/schist_gtk4_gui/src/window.rs +++ b/schist_gtk4_gui/src/window.rs @@ -11,11 +11,16 @@ use gtk::{ }, subclass::{ application_window::ApplicationWindowImpl, - widget::{CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetImpl}, + widget::{ + CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, + }, window::WindowImpl, }, + TemplateChild, }; +use crate::categories_view::SchistCategoriesView; + gtk::glib::wrapper! { pub struct SchistWindow(ObjectSubclass<SchistWindowSubclass>) @extends gtk::ApplicationWindow, gtk::Window, gtk::Widget, @@ -30,8 +35,11 @@ impl SchistWindow { } #[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/window.ui")] -pub struct SchistWindowSubclass {} +#[template(resource = "/net/joeac/schist/ui/window.ui")] +pub struct SchistWindowSubclass { + #[template_child] + pub categories_view: TemplateChild<SchistCategoriesView>, +} #[glib::object_subclass] impl ObjectSubclass for SchistWindowSubclass { |
