From 379561117862952d567bfdbf0700b5c7f470a1a8 Mon Sep 17 00:00:00 2001 From: Ricky Kresslein Date: Sun, 20 Feb 2022 12:59:46 +0100 Subject: - Added Preferences - Added idle notify to preferences - Bug fix: if user deleted first task none would show --- src/application.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/application.rs') diff --git a/src/application.rs b/src/application.rs index 6c51523..f8b5527 100644 --- a/src/application.rs +++ b/src/application.rs @@ -20,7 +20,7 @@ use gtk::subclass::prelude::*; use gtk::{gdk, gio, glib}; use crate::config; -use crate::ui::FurtheranceWindow; +use crate::ui::{FurtheranceWindow, FurPreferencesWindow}; use crate::database; mod imp { @@ -96,6 +96,13 @@ impl FurtheranceApplication { })); self.add_action(&quit_action); + let preferences_action = gio::SimpleAction::new("preferences", None); + preferences_action.connect_activate(clone!(@weak self as app => move |_, _| { + FurPreferencesWindow::new().show(); + })); + self.set_accels_for_action("app.preferences", &["comma"]); + self.add_action(&preferences_action); + let about_action = gio::SimpleAction::new("about", None); about_action.connect_activate(clone!(@weak self as app => move |_, _| { app.show_about(); -- cgit 1.4.1