From bfa9ba1f680bb9a7c2c9555d89e57a76c02f47b8 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sun, 23 Feb 2025 15:45:10 +0000 Subject: Remove gtk-rs front end --- schist_gtk4_gui/src/window.rs | 82 ------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 schist_gtk4_gui/src/window.rs (limited to 'schist_gtk4_gui/src/window.rs') diff --git a/schist_gtk4_gui/src/window.rs b/schist_gtk4_gui/src/window.rs deleted file mode 100644 index b3cea35..0000000 --- a/schist_gtk4_gui/src/window.rs +++ /dev/null @@ -1,82 +0,0 @@ -use gtk::{ - gio, - glib::{ - self, - object::IsA, - subclass::{ - object::{ObjectImpl, ObjectImplExt}, - types::ObjectSubclass, - InitializingObject, - }, - }, - subclass::{ - application_window::ApplicationWindowImpl, - widget::{ - CompositeTemplateClass, CompositeTemplateInitializingExt, WidgetClassExt, WidgetImpl, - }, - window::WindowImpl, - }, - TemplateChild, -}; - -use crate::{ - balances_view::SchistBalancesView, categories_view::SchistCategoriesView, - category_transfers_view::SchistCategoryTransfersView, - transactions_view::SchistTransactionsView, -}; - -gtk::glib::wrapper! { - pub struct SchistWindow(ObjectSubclass) - @extends gtk::ApplicationWindow, gtk::Window, gtk::Widget, - @implements gio::ActionGroup, gio::ActionMap, gtk::Accessible, gtk::Buildable, - gtk::ConstraintTarget, gtk::Native, gtk::Root, gtk::ShortcutManager; -} - -impl SchistWindow { - pub fn new>(app: &A) -> Self { - glib::Object::builder().property("application", app).build() - } -} - -#[derive(gtk::CompositeTemplate, Default)] -#[template(resource = "/net/joeac/schist/ui/window.ui")] -pub struct SchistWindowSubclass { - #[template_child] - pub balances_view: TemplateChild, - - #[template_child] - pub categories_view: TemplateChild, - - #[template_child] - pub category_transfers_view: TemplateChild, - - #[template_child] - pub transactions_view: TemplateChild, -} - -#[glib::object_subclass] -impl ObjectSubclass for SchistWindowSubclass { - const NAME: &'static str = "SchistWindow"; - type Type = SchistWindow; - type ParentType = gtk::ApplicationWindow; - - fn class_init(klass: &mut Self::Class) { - klass.bind_template(); - } - - fn instance_init(obj: &InitializingObject) { - obj.init_template(); - } -} - -impl ObjectImpl for SchistWindowSubclass { - fn constructed(&self) { - self.parent_constructed(); - } -} - -impl WidgetImpl for SchistWindowSubclass {} - -impl WindowImpl for SchistWindowSubclass {} - -impl ApplicationWindowImpl for SchistWindowSubclass {} -- cgit v1.2.3