remove method and inline its contents. Nothing gained by wrapping this up
[ardour.git] / gtk2_ardour / route_params_ui.cc
index 0b2477dd1aee2d85e8415087145bbcc916ac7401..1e19f1c7df0933068b7134645f4cd24a7cf3f5ee 100644 (file)
@@ -70,9 +70,9 @@ RouteParams_UI::RouteParams_UI ()
 
        using namespace Notebook_Helpers;
 
-       input_sample.set_shadow_type(Gtk::SHADOW_NONE);
-       output_sample.set_shadow_type(Gtk::SHADOW_NONE);
-       latency_sample.set_shadow_type (Gtk::SHADOW_NONE);
+       input_frame.set_shadow_type(Gtk::SHADOW_NONE);
+       output_frame.set_shadow_type(Gtk::SHADOW_NONE);
+       latency_frame.set_shadow_type (Gtk::SHADOW_NONE);
 
        notebook.set_show_tabs (true);
        notebook.set_show_border (true);
@@ -96,16 +96,16 @@ RouteParams_UI::RouteParams_UI ()
        route_select_scroller.add(route_display);
        route_select_scroller.set_policy(Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
 
-       route_select_sample.set_name("RouteSelectBaseFrame");
-       route_select_sample.set_shadow_type (Gtk::SHADOW_IN);
-       route_select_sample.add(route_select_scroller);
+       route_select_frame.set_name("RouteSelectBaseFrame");
+       route_select_frame.set_shadow_type (Gtk::SHADOW_IN);
+       route_select_frame.add(route_select_scroller);
 
-       list_vpacker.pack_start (route_select_sample, true, true);
+       list_vpacker.pack_start (route_select_frame, true, true);
 
-       notebook.pages().push_back (TabElem (input_sample, _("Inputs")));
-       notebook.pages().push_back (TabElem (output_sample, _("Outputs")));
+       notebook.pages().push_back (TabElem (input_frame, _("Inputs")));
+       notebook.pages().push_back (TabElem (output_frame, _("Outputs")));
        notebook.pages().push_back (TabElem (redir_hpane, _("Plugins, Inserts & Sends")));
-       notebook.pages().push_back (TabElem (latency_sample, _("Latency")));
+       notebook.pages().push_back (TabElem (latency_frame, _("Latency")));
 
        notebook.set_name ("InspectorNotebook");
 
@@ -117,9 +117,8 @@ RouteParams_UI::RouteParams_UI ()
        delay_label.set_alignment (0, 0.5);
 
        // changeable area
-       route_param_sample.set_name("RouteParamsBaseFrame");
-       route_param_sample.set_shadow_type (Gtk::SHADOW_IN);
-
+       route_param_frame.set_name("RouteParamsBaseFrame");
+       route_param_frame.set_shadow_type (Gtk::SHADOW_IN);
 
        route_hpacker.pack_start (notebook, true, true);
 
@@ -270,16 +269,16 @@ RouteParams_UI::refresh_latency ()
                latency_widget->refresh();
 
                char buf[128];
-               snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
+               snprintf (buf, sizeof (buf), _("Latency: %" PRId64 " samples"), _route->signal_latency ());
                delay_label.set_text (buf);
        }
 }
 
 void
