about summary refs log tree commit diff
path: root/src/ui/tasks_page.rs
diff options
context:
space:
mode:
authorRicky Kresslein <rk@lakoliu.com>2023-03-23 09:34:44 +0100
committerRicky Kresslein <rk@lakoliu.com>2023-03-23 09:34:44 +0100
commitdff62a9e31ff85305eb2d70b036ee25c90e4feeb (patch)
treef23dbd9fd581772a447b87daea9440cd76941624 /src/ui/tasks_page.rs
parent458d6b3f2934e72c5ed49b452730d2d9f4232812 (diff)
downloadFurtherance-dff62a9e31ff85305eb2d70b036ee25c90e4feeb.tar.zst
Use gtk-rs 0.6.4
Diffstat (limited to 'src/ui/tasks_page.rs')
-rw-r--r--src/ui/tasks_page.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ui/tasks_page.rs b/src/ui/tasks_page.rs
index 192a309..b480b77 100644
--- a/src/ui/tasks_page.rs
+++ b/src/ui/tasks_page.rs
@@ -19,8 +19,7 @@ use adw::subclass::prelude::*;
 use chrono::{DateTime, Duration, Local};
 use chrono_locale::LocaleDate;
 use gettextrs::*;
-use gtk::subclass::prelude::*;
-use gtk::{glib, prelude::*};
+use gtk::glib;
 use std::env;
 
 use crate::database::{self, SortOrder, TaskSort};
@@ -55,9 +54,10 @@ mod imp {
     }
 
     impl ObjectImpl for FurTasksPage {
-        fn constructed(&self, obj: &Self::Type) {
+        fn constructed(&self) {
+            let obj = self.obj();
             obj.setup_widgets();
-            self.parent_constructed(obj);
+            self.parent_constructed();
         }
     }
 
@@ -77,7 +77,7 @@ impl FurTasksPage {
     }
 
     pub fn clear_task_list(&self) {
-        let imp = imp::FurTasksPage::from_instance(&self);
+        let imp = imp::FurTasksPage::from_obj(&self);
 
         for group in &*imp.all_groups.borrow() {
             self.remove(group);
@@ -87,7 +87,7 @@ impl FurTasksPage {
     }
 
     pub fn build_task_list(&self) {
-        let imp = imp::FurTasksPage::from_instance(&self);
+        let imp = imp::FurTasksPage::from_obj(&self);
 
         // Get user's locale for date formatting
         let locale_env = env::var("LANG");