diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-05 19:39:16 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-03-05 19:39:16 +0000 |
commit | 5a39bf595c737dbb36666a9e718ac267e9131380 (patch) | |
tree | 12219a08eec7305a135eafff4210a037ff5f8804 /gtk2_ardour/ardour_ui_dialogs.cc | |
parent | caeb564748e7ece1025f55f005fe5591795ec234 (diff) |
export range markers patch (revisited), change selection model, copy-drag tempo+meter marker patch
git-svn-id: svn://localhost/trunk/ardour2@349 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/ardour_ui_dialogs.cc')
-rw-r--r-- | gtk2_ardour/ardour_ui_dialogs.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc index 08501e746a..29dc204af9 100644 --- a/gtk2_ardour/ardour_ui_dialogs.cc +++ b/gtk2_ardour/ardour_ui_dialogs.cc @@ -53,6 +53,24 @@ ARDOUR_UI::connect_to_session (Session *s) /* sensitize menu bar options that are now valid */ ActionManager::set_sensitive (ActionManager::session_sensitive_actions, true); + + if (session->locations()->num_range_markers()) { + ActionManager::set_sensitive (ActionManager::range_sensitive_actions, true); + } else { + ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false); + } + + /* there are never any selections on startup */ + + ActionManager::set_sensitive (ActionManager::region_selection_sensitive_actions, false); + ActionManager::set_sensitive (ActionManager::time_selection_sensitive_actions, false); + ActionManager::set_sensitive (ActionManager::track_selection_sensitive_actions, false); + ActionManager::set_sensitive (ActionManager::line_selection_sensitive_actions, false); + ActionManager::set_sensitive (ActionManager::point_selection_sensitive_actions, false); + ActionManager::set_sensitive (ActionManager::playlist_selection_sensitive_actions, false); + + session->locations()->added.connect (mem_fun (*this, &ARDOUR_UI::handle_locations_change)); + session->locations()->removed.connect (mem_fun (*this, &ARDOUR_UI::handle_locations_change)); rec_button.set_sensitive (true); shuttle_box.set_sensitive (true); @@ -366,3 +384,14 @@ ARDOUR_UI::toggle_sound_file_browser () } } +void +ARDOUR_UI::handle_locations_change (Location* ignored) +{ + if (session) { + if (session->locations()->num_range_markers()) { + ActionManager::set_sensitive (ActionManager::range_sensitive_actions, true); + } else { + ActionManager::set_sensitive (ActionManager::range_sensitive_actions, false); + } + } +} |