diff options
author | Ricky Kresslein <rk@lakoliu.com> | 2022-03-17 09:01:02 +0100 |
---|---|---|
committer | Ricky Kresslein <rk@lakoliu.com> | 2022-03-17 09:01:02 +0100 |
commit | 917748d474e98c945ac0ef0347bc4dc3925b89c3 (patch) | |
tree | bc0cf279ea17cacd1e96b6b2f8a2d10890db987b /src/ui/window.rs | |
parent | 9e9ddca690ca16d03c44ea9c8a312320bb6eba34 (diff) | |
download | Furtherance-917748d474e98c945ac0ef0347bc4dc3925b89c3.tar.zst |
- 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
Diffstat (limited to 'src/ui/window.rs')
-rwxr-xr-x | src/ui/window.rs | 14 |
1 files changed, 10 insertions, 4 deletions
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, |