Add mono switch to mixer strips (mantis 1068)
[ardour.git] / gtk2_ardour / session_option_editor.cc
index 5defe27e9d3e1dfe9d5f26358f9bc444070539cf..29051fe09a7b61ed65e78f818879165425490ba3 100644 (file)
@@ -14,19 +14,19 @@ using namespace ARDOUR;
 class OptionsPortMatrix : public PortMatrix
 {
 public:
-       OptionsPortMatrix (ARDOUR::Session& session)
-               : PortMatrix (session, DataType::AUDIO)
+       OptionsPortMatrix (Gtk::Window* parent, ARDOUR::Session& session)
+               : PortMatrix (parent, session, DataType::AUDIO)
        {
                _port_group.reset (new PortGroup (""));
                _ports[OURS].add_group (_port_group);
-               
+
                setup_all_ports ();
        }
 
        void setup_ports (int dim)
        {
                cerr << _session.the_auditioner()->output()->n_ports() << "\n";
-               
+
                if (dim == OURS) {
                        _port_group->clear ();
                        _port_group->add_bundle (_session.click_io()->bundle());
@@ -40,7 +40,7 @@ public:
        {
                Bundle::PortList const & our_ports = c[OURS].bundle->channel_ports (c[OURS].channel);
                Bundle::PortList const & other_ports = c[OTHER].bundle->channel_ports (c[OTHER].channel);
-               
+
                if (c[OURS].bundle == _session.click_io()->bundle()) {
 
                        for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) {
@@ -48,7 +48,7 @@ public:
 
                                        Port* f = _session.engine().get_port_by_name (*i);
                                        assert (f);
-                                       
+
                                        if (s) {
                                                _session.click_io()->connect (f, *j, 0);
                                        } else {
@@ -63,14 +63,14 @@ public:
        {
                Bundle::PortList const & our_ports = c[OURS].bundle->channel_ports (c[OURS].channel);
                Bundle::PortList const & other_ports = c[OTHER].bundle->channel_ports (c[OTHER].channel);
-               
+
                if (c[OURS].bundle == _session.click_io()->bundle()) {
-                       
+
                        for (ARDOUR::Bundle::PortList::const_iterator i = our_ports.begin(); i != our_ports.end(); ++i) {
                                for (ARDOUR::Bundle::PortList::const_iterator j = other_ports.begin(); j != other_ports.end(); ++j) {
                                        Port* f = _session.engine().get_port_by_name (*i);
                                        assert (f);
-                                       
+
                                        if (f->connected_to (*j)) {
                                                return PortMatrixNode::ASSOCIATED;
                                        } else {
@@ -88,24 +88,20 @@ public:
                return PortMatrixNode::NOT_ASSOCIATED;
        }
 
-       bool list_is_global (int dim) const
-       {
+       bool list_is_global (int dim) const {
                return (dim == OTHER);
        }
 
-       void add_channel (boost::shared_ptr<ARDOUR::Bundle>) {}
-       bool can_remove_channels (int) const {
+       bool can_remove_channels (boost::shared_ptr<Bundle>) const {
                return false;
        }
+
        void remove_channel (ARDOUR::BundleChannel) {}
-       bool can_rename_channels (int) const {
-               return false;
-       }
 
        std::string disassociation_verb () const {
                return _("Disassociate");
        }
-       
+
 private:
        /* see PortMatrix: signal flow from 0 to 1 (out to in) */
        enum {
@@ -121,13 +117,13 @@ private:
 class ConnectionOptions : public OptionEditorBox
 {
 public:
-       ConnectionOptions (ARDOUR::Session* s)
-               : _port_matrix (*s)
+       ConnectionOptions (Gtk::Window* parent, ARDOUR::Session* s)
+               : _port_matrix (parent, *s)
        {
                _box->pack_start (_port_matrix);
        }
 
-       void parameter_changed (string const & p)
+       void parameter_changed (string const &)
        {
 
        }
@@ -245,7 +241,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
        smf->add (smpte_60, _("60"));
 
        add_option (_("Sync"), smf);
-               
+
        add_option (_("Sync"), new BoolOption (
                            "timecode-source-is-synced",
                            _("Timecode source is synced"),
@@ -269,9 +265,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
        vpu->add (-4.1667 + 0.1, _("-4.1667 + 0.1%"));
        vpu->add (-4.1667, _("-4.1667"));
        vpu->add (-4.1667 - 0.1, _("-4.1667 - 0.1%"));
-               
+
        add_option (_("Sync"), vpu);
-       
+
        /* MISC */
 
        add_option (_("Misc"), new OptionEditorHeading (_("Audio file format")));
@@ -307,7 +303,7 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
 
        ComboOption<LayerModel>* lm = new ComboOption<LayerModel> (
                "layer-model",
-               _("Layering model"),
+               _("Layering model in overlaid mode"),
                mem_fun (*_session_config, &SessionConfiguration::get_layer_model),
                mem_fun (*_session_config, &SessionConfiguration::set_layer_model)
                );
@@ -317,9 +313,9 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
        lm->add (AddHigher, _("most recently added is higher"));
 
        add_option (_("Misc"), lm);
-       
+
        add_option (_("Misc"), new OptionEditorHeading (_("Broadcast WAVE metadata")));
-       
+
        add_option (_("Misc"), new EntryOption (
                            "bwf-country-code",
                            _("Country code"),
@@ -334,5 +330,5 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
                            mem_fun (*_session_config, &SessionConfiguration::set_bwf_organization_code)
                            ));
 
-       add_option (_("Connections"), new ConnectionOptions (s));
+       add_option (_("Connections"), new ConnectionOptions (this, s));
 }