mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
draft accels configuration array
This commit is contained in:
parent
7d14cfcf94
commit
70df09855e
33
src/app.rs
33
src/app.rs
@ -64,22 +64,25 @@ impl App {
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
// Init accels
|
// Init accels
|
||||||
gobject.set_accels_for_action(&action_debug.detailed_name(), &["<Primary>i"]);
|
let accels_config = &[
|
||||||
gobject.set_accels_for_action(&action_update.detailed_name(), &["<Primary>u"]);
|
(action_page_reload.detailed_name(), &["<Primary>r"]),
|
||||||
gobject.set_accels_for_action(&action_quit.detailed_name(), &["<Primary>Escape"]);
|
(action_debug.detailed_name(), &["<Primary>i"]),
|
||||||
gobject.set_accels_for_action(&action_page_new.detailed_name(), &["<Primary>t"]);
|
(action_page_close.detailed_name(), &["<Primary>q"]),
|
||||||
gobject.set_accels_for_action(&action_page_pin.detailed_name(), &["<Primary>p"]);
|
(action_page_history_back.detailed_name(), &["<Primary>Left"]),
|
||||||
gobject.set_accels_for_action(&action_page_close.detailed_name(), &["<Primary>q"]);
|
(
|
||||||
gobject.set_accels_for_action(&action_page_home.detailed_name(), &["<Primary>h"]);
|
action_page_history_forward.detailed_name(),
|
||||||
gobject.set_accels_for_action(
|
|
||||||
&action_page_history_back.detailed_name(),
|
|
||||||
&["<Primary>Left"],
|
|
||||||
);
|
|
||||||
gobject.set_accels_for_action(
|
|
||||||
&action_page_history_forward.detailed_name(),
|
|
||||||
&["<Primary>Right"],
|
&["<Primary>Right"],
|
||||||
);
|
),
|
||||||
gobject.set_accels_for_action(&action_page_reload.detailed_name(), &["<Primary>r"]);
|
(action_page_home.detailed_name(), &["<Primary>h"]),
|
||||||
|
(action_page_new.detailed_name(), &["<Primary>t"]),
|
||||||
|
(action_page_pin.detailed_name(), &["<Primary>p"]),
|
||||||
|
(action_quit.detailed_name(), &["<Primary>Escape"]),
|
||||||
|
(action_update.detailed_name(), &["<Primary>u"]),
|
||||||
|
]; // @TODO config
|
||||||
|
|
||||||
|
for (detailed_action_name, &accels) in accels_config {
|
||||||
|
gobject.set_accels_for_action(detailed_action_name, &accels);
|
||||||
|
}
|
||||||
|
|
||||||
// Init components
|
// Init components
|
||||||
let browser = Arc::new(Browser::new(
|
let browser = Arc::new(Browser::new(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user