begin global actions config implementation

This commit is contained in:
yggverse 2024-11-09 14:59:58 +02:00
parent f803d89f52
commit 9e481f78ce
9 changed files with 58 additions and 68 deletions

View file

@ -15,7 +15,7 @@ use adw::ApplicationWindow;
use gtk::{
gio::{Cancellable, File, SimpleAction},
glib::Variant,
prelude::{ActionExt, GtkWindowExt},
prelude::ActionExt,
FileLauncher,
};
use sqlite::Transaction;
@ -86,13 +86,6 @@ impl Browser {
}
});
action.debug().connect_activate({
let widget = widget.clone();
move |_, _| {
widget.gobject().emit_enable_debugging(true);
}
});
action.profile().connect_activate({
move |_, _| {
FileLauncher::new(Some(&File::for_path(profile.config_path()))).launch(
@ -107,13 +100,6 @@ impl Browser {
}
});
action.quit().connect_activate({
let widget = widget.clone();
move |_, _| {
widget.gobject().close();
}
});
action.update().connect_activate({
let window = window.clone();
move |_, this| window.update(string_from_variant(this).as_str())