From 917748d474e98c945ac0ef0347bc4dc3925b89c3 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Thu, 17 Mar 2022 09:01:02 +0100 Subject: - Bug fix: Changing a task date now moves it immediately - Spaces before single digit dates are now zeroes - Moved 'Delete history' above 'About' in menu - Task input selected by default --- src/ui/window.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/ui/window.rs') diff --git a/src/ui/window.rs b/src/ui/window.rs index 7c1e8cc..277daa5 100755 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -77,6 +77,7 @@ mod imp { impl ObjectImpl for FurtheranceWindow { fn constructed(&self, obj: &Self::Type) { + obj.setup_widgets(); obj.setup_signals(); obj.setup_settings(); self.parent_constructed(obj); @@ -147,17 +148,22 @@ impl FurtheranceWindow { imp.history_box.create_tasks_page(); } - fn setup_signals(&self) { + fn setup_widgets(&self) { let imp = imp::FurtheranceWindow::from_instance(self); - let running = Arc::new(Mutex::new(false)); - let start_time = Rc::new(RefCell::new(Local::now())); - let stop_time = Rc::new(RefCell::new(Local::now())); // Development mode if config::PROFILE == "development" { self.add_css_class("devel"); } + imp.task_input.grab_focus(); + } + + fn setup_signals(&self) { + let imp = imp::FurtheranceWindow::from_instance(self); + let running = Arc::new(Mutex::new(false)); + let start_time = Rc::new(RefCell::new(Local::now())); + let stop_time = Rc::new(RefCell::new(Local::now())); imp.start_button.connect_clicked(clone!( @weak self as this, -- cgit 1.4.1