summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorHans Baier <hansfbaier@googlemail.com>2008-08-04 22:37:24 +0000
committerHans Baier <hansfbaier@googlemail.com>2008-08-04 22:37:24 +0000
commited990de6040215412baf8f448b1876d78bd9cc19 (patch)
tree196c6552040b0ad1c9c402cba2b4543ae39536ef /gtk2_ardour
parent44fd104ada0fbd8b76d34150e941d85d6de6f81b (diff)
* first implementation of MIDI Clock Slave support
git-svn-id: svn://localhost/ardour2/branches/3.0@3652 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour.menus1
-rw-r--r--gtk2_ardour/ardour_ui.h61
-rw-r--r--gtk2_ardour/ardour_ui_ed.cc58
-rw-r--r--gtk2_ardour/ardour_ui_options.cc58
-rw-r--r--gtk2_ardour/option_editor.cc171
-rw-r--r--gtk2_ardour/option_editor.h11
6 files changed, 212 insertions, 148 deletions
diff --git a/gtk2_ardour/ardour.menus b/gtk2_ardour/ardour.menus
index 66584fe79b..e9b4800ae9 100644
--- a/gtk2_ardour/ardour.menus
+++ b/gtk2_ardour/ardour.menus
@@ -393,6 +393,7 @@
<menuitem action='SendMTC'/>
<menuitem action='SendMMC'/>
<menuitem action='UseMMC'/>
+ <menuitem action='UseMIDIClock'/>
</menu>
<menu action="TempoMenu">
<menuitem action='set-tempo-from-region'/>
diff --git a/gtk2_ardour/ardour_ui.h b/gtk2_ardour/ardour_ui.h
index 556a7e9b8c..442d319f77 100644
--- a/gtk2_ardour/ardour_ui.h
+++ b/gtk2_ardour/ardour_ui.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1999-2002 Paul Davis
+ Copyright (C) 1999-2002 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
@@ -110,18 +110,18 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void show ();
bool shown() { return shown_flag; }
-
+
void show_splash ();
void hide_splash ();
void show_about ();
void hide_about ();
-
+
void idle_load (const Glib::ustring& path);
int load_session (const Glib::ustring& path, const Glib::ustring& snapshot, Glib::ustring mix_template = Glib::ustring());
bool session_loaded;
- int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
- uint32_t ctl_chns,
+ int build_session (const Glib::ustring& path, const Glib::ustring& snapshot,
+ uint32_t ctl_chns,
uint32_t master_chns,
ARDOUR::AutoConnectOption input_connect,
ARDOUR::AutoConnectOption output_connect,
@@ -145,10 +145,10 @@ class ARDOUR_UI : public Gtkmm2ext::UI
int load_cmdline_session (const Glib::ustring& session_name, const Glib::ustring& session_path, bool& existing_session);
int build_session_from_nsd (const Glib::ustring& session_name, const Glib::ustring& session_path);
bool ask_about_loading_existing_session (const Glib::ustring& session_path);
-
+
/// @return true if session was successfully unloaded.
int unload_session (bool hide_stuff = false);
- void close_session();
+ void close_session();
int save_state_canfail (string state_name = "");
void save_state (const string & state_name = "");
@@ -212,7 +212,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void restore_clock_modes ();
void add_route (Gtk::Window* float_window);
-
+
void session_add_audio_track (int input_channels, int32_t output_channels, ARDOUR::TrackMode mode, uint32_t how_many) {
session_add_audio_route (true, input_channels, output_channels, mode, how_many);
}
@@ -260,7 +260,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_click ();
void toggle_session_auto_loop ();
-
+
void toggle_options_window ();
private:
@@ -295,7 +295,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void goto_editor_window ();
void goto_mixer_window ();
-
+
Gtk::Table adjuster_table;
Gtk::Frame adjuster_frame;
Gtk::Fixed adjuster_base;
@@ -334,7 +334,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void queue_transport_change ();
void map_transport_state ();
int32_t do_engine_start ();
-
+
void engine_halted ();
void engine_stopped ();
void engine_running ();
@@ -359,7 +359,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void stop_clocking ();
void manage_window (Gtk::Window&);
-
+
AudioClock big_clock;
Gtk::Frame big_clock_frame;
Gtk::Window* big_clock_window;
@@ -399,15 +399,15 @@ class ARDOUR_UI : public Gtkmm2ext::UI
AutoLoop,
PlaySelection,
ShuttleControl
-
+
};
-
+
TransportControllable (std::string name, ARDOUR_UI&, ToggleType);
void set_value (float);
float get_value (void) const;
-
+
void set_id (const std::string&);
-
+
ARDOUR_UI& ui;
ToggleType type;
};
@@ -505,7 +505,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
Gtk::Menu* session_popup_menu;
struct RecentSessionModelColumns : public Gtk::TreeModel::ColumnRecord {
- RecentSessionModelColumns() {
+ RecentSessionModelColumns() {
add (visible_name);
add (fullpath);
}
@@ -519,7 +519,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
ArdourDialog* session_selector_window;
Gtk::FileChooserDialog* open_session_selector;
-
+
void build_session_selector();
void redisplay_recent_sessions();
void recent_session_row_activated (const Gtk::TreePath& path, Gtk::TreeViewColumn* col);
@@ -574,7 +574,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
bool _will_create_new_session_automatically;
NewSessionDialog* new_session_dialog;
-
+
void open_session ();
void open_recent_session ();
void save_template ();
@@ -593,7 +593,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void transport_stop_and_forget_capture ();
void transport_record (bool roll);
void transport_roll ();
- void transport_play_selection();
+ void transport_play_selection();
void transport_forward (int option);
void transport_rewind (int option);
void transport_loop ();
@@ -607,16 +607,16 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void connect_to_session (ARDOUR::Session *);
void connect_dependents_to_session (ARDOUR::Session *);
void we_have_dependents ();
-
+
void setup_session_options ();
-
+
guint32 last_key_press_time;
void snapshot_session ();
Mixer_UI *mixer;
int create_mixer ();
-
+
PublicEditor *editor;
int create_editor ();
@@ -641,15 +641,15 @@ class ARDOUR_UI : public Gtkmm2ext::UI
KeyEditor *key_editor;
/* Options window */
-
+
OptionEditor *option_editor;
-
+
/* route dialog */
AddRouteDialog *add_route_dialog;
-
+
/* Keyboard Handling */
-
+
Keyboard* keyboard;
/* Keymap handling */
@@ -689,7 +689,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void session_dialog (std::string);
int pending_state_dialog ();
int sr_mismatch_dialog (nframes_t, nframes_t);
-
+
void disconnect_from_jack ();
void reconnect_to_jack ();
void set_jack_buffer_size (nframes_t);
@@ -711,6 +711,7 @@ class ARDOUR_UI : public Gtkmm2ext::UI
void toggle_use_mmc ();
void toggle_send_mmc ();
void toggle_send_mtc ();
+ void toggle_use_midi_clock ();
void toggle_use_osc ();
@@ -774,11 +775,11 @@ class ARDOUR_UI : public Gtkmm2ext::UI
bool check_audioengine();
void audioengine_setup ();
- void display_message (const char *prefix, gint prefix_len,
+ void display_message (const char *prefix, gint prefix_len,
Glib::RefPtr<Gtk::TextBuffer::Tag> ptag, Glib::RefPtr<Gtk::TextBuffer::Tag> mtag, const char *msg);
Gtk::Label status_bar_label;
Gtk::ToggleButton error_log_button;
-
+
void loading_message (const std::string& msg);
void end_loading_messages ();
diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc
index 95e6dd6906..7eb13892ee 100644
--- a/gtk2_ardour/ardour_ui_ed.cc
+++ b/gtk2_ardour/ardour_ui_ed.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 20002-2004 Paul Davis
+ Copyright (C) 20002-2004 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
@@ -112,11 +112,11 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_action (main_actions, X_("Close"), _("Close"), mem_fun(*this, &ARDOUR_UI::close_session));
ActionManager::session_sensitive_actions.push_back (act);
- act = ActionManager::register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"),
+ act = ActionManager::register_action (main_actions, X_("AddTrackBus"), _("Add Track/Bus"),
bind (mem_fun(*this, &ARDOUR_UI::add_route), (Gtk::Window*) 0));
ActionManager::session_sensitive_actions.push_back (act);
-
+
#ifdef WITH_CMT
sys::path anicomp_file_path;
@@ -152,7 +152,7 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (main_actions, X_("FlushWastebasket"), _("Flush wastebasket"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::flush_trash));
ActionManager::session_sensitive_actions.push_back (act);
-
+
/* JACK actions for controlling ... JACK */
Glib::RefPtr<ActionGroup> jack_actions = ActionGroup::create (X_("JACK"));
@@ -164,9 +164,9 @@ ARDOUR_UI::install_actions ()
act = ActionManager::register_action (jack_actions, X_("JACKDisconnect"), _("Disconnect"), mem_fun (*(ARDOUR_UI::instance()), &ARDOUR_UI::disconnect_from_jack));
ActionManager::jack_sensitive_actions.push_back (act);
-
+
RadioAction::Group jack_latency_group;
-
+
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency32"), X_("32"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 32));
ActionManager::jack_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency64"), X_("64"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 64));
@@ -185,9 +185,9 @@ ARDOUR_UI::install_actions ()
ActionManager::jack_sensitive_actions.push_back (act);
act = ActionManager::register_radio_action (jack_actions, jack_latency_group, X_("JACKLatency8192"), X_("8192"), bind (mem_fun(*this, &ARDOUR_UI::set_jack_buffer_size), (nframes_t) 8192));
ActionManager::jack_sensitive_actions.push_back (act);
-
+
/* these actions are intended to be shared across all windows */
-
+
common_actions = ActionGroup::create (X_("Common"));
ActionManager::register_action (main_actions, X_("WindowMenu"), _("Window"));
ActionManager::register_action (common_actions, X_("Quit"), _("Quit"), (mem_fun(*this, &ARDOUR_UI::finish)));
@@ -211,7 +211,7 @@ ARDOUR_UI::install_actions ()
ActionManager::register_toggle_action (common_actions, X_("ToggleThemeManager"), _("Theme Manager"), mem_fun(*this, &ARDOUR_UI::toggle_theme_manager));
ActionManager::register_toggle_action (common_actions, X_("ToggleKeyEditor"), _("Keybindings"), mem_fun(*this, &ARDOUR_UI::toggle_key_editor));
ActionManager::register_toggle_action (common_actions, X_("ToggleBundleManager"), _("Bundle Manager"), mem_fun(*this, &ARDOUR_UI::toggle_bundle_manager));
-
+
act = ActionManager::register_action (common_actions, X_("AddAudioTrack"), _("Add Audio Track"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_track), 1, 1, ARDOUR::Normal, 1));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_action (common_actions, X_("AddAudioBus"), _("Add Audio Bus"), bind (mem_fun(*this, &ARDOUR_UI::session_add_audio_bus), 1, 1, 1));
@@ -234,7 +234,7 @@ ARDOUR_UI::install_actions ()
/* these two are not used by key bindings, instead use ToggleRoll for that. these two do show up in
menus and via button proxies.
*/
-
+
act = ActionManager::register_action (transport_actions, X_("Stop"), _("Stop"), mem_fun(*this, &ARDOUR_UI::transport_stop));
ActionManager::session_sensitive_actions.push_back (act);
ActionManager::transport_sensitive_actions.push_back (act);
@@ -418,7 +418,7 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
Glib::RefPtr<ActionGroup> shuttle_actions = ActionGroup::create ("ShuttleActions");
-
+
shuttle_actions->add (Action::create (X_("SetShuttleUnitsPercentage"), _("Percentage")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Percentage)));
shuttle_actions->add (Action::create (X_("SetShuttleUnitsSemitones"), _("Semitones")), hide_return (bind (mem_fun (*Config, &Configuration::set_shuttle_units), Semitones)));
@@ -430,6 +430,8 @@ ARDOUR_UI::install_actions ()
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("UseMMC"), _("Use MMC"), mem_fun (*this, &ARDOUR_UI::toggle_use_mmc));
ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_toggle_action (option_actions, X_("UseMIDIClock"), _("Use MIDI Clock"), mem_fun (*this, &ARDOUR_UI::toggle_use_midi_clock));
+ ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("SendMIDIfeedback"), _("Send MIDI feedback"), mem_fun (*this, &ARDOUR_UI::toggle_send_midi_feedback));
ActionManager::session_sensitive_actions.push_back (act);
@@ -451,7 +453,7 @@ ARDOUR_UI::install_actions ()
ActionManager::register_toggle_action (option_actions, X_("LatchedRecordEnable"), _("Rec-enable stays engaged at stop"), mem_fun (*this, &ARDOUR_UI::toggle_LatchedRecordEnable));
ActionManager::register_toggle_action (option_actions, X_("RegionEquivalentsOverlap"), _("Region equivalents overlap"), mem_fun (*this, &ARDOUR_UI::toggle_RegionEquivalentsOverlap));
ActionManager::register_toggle_action (option_actions, X_("PrimaryClockDeltaEditCursor"), _("Primary Clock delta to edit point"), mem_fun (*this, &ARDOUR_UI::toggle_PrimaryClockDeltaEditCursor));
- ActionManager::register_toggle_action (option_actions, X_("SecondaryClockDeltaEditCursor"), _("Secondary Clock delta to edit point"), mem_fun (*this, &ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor));
+ ActionManager::register_toggle_action (option_actions, X_("SecondaryClockDeltaEditCursor"), _("Secondary Clock delta to edit point"), mem_fun (*this, &ARDOUR_UI::toggle_SecondaryClockDeltaEditCursor));
ActionManager::register_toggle_action (option_actions, X_("ShowTrackMeters"), _("Enable Editor Meters"), mem_fun (*this, &ARDOUR_UI::toggle_ShowTrackMeters));
ActionManager::register_toggle_action (option_actions, X_("OnlyCopyImportedFiles"), _("Always copy imported files"), mem_fun (*this, &ARDOUR_UI::toggle_only_copy_imported_files));
ActionManager::register_toggle_action (option_actions, X_("RubberbandingSnapsToGrid"), _("Rubberbanding Snaps to Grid"), mem_fun (*this, &ARDOUR_UI::toggle_rubberbanding_snaps_to_grid));
@@ -500,7 +502,7 @@ ARDOUR_UI::install_actions ()
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));
ActionManager::session_sensitive_actions.push_back (act);
act = ActionManager::register_toggle_action (option_actions, X_("ShowSoloMutes"), _("Show solo muting"), mem_fun (*this, &ARDOUR_UI::toggle_ShowSoloMutes));
@@ -547,7 +549,7 @@ ARDOUR_UI::install_actions ()
RadioAction::Group monitoring_group;
- /* it would be nice not to even show this item, but that messes up the
+ /* it would be nice not to even show this item, but that messes up the
menus which are not dynamically modified at runtime. so we make it
sensitive only if it makes sense.
*/
@@ -717,20 +719,20 @@ ARDOUR_UI::build_control_surface_menu ()
string action_name = "Toggle";
action_name += legalize_for_path ((*i)->name);
action_name += "Surface";
-
+
string action_label = (*i)->name;
-
+
Glib::RefPtr<Action> act = ActionManager::register_toggle_action (editor->editor_actions, action_name.c_str(), action_label.c_str(),
(bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol), *i)));
-
+
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
with_feedback = false;
-
+
if ((*i)->protocol || (*i)->requested) {
tact->set_active ();
}
-
+
ui += "<menuitem action='";
ui += action_name;
ui += "'/>\n";
@@ -738,7 +740,7 @@ ARDOUR_UI::build_control_surface_menu ()
if ((*i)->supports_feedback) {
string submenu_name = action_name;
-
+
submenu_name += "SubMenu";
ActionManager::register_action (editor->editor_actions, submenu_name.c_str(), _("Controls"));
@@ -746,17 +748,17 @@ ARDOUR_UI::build_control_surface_menu ()
action_name += "Feedback";
Glib::RefPtr<Action> act = ActionManager::register_toggle_action (editor->editor_actions, action_name.c_str(), _("Feedback"),
- (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback),
- *i,
+ (bind (mem_fun (*this, &ARDOUR_UI::toggle_control_protocol_feedback),
+ *i,
"Editor",
action_name)));
-
+
ui += "<menu action='";
ui += submenu_name;
ui += "'>\n<menuitem action='";
ui += action_name;
ui += "'/>\n</menu>\n";
-
+
if ((*i)->protocol) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic (act);
tact->set_active ((*i)->protocol->get_feedback ());
@@ -786,7 +788,7 @@ ARDOUR_UI::build_menu_bar ()
* when the first menu instance is created.
*/
// XXX bug in gtkmm causes this to popup an error message
- // Gtk::Settings::get_default()->property_gtk_can_change_accels() = true;
+ // Gtk::Settings::get_default()->property_gtk_can_change_accels() = true;
// so use this instead ...
gtk_settings_set_long_property (gtk_settings_get_default(), "gtk-can-change-accels", 1, "Ardour:designers");
@@ -817,7 +819,7 @@ ARDOUR_UI::build_menu_bar ()
#endif
if (!Profile->get_small_screen()) {
-#ifndef GTKOSX
+#ifndef GTKOSX
// OSX provides its own wallclock, thank you very much
menu_hbox.pack_end (wall_clock_box, false, false, 2);
#endif
@@ -846,9 +848,9 @@ void
ARDOUR_UI::setup_clock ()
{
ARDOUR_UI::Clock.connect (bind (mem_fun (big_clock, &AudioClock::set), false));
-
+
big_clock_window = new Window (WINDOW_TOPLEVEL);
-
+
big_clock_window->set_keep_above (true);
big_clock_window->set_border_width (0);
big_clock_window->add (big_clock);
diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc
index fca80f1e3e..75d33d9416 100644
--- a/gtk2_ardour/ardour_ui_options.cc
+++ b/gtk2_ardour/ardour_ui_options.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2005 Paul Davis
+ Copyright (C) 2005 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
@@ -68,6 +68,12 @@ ARDOUR_UI::toggle_use_mmc ()
}
void
+ARDOUR_UI::toggle_use_midi_clock ()
+{
+ ActionManager::toggle_config_state ("options", "UseMIDIClock", &Configuration::set_midi_clock_control, &Configuration::get_midi_clock_control);
+}
+
+void
ARDOUR_UI::toggle_use_osc ()
{
ActionManager::toggle_config_state ("options", "UseOSC", &Configuration::set_use_osc, &Configuration::get_use_osc);
@@ -121,7 +127,7 @@ ARDOUR_UI::set_native_file_header_format (HeaderFormat hf)
break;
default:
fatal << string_compose (_("programming error: %1"), "illegal file header format in ::set_native_file_header_format") << endmsg;
- /*NOTREACHED*/
+ /*NOTREACHED*/
}
Glib::RefPtr<Action> act = ActionManager::get_action ("options", action);
@@ -168,7 +174,7 @@ void
ARDOUR_UI::set_input_auto_connect (AutoConnectOption option)
{
const char* action;
-
+
switch (option) {
case AutoConnectPhysical:
action = X_("InputAutoConnectPhysical");
@@ -192,7 +198,7 @@ void
ARDOUR_UI::set_output_auto_connect (AutoConnectOption option)
{
const char* action;
-
+
switch (option) {
case AutoConnectPhysical:
action = X_("OutputAutoConnectPhysical");
@@ -224,7 +230,7 @@ ARDOUR_UI::set_solo_model (SoloModel model)
case SoloBus:
action = X_("SoloViaBus");
break;
-
+
case InverseMute:
action = X_("SoloInPlace");
break;
@@ -287,7 +293,7 @@ ARDOUR_UI::set_monitor_model (MonitorModel model)
case HardwareMonitoring:
action = X_("UseHardwareMonitoring");
break;
-
+
case SoftwareMonitoring:
action = X_("UseSoftwareMonitoring");
break;
@@ -325,7 +331,7 @@ ARDOUR_UI::set_denormal_model (DenormalModel model)
case DenormalFTZ:
action = X_("DenormalFTZ");
break;
-
+
case DenormalDAZ:
action = X_("DenormalDAZ");
break;
@@ -395,7 +401,7 @@ void
ARDOUR_UI::unset_dual_punch ()
{
Glib::RefPtr<Action> action = ActionManager::get_action ("Transport", "TogglePunch");
-
+
if (action) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(action);
if (tact) {
@@ -597,6 +603,7 @@ void
ARDOUR_UI::mtc_port_changed ()
{
bool have_mtc;
+ bool have_midi_clock;
if (session) {
if (session->mtc_port()) {
@@ -604,8 +611,14 @@ ARDOUR_UI::mtc_port_changed ()
} else {
have_mtc = false;
}
+ if (session->midi_clock_port()) {
+ have_midi_clock = true;
+ } else {
+ have_midi_clock = false;
+ }
} else {
have_mtc = false;
+ have_midi_clock = false;
}
positional_sync_strings.clear ();
@@ -613,8 +626,11 @@ ARDOUR_UI::mtc_port_changed ()
if (have_mtc) {
positional_sync_strings.push_back (slave_source_to_string (MTC));
}
+ if (have_midi_clock) {
+ positional_sync_strings.push_back (slave_source_to_string (MIDIClock));
+ }
positional_sync_strings.push_back (slave_source_to_string (JACK));
-
+
set_popdown_strings (sync_option_combo, positional_sync_strings);
}
@@ -776,7 +792,7 @@ ARDOUR_UI::map_file_header_format ()
break;
default:
- fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
+ fatal << string_compose (_("programming error: unknown file header format passed to ARDOUR_UI::map_file_data_format: %1"),
Config->get_native_file_header_format()) << endmsg;
/*NOTREACHED*/
}
@@ -812,7 +828,7 @@ ARDOUR_UI::map_file_data_format ()
break;
default:
- fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
+ fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"),
Config->get_native_file_data_format()) << endmsg;
/*NOTREACHED*/
}
@@ -866,7 +882,7 @@ ARDOUR_UI::map_output_auto_connect ()
Glib::RefPtr<Action> act = ActionManager::get_action ("options", on);
if (act) {
Glib::RefPtr<ToggleAction> tact = Glib::RefPtr<ToggleAction>::cast_dynamic(act);
-
+
if (tact && !tact->get_active()) {
tact->set_active (true);
}
@@ -965,7 +981,7 @@ ARDOUR_UI::map_meter_hold ()
}
}
-void
+void
ARDOUR_UI::set_meter_hold (MeterHold val)
{
const char* action = 0;
@@ -989,7 +1005,7 @@ ARDOUR_UI::set_meter_hold (MeterHold val)
}
Glib::RefPtr<Action> act = ActionManager::get_action (X_("options"), action);
-
+
if (act) {
Glib::RefPtr<RadioAction> ract = Glib::RefPtr<RadioAction>::cast_dynamic(act);
if (ract && ract->get_active() && Config->get_meter_hold() != fval) {
@@ -1046,11 +1062,11 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ENSURE_GUI_THREAD (bind (mem_fun (*this, &ARDOUR_UI::parameter_changed), parameter_name));
#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
-
+
if (PARAM_IS ("slave-source")) {
sync_option_combo.set_active_text (slave_source_to_string (Config->get_slave_source()));
-
+
switch (Config->get_slave_source()) {
case None:
ActionManager::get_action ("Transport", "ToggleAutoPlay")->set_sensitive (true);
@@ -1070,7 +1086,6 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
} else if (PARAM_IS ("send-mmc")) {
-
ActionManager::map_some_state ("options", "SendMMC", &Configuration::get_send_mmc);
} else if (PARAM_IS ("use-osc")) {
@@ -1084,10 +1099,11 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
#endif
ActionManager::map_some_state ("options", "UseOSC", &Configuration::get_use_osc);
-
+
} else if (PARAM_IS ("mmc-control")) {
ActionManager::map_some_state ("options", "UseMMC", &Configuration::get_mmc_control);
-
+ } else if (PARAM_IS ("midi-clock-control")) {
+ ActionManager::map_some_state ("options", "UseMIDIClock", &Configuration::get_midi_clock_control);
} else if (PARAM_IS ("midi-feedback")) {
ActionManager::map_some_state ("options", "SendMIDIfeedback", &Configuration::get_midi_feedback);
} else if (PARAM_IS ("do-not-record-plugins")) {
@@ -1170,7 +1186,7 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
}
} else if (PARAM_IS ("shuttle-units")) {
-
+
switch (Config->get_shuttle_units()) {
case Percentage:
shuttle_units_button.set_label("% ");
@@ -1216,7 +1232,7 @@ ARDOUR_UI::parameter_changed (const char* parameter_name)
ActionManager::map_some_state ("options", "RubberbandingSnapsToGrid", &Configuration::get_rubberbanding_snaps_to_grid);
}
-
+
#undef PARAM_IS
}
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index fd5c35e186..2dfa63080d 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2001-2006 Paul Davis
+ Copyright (C) 2001-2006 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
@@ -89,7 +89,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
/* MIDI */
- midi_port_table (4, 11),
+ midi_port_table (4, 12),
mmc_receive_device_id_adjustment (0.0, 0.0, (double) 0x7f, 1.0, 16.0),
mmc_receive_device_id_spinner (mmc_receive_device_id_adjustment),
mmc_send_device_id_adjustment (0.0, 0.0, (double) 0x7f, 1.0, 16.0),
@@ -109,14 +109,14 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
delete_button_spin (delete_button_adjustment),
edit_button_adjustment (3, 1, 5),
edit_button_spin (edit_button_adjustment)
-
+
{
using namespace Notebook_Helpers;
click_io_selector = 0;
auditioner_io_selector = 0;
session = 0;
-
+
WindowTitle title(Glib::get_application_name());
title += _("Preferences");
set_title(title.get_string());
@@ -126,7 +126,7 @@ OptionEditor::OptionEditor (ARDOUR_UI& uip, PublicEditor& ed, Mixer_UI& mixui)
set_name ("Preferences");
add_events (Gdk::KEY_PRESS_MASK|Gdk::KEY_RELEASE_MASK);
-
+
VBox *vbox = get_vbox();
set_border_width (3);
@@ -288,7 +288,7 @@ OptionEditor::setup_misc_options ()
label = manage (new Label (_("Short crossfade length (msecs)")));
label->set_name ("OptionsLabel");
-
+
hbox = manage (new HBox);
hbox->set_border_width (5);
hbox->set_spacing (10);
@@ -300,14 +300,14 @@ OptionEditor::setup_misc_options ()
label = manage (new Label (_("Destructive crossfade length (msecs)")));
label->set_name ("OptionsLabel");
-
+
hbox = manage (new HBox);
hbox->set_border_width (5);
hbox->set_spacing (10);
hbox->pack_start (*label, false, false);
hbox->pack_start (destructo_xfade_slider, true, true);
misc_packer.pack_start (*hbox, false, false);
-
+
destructo_xfade_adjustment.signal_value_changed().connect (mem_fun(*this, &OptionEditor::destructo_xfade_adjustment_changed));
@@ -347,7 +347,7 @@ OptionEditor::setup_misc_options ()
hbox->pack_start (*label, false, false);
hbox->pack_start (saved_history_depth_spinner, false, false);
misc_packer.pack_start (*hbox, false, false);
-
+
short_xfade_slider.set_update_policy (UPDATE_DISCONTINUOUS);
destructo_xfade_slider.set_update_policy (UPDATE_DISCONTINUOUS);
@@ -360,7 +360,7 @@ void
OptionEditor::limit_history_toggled ()
{
bool x = limit_history_button.get_active();
-
+
if (!x) {
Config->set_history_depth (0);
history_depth_spinner.set_sensitive (false);
@@ -401,9 +401,9 @@ OptionEditor::short_xfade_adjustment_changed ()
{
if (session) {
float val = short_xfade_adjustment.get_value();
-
+
/* val is in msecs */
-
+
Crossfade::set_short_xfade_length ((nframes_t) floor (session->frame_rate() * (val / 1000.0)));
}
}
@@ -415,12 +415,12 @@ OptionEditor::destructo_xfade_adjustment_changed ()
/* val is in msecs */
-
+
Config->set_destructive_xfade_msecs ((uint32_t) floor (val));
if (session) {
SndFileSource::setup_standard_crossfades (session->frame_rate());
- }
+ }
}
void
@@ -431,14 +431,14 @@ OptionEditor::setup_sync_options ()
smpte_offset_clock.set_mode (AudioClock::SMPTE);
smpte_offset_clock.ValueChanged.connect (mem_fun(*this, &OptionEditor::smpte_offset_chosen));
-
+
smpte_offset_negative_button.set_name ("OptionEditorToggleButton");
smpte_offset_negative_button.unset_flags (Gtk::CAN_FOCUS);
Label *smpte_offset_label = manage (new Label (_("SMPTE Offset")));
smpte_offset_label->set_name("OptionsLabel");
-
+
hbox = manage (new HBox);
hbox->set_border_width (5);
hbox->set_spacing (10);
@@ -510,17 +510,17 @@ OptionEditor::setup_midi_options ()
hbox = manage (new HBox);
hbox->set_border_width (6);
hbox->set_spacing (6);
- label = (manage (new Label (_("Inbound MMC Device ID"))));
+ label = (manage (new Label (_("Inbound MMC Device ID"))));
hbox->pack_start (mmc_receive_device_id_spinner, false, false);
hbox->pack_start (*label, false, false);
- midi_packer.pack_start (*hbox, false, false);
+ midi_packer.pack_start (*hbox, false, false);
mmc_receive_device_id_spinner.set_value(Config->get_mmc_receive_device_id ());
hbox = manage (new HBox);
hbox->set_border_width (6);
hbox->set_spacing (6);
- label = (manage (new Label (_("Outbound MMC Device ID"))));
+ label = (manage (new Label (_("Outbound MMC Device ID"))));
hbox->pack_start (mmc_send_device_id_spinner, false, false);
hbox->pack_start (*label, false, false);
midi_packer.pack_start (*hbox, false, false);
@@ -548,52 +548,60 @@ OptionEditor::redisplay_midi_ports ()
midi_port_table_widgets.clear ();
- midi_port_table.resize (ports.size() + 4, 11);
+ midi_port_table.resize (ports.size() + 4, 12);
Gtk::Label* label;
- label = (manage (new Label (_("Port"))));
+ label = (manage (new Label (_("Port"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 0, 1, 0, 1);
- label = (manage (new Label (_("Offline"))));
+ label = (manage (new Label (_("Offline"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 1, 2, 0, 1);
- label = (manage (new Label (_("Trace\nInput"))));
+ label = (manage (new Label (_("Trace\nInput"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 2, 3, 0, 1);
- label = (manage (new Label (_("Trace\nOutput"))));
+ label = (manage (new Label (_("Trace\nOutput"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 3, 4, 0, 1);
- label = (manage (new Label (_("MTC"))));
+ label = (manage (new Label (_("MTC"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 4, 5, 0, 1);
- label = (manage (new Label (_("MMC"))));
+ label = (manage (new Label (_("MIDI\nClock"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 6, 7, 0, 1);
- label = (manage (new Label (_("MIDI Parameter\nControl"))));
+ label = (manage (new Label (_("MMC"))));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 8, 9, 0, 1);
+ label = (manage (new Label (_("MIDI Parameter\nControl"))));
+ label->show ();
+ midi_port_table_widgets.push_back (label);
+ midi_port_table.attach (*label, 10, 11, 0, 1);
- Gtk::HSeparator* hsep = (manage (new HSeparator()));
+ Gtk::HSeparator* hsep = (manage (new HSeparator()));
hsep->show ();
midi_port_table_widgets.push_back (hsep);
- midi_port_table.attach (*hsep, 0, 9, 1, 2);
- Gtk::VSeparator* vsep = (manage (new VSeparator()));
+ midi_port_table.attach (*hsep, 0, 11, 1, 2);
+ Gtk::VSeparator* vsep = (manage (new VSeparator()));
vsep->show ();
midi_port_table_widgets.push_back (vsep);
midi_port_table.attach (*vsep, 5, 6, 0, 8);
- vsep = (manage (new VSeparator()));
+ vsep = (manage (new VSeparator()));
vsep->show ();
midi_port_table_widgets.push_back (vsep);
midi_port_table.attach (*vsep, 7, 8, 0, 8);
-
+ vsep = (manage (new VSeparator()));
+ vsep->show ();
+ midi_port_table_widgets.push_back (vsep);
+ midi_port_table.attach (*vsep, 9, 10, 0, 8);
+
for (n = 0, i = ports.begin(); i != ports.end(); ++n, ++i) {
ToggleButton* tb;
@@ -601,20 +609,20 @@ OptionEditor::redisplay_midi_ports ()
Button* bb;
/* the remove button. create early so we can pass it to various callbacks */
-
+
bb = manage (new Button (Stock::REMOVE));
bb->set_name ("OptionEditorToggleButton");
bb->show ();
midi_port_table_widgets.push_back (bb);
- midi_port_table.attach (*bb, 9, 10, n+2, n+3, FILL|EXPAND, FILL);
+ midi_port_table.attach (*bb, 11, 12, n+2, n+3, FILL|EXPAND, FILL);
bb->signal_clicked().connect (bind (mem_fun(*this, &OptionEditor::remove_midi_port), i->second));
bb->set_sensitive (port_removable (i->second));
- label = (manage (new Label (i->first)));
+ label = (manage (new Label (i->first)));
label->show ();
midi_port_table_widgets.push_back (label);
midi_port_table.attach (*label, 0, 1, n+2, n+3,FILL|EXPAND, FILL );
-
+
tb = manage (new ToggleButton (_("online")));
tb->set_name ("OptionEditorToggleButton");
@@ -637,6 +645,7 @@ OptionEditor::redisplay_midi_ports ()
midi_port_table_widgets.push_back (tb);
midi_port_table.attach (*tb, 1, 2, n+2, n+3, FILL|EXPAND, FILL);
+ // Trace MIDI Input
tb = manage (new ToggleButton ());
tb->set_name ("OptionEditorToggleButton");
tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
@@ -645,6 +654,7 @@ OptionEditor::redisplay_midi_ports ()
midi_port_table_widgets.push_back (tb);
midi_port_table.attach (*tb, 2, 3, n+2, n+3, FILL|EXPAND, FILL);
+ // Trace MIDI Output
tb = manage (new ToggleButton ());
tb->set_name ("OptionEditorToggleButton");
tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
@@ -653,13 +663,13 @@ OptionEditor::redisplay_midi_ports ()
midi_port_table_widgets.push_back (tb);
midi_port_table.attach (*tb, 3, 4, n+2, n+3, FILL|EXPAND, FILL);
+ // MTC Radio Button
rb = manage (new RadioButton ());
rb->set_name ("OptionEditorToggleButton");
if (n == 0) {
mtc_button_group = rb->get_group();
} else {
rb->set_group (mtc_button_group);
-
}
rb->show ();
midi_port_table_widgets.push_back (rb);
@@ -669,7 +679,24 @@ OptionEditor::redisplay_midi_ports ()
if (session && i->second == session->mtc_port()) {
rb->set_active (true);
}
-
+
+ // MIDI Clock Radio Button
+ rb = manage (new RadioButton ());
+ rb->set_name ("OptionEditorToggleButton");
+ if (n == 0) {
+ midi_clock_button_group = rb->get_group();
+ } else {
+ rb->set_group (midi_clock_button_group);
+ }
+ rb->show ();
+ midi_port_table_widgets.push_back (rb);
+ midi_port_table.attach (*rb, 6, 7, n+2, n+3, FILL|EXPAND, FILL);
+ rb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_clock_port_chosen), (*i).second, rb, bb));
+
+ if (session && i->second == session->midi_clock_port()) {
+ rb->set_active (true);
+ }
+
rb = manage (new RadioButton ());
rb->set_name ("OptionEditorToggleButton");
if (n == 0) {
@@ -679,7 +706,7 @@ OptionEditor::redisplay_midi_ports ()
}
rb->show ();
midi_port_table_widgets.push_back (rb);
- midi_port_table.attach (*rb, 6, 7, n+2, n+3, FILL|EXPAND, FILL);
+ midi_port_table.attach (*rb, 8, 9, n+2, n+3, FILL|EXPAND, FILL);
rb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::mmc_port_chosen), (*i).second, rb, bb));
if (session && i->second == session->mmc_port()) {
@@ -695,7 +722,7 @@ OptionEditor::redisplay_midi_ports ()
}
rb->show ();
midi_port_table_widgets.push_back (rb);
- midi_port_table.attach (*rb, 8, 9, n+2, n+3, FILL|EXPAND, FILL);
+ midi_port_table.attach (*rb, 10, 11, n+2, n+3, FILL|EXPAND, FILL);
rb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::midi_port_chosen), (*i).second, rb, bb));
if (session && i->second == session->midi_port()) {
@@ -774,7 +801,7 @@ OptionEditor::port_removable (MIDI::Port *port)
}
void
-OptionEditor::mtc_port_chosen (MIDI::Port *port, Gtk::RadioButton* rb, Gtk::Button* bb)
+OptionEditor::mtc_port_chosen (MIDI::Port *port, Gtk::RadioButton* rb, Gtk::Button* bb)
{
if (session) {
if (rb->get_active()) {
@@ -816,6 +843,20 @@ OptionEditor::midi_port_chosen (MIDI::Port* port, Gtk::RadioButton* rb, Gtk::But
}
void
+OptionEditor::midi_clock_port_chosen (MIDI::Port *port, Gtk::RadioButton* rb, Gtk::Button* bb)
+{
+ if (session) {
+ if (rb->get_active()) {
+ session->set_midi_clock_port (port->name());
+ Config->set_midi_clock_port_name (port->name());
+ } else {
+ session->set_midi_clock_port ("");
+ }
+ bb->set_sensitive (port_removable (port));
+ }
+}
+
+void
OptionEditor::port_online_toggled (MIDI::Port* port, ToggleButton* tb)
{
bool wanted = tb->get_active();
@@ -823,7 +864,7 @@ OptionEditor::port_online_toggled (MIDI::Port* port, ToggleButton* tb)
if (port->input()) {
if (wanted != port->input()->offline()) {
port->input()->set_offline (wanted);
- }
+ }
}
}
@@ -831,7 +872,7 @@ void
OptionEditor::map_port_online (MIDI::Port* port, ToggleButton* tb)
{
bool bstate = tb->get_active ();
-
+
if (port->input()) {
if (bstate != port->input()->offline()) {
if (port->input()->offline()) {
@@ -911,12 +952,12 @@ void
OptionEditor::click_browse_clicked ()
{
SoundFileChooser sfdb (*this, _("Choose Click"), session);
-
+
sfdb.show_all ();
sfdb.present ();
int result = sfdb.run ();
-
+
if (result == Gtk::RESPONSE_OK) {
click_chosen(sfdb.get_filename());
}
@@ -946,7 +987,7 @@ OptionEditor::click_emphasis_browse_clicked ()
void
OptionEditor::click_emphasis_chosen (const string & path)
-{
+{
click_emphasis_path_entry.set_text (path);
click_emphasis_sound_changed ();
}
@@ -1015,7 +1056,7 @@ OptionEditor::setup_click_editor ()
click_path_entry.set_name ("OptionsEntry");
click_emphasis_path_entry.set_name ("OptionsEntry");
-
+
click_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_sound_changed));
click_emphasis_path_entry.signal_activate().connect (mem_fun(*this, &OptionEditor::click_emphasis_sound_changed));
@@ -1034,13 +1075,13 @@ OptionEditor::setup_click_editor ()
click_gpm = new GainMeter (session->click_io(), *session);
click_table.set_col_spacings (10);
-
+
label = manage(new Label(_("Click audio file")));
label->set_name ("OptionsLabel");
click_table.attach (*label, 0, 1, 0, 1, FILL|EXPAND, FILL);
click_table.attach (click_path_entry, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
click_table.attach (click_browse_button, 2, 3, 0, 1, FILL|EXPAND, FILL);
-
+
label = manage(new Label(_("Click emphasis audiofile")));
label->set_name ("OptionsLabel");
click_table.attach (*label, 0, 1, 1, 2, FILL|EXPAND, FILL);
@@ -1082,7 +1123,7 @@ OptionEditor::setup_auditioner_editor ()
"for listening to specific regions outside the context\n"
"of the overall mix. It can be connected just like any\n"
"other mixer strip."));
-
+
audition_packer.pack_start (audition_label, false, false, 10);
audition_packer.pack_start (audition_hpacker, false, false);
}
@@ -1101,7 +1142,7 @@ OptionEditor::connect_audition_editor ()
}
bool
-OptionEditor::focus_out_event_handler (GdkEventFocus* ev, void (OptionEditor::*pmf)())
+OptionEditor::focus_out_event_handler (GdkEventFocus* ev, void (OptionEditor::*pmf)())
{
(this->*pmf)();
return false;
@@ -1112,7 +1153,7 @@ static const struct {
guint modifier;
} modifiers[] = {
-#ifdef GTKOSX
+#ifdef GTKOSX
/* Command = Meta
Option/Alt = Mod1
@@ -1172,13 +1213,13 @@ OptionEditor::setup_keyboard_options ()
label = manage (new Label (_("Edit using")));
label->set_name ("OptionsLabel");
label->set_alignment (1.0, 0.5);
-
+
keyboard_mouse_table.attach (*label, 0, 1, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
keyboard_mouse_table.attach (edit_modifier_combo, 1, 2, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
label = manage (new Label (_("+ button")));
label->set_name ("OptionsLabel");
-
+
keyboard_mouse_table.attach (*label, 3, 4, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
keyboard_mouse_table.attach (edit_button_spin, 4, 5, 0, 1, Gtk::FILL|Gtk::EXPAND, FILL);
@@ -1199,7 +1240,7 @@ OptionEditor::setup_keyboard_options ()
label = manage (new Label (_("Delete using")));
label->set_name ("OptionsLabel");
label->set_alignment (1.0, 0.5);
-
+
keyboard_mouse_table.attach (*label, 0, 1, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
keyboard_mouse_table.attach (delete_modifier_combo, 1, 2, 1, 2, Gtk::FILL|Gtk::EXPAND, FILL);
@@ -1215,7 +1256,7 @@ OptionEditor::setup_keyboard_options ()
set_popdown_strings (snap_modifier_combo, dumb);
snap_modifier_combo.signal_changed().connect (mem_fun(*this, &OptionEditor::snap_modifier_chosen));
-
+
for (int x = 0; modifiers[x].name; ++x) {
if (modifiers[x].modifier == (guint) Keyboard::snap_modifier ()) {
snap_modifier_combo.set_active_text (_(modifiers[x].name));
@@ -1226,16 +1267,16 @@ OptionEditor::setup_keyboard_options ()
label = manage (new Label (_("Ignore snap using")));
label->set_name ("OptionsLabel");
label->set_alignment (1.0, 0.5);
-
+
keyboard_mouse_table.attach (*label, 0, 1, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
keyboard_mouse_table.attach (snap_modifier_combo, 1, 2, 2, 3, Gtk::FILL|Gtk::EXPAND, FILL);
vector<string> strs;
-
+
for (std::map<std::string,std::string>::iterator bf = Keyboard::binding_files.begin(); bf != Keyboard::binding_files.end(); ++bf) {
strs.push_back (bf->first);
}
-
+
set_popdown_strings (keyboard_layout_selector, strs);
keyboard_layout_selector.set_active_text (Keyboard::current_binding_name());
keyboard_layout_selector.signal_changed().connect (mem_fun (*this, &OptionEditor::bindings_changed));
@@ -1252,7 +1293,7 @@ void
OptionEditor::bindings_changed ()
{
string txt;
-
+
txt = keyboard_layout_selector.get_active_text();
for (std::map<string,string>::iterator i = Keyboard::binding_files.begin(); i != Keyboard::binding_files.end(); ++i) {
@@ -1268,7 +1309,7 @@ void
OptionEditor::edit_modifier_chosen ()
{
string txt;
-
+
txt = edit_modifier_combo.get_active_text();
for (int i = 0; modifiers[i].name; ++i) {
@@ -1283,7 +1324,7 @@ void
OptionEditor::delete_modifier_chosen ()
{
string txt;
-
+
txt = delete_modifier_combo.get_active_text();
for (int i = 0; modifiers[i].name; ++i) {
@@ -1298,7 +1339,7 @@ void
OptionEditor::snap_modifier_chosen ()
{
string txt;
-
+
txt = snap_modifier_combo.get_active_text();
for (int i = 0; modifiers[i].name; ++i) {
@@ -1356,12 +1397,12 @@ OptionEditor::parameter_changed (const char* parameter_name)
ENSURE_GUI_THREAD (bind (mem_fun (*this, &OptionEditor::parameter_changed), parameter_name));
#define PARAM_IS(x) (!strcmp (parameter_name, (x)))
-
+
if (PARAM_IS ("timecode-source-is-synced")) {
synced_timecode_button.set_active (Config->get_timecode_source_is_synced());
} else if (PARAM_IS ("history-depth")) {
int32_t depth = Config->get_history_depth();
-
+
history_depth.set_value (depth);
history_depth_spinner.set_sensitive (depth != 0);
limit_history_button.set_active (depth != 0);
diff --git a/gtk2_ardour/option_editor.h b/gtk2_ardour/option_editor.h
index 45fe092eab..c6f13049b0 100644
--- a/gtk2_ardour/option_editor.h
+++ b/gtk2_ardour/option_editor.h
@@ -2,7 +2,7 @@
#define __gtk_ardour_option_editor_h__
/*
- Copyright (C) 2001 Paul Davis
+ Copyright (C) 2001 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
@@ -128,6 +128,7 @@ class OptionEditor : public ArdourDialog
Gtk::RadioButton::Group mtc_button_group;
Gtk::RadioButton::Group mmc_button_group;
Gtk::RadioButton::Group midi_button_group;
+ Gtk::RadioButton::Group midi_clock_button_group;
Gtk::Table midi_port_table;
std::vector<Gtk::Widget*> midi_port_table_widgets;
@@ -144,10 +145,11 @@ class OptionEditor : public ArdourDialog
void port_online_toggled (MIDI::Port*,Gtk::ToggleButton*);
void port_trace_in_toggled (MIDI::Port*,Gtk::ToggleButton*);
void port_trace_out_toggled (MIDI::Port*,Gtk::ToggleButton*);
-
+
void mmc_port_chosen (MIDI::Port*,Gtk::RadioButton*, Gtk::Button*);
void mtc_port_chosen (MIDI::Port*,Gtk::RadioButton*, Gtk::Button*);
void midi_port_chosen (MIDI::Port*,Gtk::RadioButton*, Gtk::Button*);
+ void midi_clock_port_chosen (MIDI::Port*,Gtk::RadioButton*, Gtk::Button*);
bool port_removable (MIDI::Port*);
void mmc_receive_device_id_adjusted ();
@@ -160,7 +162,8 @@ class OptionEditor : public ArdourDialog
enum PortIndex {
MtcIndex = 0,
MmcIndex = 1,
- MidiIndex = 2
+ MidiIndex = 2,
+ MidiClockIndex = 3
};
std::map<MIDI::Port*,std::vector<Gtk::RadioButton*> > port_toggle_buttons;
@@ -185,7 +188,7 @@ class OptionEditor : public ArdourDialog
void click_browse_clicked ();
void click_emphasis_browse_clicked ();
-
+
void click_sound_changed ();
void click_emphasis_sound_changed ();