-RouteParams_UI::cleanup_latency_sample ()
+RouteParams_UI::cleanup_latency_frame ()
 {
        if (latency_widget) {
-               latency_sample.remove ();
+               latency_frame.remove ();
                latency_packer.remove (*latency_widget);
                latency_packer.remove (latency_button_box);
                latency_packer.remove (delay_label);
@@ -293,12 +292,12 @@ RouteParams_UI::cleanup_latency_sample ()
 }
 
 void
-RouteParams_UI::setup_latency_sample ()
+RouteParams_UI::setup_latency_frame ()
 {
        latency_widget = new LatencyGUI (*(_route->output()), _session->sample_rate(), AudioEngine::instance()->samples_per_cycle());
 
        char buf[128];
-       snprintf (buf, sizeof (buf), _("Playback delay: %" PRId64 " samples"), _route->initial_delay());
+       snprintf (buf, sizeof (buf), _("Latency: %" PRId64 " samples"), _route->signal_latency());
        delay_label.set_text (buf);
 
        latency_packer.pack_start (*latency_widget, false, false);
@@ -306,11 +305,10 @@ RouteParams_UI::setup_latency_sample ()
        latency_packer.pack_start (delay_label);
 
        latency_click_connection = latency_apply_button.signal_clicked().connect (sigc::mem_fun (*latency_widget, &LatencyGUI::finish));
-       _route->signal_latency_changed.connect (latency_connections, invalidator (*this), boost::bind (&RouteParams_UI::refresh_latency, this), gui_context());
-       _route->initial_delay_changed.connect (latency_connections, invalidator (*this), boost::bind (&RouteParams_UI::refresh_latency, this), gui_context());
+       _route->signal_latency_updated.connect (latency_connections, invalidator (*this), boost::bind (&RouteParams_UI::refresh_latency, this), gui_context());
 
-       latency_sample.add (latency_packer);
-       latency_sample.show_all ();
+       latency_frame.add (latency_packer);
+       latency_frame.show_all ();
 }
 
 void
@@ -321,14 +319,14 @@ RouteParams_UI::setup_io_samples()
        // input
        _input_iosel = new IOSelector (this, _session, _route->input());
        _input_iosel->setup ();
-       input_sample.add (*_input_iosel);
-       input_sample.show_all();
+       input_frame.add (*_input_iosel);
+       input_frame.show_all();
 
        // output
        _output_iosel = new IOSelector (this, _session, _route->output());
        _output_iosel->setup ();
-       output_sample.add (*_output_iosel);
-       output_sample.show_all();
+       output_frame.add (*_output_iosel);
+       output_frame.show_all();
 }
 
 void
@@ -336,7 +334,7 @@ RouteParams_UI::cleanup_io_samples()
 {
        if (_input_iosel) {
                _input_iosel->Finished (IOSelector::Cancelled);
-               input_sample.remove();
+               input_frame.remove();
                delete _input_iosel;
                _input_iosel = 0;
        }
@@ -344,7 +342,7 @@ RouteParams_UI::cleanup_io_samples()
        if (_output_iosel) {
                _output_iosel->Finished (IOSelector::Cancelled);
 
-               output_sample.remove();
+               output_frame.remove();
                delete _output_iosel;
                _output_iosel = 0;
        }
@@ -432,7 +430,7 @@ RouteParams_UI::session_going_away ()
        cleanup_io_samples();
        cleanup_view();
        cleanup_processor_boxes();
-       cleanup_latency_sample ();
+       cleanup_latency_frame ();
 
        _route.reset ((Route*) 0);
        _processor.reset ((Processor*) 0);
@@ -460,7 +458,7 @@ RouteParams_UI::route_selected()
                        cleanup_processor_boxes();
                        cleanup_view();
                        cleanup_io_samples();
-                       cleanup_latency_sample ();
+                       cleanup_latency_frame ();
                }
 
                // update the other panes with the correct info
@@ -469,7 +467,7 @@ RouteParams_UI::route_selected()
 
                setup_io_samples();
                setup_processor_boxes();
-               setup_latency_sample ();
+               setup_latency_frame ();
 
                route->processors_changed.connect (_route_processors_connection, invalidator (*this), boost::bind (&RouteParams_UI::processors_changed, this, _1), gui_context());
 
@@ -486,7 +484,7 @@ RouteParams_UI::route_selected()
                        cleanup_io_samples();
                        cleanup_view();
                        cleanup_processor_boxes();
-                       cleanup_latency_sample ();
+                       cleanup_latency_frame ();
 
                        _route.reset ((Route*) 0);
                        _processor.reset ((Processor*) 0);