diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:02:41 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-29 13:18:31 +0200 |
commit | 2dd8064c20d88c26a11240c6a871f670b5109d71 (patch) | |
tree | a6aa04113adc5837f02548464766b9291ecab89a /gui/ui.cpp | |
parent | 2eccd41897d6794a80b3ed2fcaaded85c453d46d (diff) |
logic, gui: reload keybinding description on profile change
Diffstat (limited to 'gui/ui.cpp')
-rw-r--r-- | gui/ui.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -129,13 +129,15 @@ MainWindow::MainWindow() : void MainWindow::register_shortcuts() { - using t_shortcut = std::tuple<key_opts&, Shortcuts::fun, bool>; + using t_key = Shortcuts::t_key; + using t_keys = Shortcuts::t_keys; - std::vector<t_shortcut> keys { - t_shortcut(s.key_start_tracking, [&](bool) -> void { emit_start_tracker(); }, true), - t_shortcut(s.key_stop_tracking, [&](bool) -> void { emit_stop_tracker(); }, true), - t_shortcut(s.key_toggle_tracking, [&](bool) -> void { emit_toggle_tracker(); }, true), - t_shortcut(s.key_restart_tracking, [&](bool) -> void { emit_restart_tracker(); }, true), + t_keys keys + { + t_key(s.key_start_tracking, [&](bool) -> void { emit_start_tracker(); }, true), + t_key(s.key_stop_tracking, [&](bool) -> void { emit_stop_tracker(); }, true), + t_key(s.key_toggle_tracking, [&](bool) -> void { emit_toggle_tracker(); }, true), + t_key(s.key_restart_tracking, [&](bool) -> void { emit_restart_tracker(); }, true), }; global_shortcuts.reload(keys); |