update Chinese translation ardour/gtk2_ardour/po/zh.po base on Ardour build 4.7-372...
[ardour.git] / gtk2_ardour / port_matrix.cc
index 40cc80a35014c0fc544b5b66eeb29d7ade40358a..34e0f68c7ed857e5bbcce15fb4a7b87bddc301de 100644 (file)
@@ -32,6 +32,7 @@
 #include "ardour/session.h"
 #include "ardour/route.h"
 #include "ardour/audioengine.h"
+#include "gtkmm2ext/utils.h"
 #include "port_matrix.h"
 #include "port_matrix_body.h"
 #include "port_matrix_component.h"
@@ -450,7 +451,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
                                                sub.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::add_channel_proxy), w, *i)));
                                        }
                                }
-                               
+
                                /* Now add other ones */
                                for (DataType::iterator i = DataType::begin(); i != DataType::end(); ++i) {
                                        if (!should_show (*i)) {
@@ -497,12 +498,12 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
                                /* we're looking just at bundles, or our bundle has only one channel, so just offer
                                   to disassociate all on the bundle.
                                */
-                               
+
                                snprintf (buf, sizeof (buf), _("%s all"), disassociation_verb().c_str());
                                sub.push_back (
                                        MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_bundle), w, dim))
                                        );
-                                       
+
                        } else if (c != 0) {
 
                                if (bc[dim].channel != -1) {
@@ -543,7 +544,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
 
        items.push_back (MenuElem (_("Flip"), sigc::mem_fun (*this, &PortMatrix::flip)));
        items.back().set_sensitive (can_flip ());
-       
+
        _menu->popup (1, t);
 }
 
@@ -634,7 +635,7 @@ PortMatrix::setup_global_ports_proxy ()
        /* Avoid a deadlock by calling this in an idle handler: see IOSelector::io_changed_proxy
           for a discussion.
        */
-               
+
        Glib::signal_idle().connect_once (sigc::mem_fun (*this, &PortMatrix::setup_global_ports));
 }
 
@@ -935,7 +936,7 @@ PortMatrix::visible_ports (int d) const
           the TOP_TO_RIGHT arrangement we reverse the order of the vertical
           tabs in setup_notebooks ().
        */
-          
+
        int n = 0;
        if (d == _row_index) {
                if (_arrangement == LEFT_TO_BOTTOM) {
@@ -1007,11 +1008,11 @@ PortMatrix::update_tab_highlighting ()
        if (!_session) {
                return;
        }
-       
+
        for (int i = 0; i < 2; ++i) {
 
                Gtk::Notebook* notebook = row_index() == i ? &_vnotebook : &_hnotebook;
-               
+
                PortGroupList const * gl = ports (i);
                int p = 0;
                for (PortGroupList::List::const_iterator j = gl->begin(); j != gl->end(); ++j) {
@@ -1041,7 +1042,7 @@ PortMatrix::update_tab_highlighting ()
                                label->set_text ((*j)->name);
                        } else if (c.length() && c[0] != '<' && has_connection) {
                                /* this label is not marked up with <b> but should be */
-                               label->set_markup (string_compose ("<b>%1</b>", Glib::Markup::escape_text ((*j)->name)));
+                               label->set_markup (string_compose ("<b>%1</b>", Gtkmm2ext::markup_escape_text ((*j)->name)));
                        }
 
                        ++p;
@@ -1166,7 +1167,7 @@ pair<int, int>
 PortMatrix::check_flip () const
 {
        /* Look for the row's port group name in the columns */
-       
+
        int new_column = 0;
        boost::shared_ptr<const PortGroup> r = visible_ports (_row_index);
        PortGroupList::List::const_iterator i = _ports[_column_index].begin();
@@ -1180,7 +1181,7 @@ PortMatrix::check_flip () const
        }
 
        /* Look for the column's port group name in the rows */
-       
+
        int new_row = 0;
        boost::shared_ptr<const PortGroup> c = visible_ports (_column_index);
        i = _ports[_row_index].begin();