summaryrefslogtreecommitdiff
path: root/gtk2_ardour/option_editor.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-11-17 16:14:44 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-11-17 16:14:44 +0000
commit5f37d769351d03acfa6e1704fb9f54fcf57c3c60 (patch)
treea113b60b3c020c03131b9a9ad82965ef374ca16b /gtk2_ardour/option_editor.cc
parent98d93c221a8bd45d90369ff1b52e3f43dad35233 (diff)
fixes for MIDI port setup; options editor now sets trace options correctly (still not saved); MTC now sent immediately after asking for it, not after first stop; add svn_revision.h to avoid compile errors
git-svn-id: svn://localhost/ardour2/trunk@1138 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/option_editor.cc')
-rw-r--r--gtk2_ardour/option_editor.cc41
1 files changed, 19 insertions, 22 deletions
diff --git a/gtk2_ardour/option_editor.cc b/gtk2_ardour/option_editor.cc
index 8f50cfc975..3e461a85d7 100644
--- a/gtk2_ardour/option_editor.cc
+++ b/gtk2_ardour/option_editor.cc
@@ -322,8 +322,6 @@ OptionEditor::destructo_xfade_adjustment_changed ()
Config->set_destructive_xfade_msecs ((uint32_t) floor (val));
- cerr << "set destructo fade to " << Config->get_destructive_xfade_msecs () << endl;
-
if (session) {
SndFileSource::setup_standard_crossfades (session->frame_rate());
}
@@ -423,19 +421,19 @@ OptionEditor::setup_midi_options ()
}
tb->set_active (!(*i).second->input()->offline());
- tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
+ tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_online_toggled), (*i).second, tb));
(*i).second->input()->OfflineStatusChanged.connect (bind (mem_fun(*this, &OptionEditor::map_port_online), (*i).second, tb));
table->attach (*tb, 1, 2, n+2, n+3, FILL|EXPAND, FILL);
tb = manage (new ToggleButton ());
tb->set_name ("OptionEditorToggleButton");
- tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
+ tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_in_toggled), (*i).second, tb));
tb->set_size_request (10, 10);
table->attach (*tb, 2, 3, n+2, n+3, FILL|EXPAND, FILL);
tb = manage (new ToggleButton ());
tb->set_name ("OptionEditorToggleButton");
- tb->signal_button_press_event().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
+ tb->signal_toggled().connect (bind (mem_fun(*this, &OptionEditor::port_trace_out_toggled), (*i).second, tb));
tb->set_size_request (10, 10);
table->attach (*tb, 3, 4, n+2, n+3, FILL|EXPAND, FILL);
@@ -547,15 +545,14 @@ OptionEditor::midi_port_chosen (MIDI::Port* port, Gtk::RadioButton* rb)
}
}
-gint
-OptionEditor::port_online_toggled (GdkEventButton* ev, MIDI::Port* port, ToggleButton* tb)
+void
+OptionEditor::port_online_toggled (MIDI::Port* port, ToggleButton* tb)
{
- bool wanted = tb->get_active(); /* it hasn't changed at this point */
-
+ bool wanted = tb->get_active();
+
if (wanted != port->input()->offline()) {
port->input()->set_offline (wanted);
}
- return stop_signal (*tb, "button_press_event");
}
void
@@ -570,24 +567,24 @@ OptionEditor::map_port_online (MIDI::Port* port, ToggleButton* tb)
}
}
-gint
-OptionEditor::port_trace_in_toggled (GdkEventButton* ev, MIDI::Port* port, ToggleButton* tb)
+void
+OptionEditor::port_trace_in_toggled (MIDI::Port* port, ToggleButton* tb)
{
- /* XXX not very good MVC style here */
+ bool trace = tb->get_active();
- port->input()->trace (!tb->get_active(), &cerr, string (port->name()) + string (" input: "));
- tb->set_active (!tb->get_active());
- return stop_signal (*tb, "button_press_event");
+ if (port->input()->tracing() != trace) {
+ port->output()->trace (trace, &cerr, string (port->name()) + string (" input: "));
+ }
}
-gint
-OptionEditor::port_trace_out_toggled (GdkEventButton* ev,MIDI::Port* port, ToggleButton* tb)
+void
+OptionEditor::port_trace_out_toggled (MIDI::Port* port, ToggleButton* tb)
{
- /* XXX not very good MVC style here */
+ bool trace = tb->get_active();
- port->output()->trace (!tb->get_active(), &cerr, string (port->name()) + string (" output: "));
- tb->set_active (!tb->get_active());
- return stop_signal (*tb, "button_press_event");
+ if (port->output()->tracing() != trace) {
+ port->output()->trace (trace, &cerr, string (port->name()) + string (" output: "));
+ }
}
void