diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-09 02:42:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-10-09 02:42:40 +0000 |
commit | 070ca5043c7e961d7a22510125f4036e4d0b8e4b (patch) | |
tree | 7d91a3f4153c60383007d3f78e2df084b4035826 /gtk2_ardour/ardour_ui_dialogs.cc | |
parent | 9e9c7a85365a924e207f72c6682a45de04ee95b9 (diff) |
new keybinding editor, mostly finished but not 100%
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2531 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index b5fa7e2396..aa3455b7da 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -35,6 +35,7 @@ #include "route_params_ui.h" #include "sfdb_ui.h" #include "theme_manager.h" +#include "keyeditor.h" #include "i18n.h" @@ -329,6 +330,27 @@ ARDOUR_UI::toggle_location_window () } void +ARDOUR_UI::toggle_key_editor () +{ + if (key_editor == 0) { + key_editor = new KeyEditor; + key_editor->signal_unmap().connect (sigc::bind (sigc::ptr_fun(&ActionManager::uncheck_toggleaction), X_("<Actions>/Common/ToggleKeyEditor"))); + } + + RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleKeyEditor")); + if (act) { + RefPtr<ToggleAction> tact = RefPtr<ToggleAction>::cast_dynamic(act); + + if (tact->get_active()) { + key_editor->show_all (); + key_editor->present (); + } else { + key_editor->hide (); + } + } +} + +void ARDOUR_UI::toggle_theme_manager () { RefPtr<Action> act = ActionManager::get_action (X_("Common"), X_("ToggleThemeManager")); |