about summary refs log tree commit diff
path: root/src/application.rs
diff options
context:
space:
mode:
authorRicky Kresslein <ricky@kressle.in>2022-02-20 12:59:46 +0100
committerRicky Kresslein <ricky@kressle.in>2022-02-20 12:59:46 +0100
commit379561117862952d567bfdbf0700b5c7f470a1a8 (patch)
treee8ff9e5081109c87426eb35c5ade0407e4908419 /src/application.rs
parent1f46e93625cff30eaf63258fcabe4ddc0c243136 (diff)
downloadFurtherance-379561117862952d567bfdbf0700b5c7f470a1a8.tar.zst
- Added Preferences
- Added idle notify to preferences
- Bug fix: if user deleted first task none would show
Diffstat (limited to 'src/application.rs')
-rw-r--r--src/application.rs9
1 files changed, 8 insertions, 1 deletions
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", &["<primary>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();