Add interface to manage accounts

This commit is contained in:
ranfdev
2023-11-13 19:58:26 +01:00
parent ba0a5a756c
commit 365244bd60
11 changed files with 581 additions and 4 deletions

View File

@ -133,6 +133,12 @@ impl NotifyApplication {
})
.build();
let action_about = gio::ActionEntry::builder("preferences")
.activate(|app: &Self, _, _| {
app.show_preferences();
})
.build();
let message_action = gio::ActionEntry::builder("message-action")
.parameter_type(Some(&glib::VariantTy::STRING))
.activate(|app: &Self, _, params| {
@ -214,6 +220,14 @@ impl NotifyApplication {
dialog.present();
}
fn show_preferences(&self) {
let win = crate::widgets::NotifyPreferences::new(
self.main_window().imp().notifier.get().unwrap().clone(),
);
win.set_transient_for(Some(&self.main_window()));
win.present();
}
pub fn run(&self) -> glib::ExitCode {
info!(app_id = %APP_ID, version = %VERSION, profile = %PROFILE, datadir = %PKGDATADIR, "running");