summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-03-31 15:51:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-03-31 15:51:03 +0000
commit9643eb4b2320c2ec77613cddd6a66056514bcdfa (patch)
tree838d6420ae792bf98df7dd0fb313ba6c0c2f00c8 /gtk2_ardour
parented48cdb3dfd10e27558d2d1063049b625830b049 (diff)
a) persist whether the end marker should move at first capture in the session file
b) prevent transport motion if stop-at-session-end is true c) ensure that (more) menu items that provide control over Configuration object options are in the correct state at startup d) Configuration options removed from "have a session" sensitivity toggling e) removed functionally empty default_keys.cc git-svn-id: svn://localhost/trunk/ardour2@433 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/SConscript1
-rw-r--r--gtk2_ardour/ardour_ui.cc1
-rw-r--r--gtk2_ardour/ardour_ui.h4
-rw-r--r--gtk2_ardour/ardour_ui_dialogs.cc2
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc37
-rw-r--r--gtk2_ardour/ardour_ui_options.cc27
-rw-r--r--gtk2_ardour/default_keys.cc35
-rw-r--r--gtk2_ardour/mtest.cc2
-rw-r--r--gtk2_ardour/taperegionview.cc2
9 files changed, 44 insertions, 67 deletions
diff --git a/gtk2_ardour/SConscript b/gtk2_ardour/SConscript
index e74c390a35..38cac52b40 100644
--- a/gtk2_ardour/SConscript
+++ b/gtk2_ardour/SConscript
@@ -89,7 +89,6 @@ color_manager.cc
crossfade_edit.cc
crossfade_view.cc
curvetest.cc
-default_keys.cc
editing.cc
editor.cc
editor_actions.cc
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index d0f46dd0df..2b7b87f93b 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -228,7 +228,6 @@ ARDOUR_UI::set_engine (AudioEngine& e)
_tooltips.enable();
keyboard = new Keyboard;
- install_keybindings ();
string meter_path;
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 8e1bfc1414..9f4d8de8d9 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -576,7 +576,8 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void connect_dependents_to_session (ARDOUR::Session *);
void we_have_dependents ();
void setup_keybindings ();
- void setup_options ();
+ void setup_session_options ();
+ void setup_config_options ();
guint32 last_key_press_time;
@@ -623,7 +624,6 @@ class ARDOUR_UI : public Gtkmm2ext::UI
/* Keymap handling */
- void install_keybindings ();
Glib::RefPtr<Gtk::ActionGroup> get_common_actions();
void install_actions ();
void test_binding_action (const char *);
diff --git a/gtk2_ardour/ardour_ui_dialogs.cc b/gtk2_ardour/ardour_ui_dialogs.cc
index 29dc204af9..29a5858603 100644
--- a/gtk2_ardour/ardour_ui_dialogs.cc
+++ b/gtk2_ardour/ardour_ui_dialogs.cc
@@ -99,7 +99,7 @@ ARDOUR_UI::connect_to_session (Session *s)
sfdb->set_session (s);
}
- setup_options ();
+ setup_session_options ();
Blink.connect (mem_fun(*this, &ARDOUR_UI::transport_rec_enable_blink));
Blink.connect (mem_fun(*this, &ARDOUR_UI::solo_blink));
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 8414b8f070..9c1ae4c45f 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -399,26 +399,21 @@ ARDOUR_UI::install_actions ()
RadioAction::Group monitoring_group;
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseHardwareMonitoring"), _("Hardware monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseHardwareMonitoring));
- ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseSoftwareMonitoring"), _("Software monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseSoftwareMonitoring));
- ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (option_actions, monitoring_group, X_("UseExternalMonitoring"), _("External monitoring"), mem_fun (*this, &ARDOUR_UI::toggle_UseExternalMonitoring));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
- ActionManager::session_sensitive_actions.push_back (act);
+ /* Configuration object options (i.e. not session specific) */
+ ActionManager::register_toggle_action (option_actions, X_("StopPluginsWithTransport"), _("Stop plugins with transport"), mem_fun (*this, &ARDOUR_UI::toggle_StopPluginsWithTransport));
+ ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
+ ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
+ ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
+ ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
+
+ /* session options */
- act = ActionManager::register_toggle_action (option_actions, X_("VerifyRemoveLastCapture"), _("Verify remove last capture"), mem_fun (*this, &ARDOUR_UI::toggle_VerifyRemoveLastCapture));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("StopRecordingOnXrun"), _("Stop recording on xrun"), mem_fun (*this, &ARDOUR_UI::toggle_StopRecordingOnXrun));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("StopTransportAtEndOfSession"), _("Stop transport at session end"), mem_fun (*this, &ARDOUR_UI::toggle_StopTransportAtEndOfSession));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_toggle_action (option_actions, X_("GainReduceFastTransport"), _("-12dB gain reduce ffwd/rewind"), mem_fun (*this, &ARDOUR_UI::toggle_GainReduceFastTransport));
+ act = ActionManager::register_toggle_action (option_actions, X_("DoNotRunPluginsWhileRecording"), _("Do not run plugins while recording"), mem_fun (*this, &ARDOUR_UI::toggle_DoNotRunPluginsWhileRecording));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("LatchedSolo"), _("Latched solo"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedSolo));
@@ -427,6 +422,7 @@ ARDOUR_UI::install_actions ()
RadioAction::Group solo_group;
act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloInPlace"), _("Solo in-place"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
+ ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (option_actions, solo_group, X_("SoloViaBus"), _("Solo via bus"), mem_fun (*this, &ARDOUR_UI::toggle_SoloViaBus));
ActionManager::session_sensitive_actions.push_back (act);
@@ -435,21 +431,16 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_action (option_actions, X_("UnmuteNewFullCrossfades"), _("Unmute new full crossfades"), mem_fun (*this, &ARDOUR_UI::toggle_UnmuteNewFullCrossfades));
ActionManager::session_sensitive_actions.push_back (act);
-
-#ifdef NEW_ACTIONS
- act = ActionManager::register_action (option_actions, X_("SetRegionLayerMode", _("SetRegionLayerMode"), mem_fun (*this, &ARDOUR_UI::toggle_SetRegionLayerMode)));
- ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (option_actions, X_("SetCrossfadeModel", _("SetCrossfadeModel"), mem_fun (*this, &ARDOUR_UI::toggle_SetCrossfadeModel)));
- ActionManager::session_sensitive_actions.push_back (act);
-
-#endif
-
ActionManager::add_action_group (shuttle_actions);
ActionManager::add_action_group (option_actions);
ActionManager::add_action_group (jack_actions);
ActionManager::add_action_group (transport_actions);
ActionManager::add_action_group (main_actions);
ActionManager::add_action_group (common_actions);
+
+ /* initialize state of non-session dependent options */
+
+ setup_config_options ();
}
void
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index f38aeedc8d..b959cc7300 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -35,6 +35,31 @@ using namespace Gtkmm2ext;
using namespace ARDOUR;
void
+ARDOUR_UI::setup_config_options ()
+{
+ struct {
+ char* name;
+ bool (Configuration::*method)(void) const;
+ } options[] = {
+ { "ToggleTimeMaster", &Configuration::get_jack_time_master },
+ { "StopPluginsWithTransport", &Configuration::get_plugins_stop_with_transport },
+ { "LatchedRecordEnable", &Configuration::get_latched_record_enable },
+ { "VerifyRemoveLastCapture", &Configuration::get_verify_remove_last_capture },
+ { "StopRecordingOnXrun", &Configuration::get_stop_recording_on_xrun },
+ { "StopTransportAtEndOfSession", &Configuration::get_stop_at_session_end },
+ { 0, 0 }
+ };
+
+ for (uint32_t n = 0; options[n].name; ++n) {
+ Glib::RefPtr<Action> act = ActionManager::get_action ("options", options[n].name);
+ if (act) {
+ Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
+ tact->set_active ((Config->*(options[n].method))());
+ }
+ }
+}
+
+void
ARDOUR_UI::toggle_time_master ()
{
toggle_config_state ("Transport", "ToggleTimeMaster", &Configuration::set_jack_time_master);
@@ -370,7 +395,7 @@ ARDOUR_UI::mtc_port_changed ()
}
void
-ARDOUR_UI::setup_options ()
+ARDOUR_UI::setup_session_options ()
{
mtc_port_changed ();
diff --git a/gtk2_ardour/default_keys.cc b/gtk2_ardour/default_keys.cc
deleted file mode 100644
index 5209a4e277..0000000000
--- a/gtk2_ardour/default_keys.cc
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- Copyright (C) 1999 Paul Davis
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
- $Id$
-*/
-
-#include <sigc++/bind.h>
-#include <pbd/error.h>
-
-#include "ardour_ui.h"
-#include "keyboard_target.h"
-
-using namespace ARDOUR;
-using namespace Gtkmm2ext;
-using namespace Gtk;
-using namespace sigc;
-
-void
-ARDOUR_UI::install_keybindings ()
-{
-}
diff --git a/gtk2_ardour/mtest.cc b/gtk2_ardour/mtest.cc
index 0ae55c8174..7d62509159 100644
--- a/gtk2_ardour/mtest.cc
+++ b/gtk2_ardour/mtest.cc
@@ -133,7 +133,7 @@ main (int argc, char* argv[])
other_uimanager->insert_action_group (copy_actions (shared_actions));
other_window.add_accel_group (accels);
- window.add_accel_group (accels);
+ // window.add_accel_group (accels);
Gtk::MenuBar* m;
diff --git a/gtk2_ardour/taperegionview.cc b/gtk2_ardour/taperegionview.cc
index d08b985176..19276223ef 100644
--- a/gtk2_ardour/taperegionview.cc
+++ b/gtk2_ardour/taperegionview.cc
@@ -117,8 +117,6 @@ TapeAudioRegionView::~TapeAudioRegionView()
void
TapeAudioRegionView::update (uint32_t n)
{
- cerr << "new peaks ready for channel " << n << endl;
-
/* check that all waves are build and ready */
if (!tmp_waves.empty()) {