From 57a9ac96492ed141796dcf31a5e1199ea352fe35 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Fri, 22 Apr 2022 10:34:46 +0300 Subject: Remove unnecessary function --- src/ui/window.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/ui') diff --git a/src/ui/window.rs b/src/ui/window.rs index 964cf64..2d3f9d4 100755 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -120,13 +120,6 @@ impl FurtheranceWindow { } } - // TODO remove function, just use set_sensitive - fn activate_task_input(&self, sensitive: bool) { - // Deactivate task_input while timer is running - let imp = imp::FurtheranceWindow::from_instance(self); - imp.task_input.set_sensitive(sensitive); - } - fn save_task(&self, start_time: DateTime, mut stop_time: DateTime) { // Save the most recent task to the database and clear the task_input field let imp = imp::FurtheranceWindow::from_instance(self); @@ -214,7 +207,7 @@ impl FurtheranceWindow { *imp2.running.lock().unwrap() = true; *start_time.borrow_mut() = Local::now(); - this.activate_task_input(false); + imp2.task_input.set_sensitive(false); let duration = Duration::new(1,0); timeout_add_local(duration, clone!(@strong this as this_clone => move || { let imp3 = imp::FurtheranceWindow::from_instance(&this_clone); @@ -239,7 +232,7 @@ impl FurtheranceWindow { *imp2.running.lock().unwrap() = false; button.set_icon_name("media-playback-start-symbolic"); this.set_watch_time("00:00:00"); - this.activate_task_input(true); + imp2.task_input.set_sensitive(true); this.save_task(*start_time.borrow(), *stop_time.borrow()); } })); -- cgit 1.4.1