summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-01-15 00:52:22 +0000
committerCarl Hetherington <carl@carlh.net>2010-01-15 00:52:22 +0000
commit43e8e880dc25a52b6a929b9c5eebfbe348c43e95 (patch)
treec14a1bd69d98091963b9ff0692a5e26d70bc166a /gtk2_ardour/port_matrix.cc
parentbbb65d07d33160366533d9f2390f3f8d56fcb8e1 (diff)
Escape underscores in port matrix menus correctly so that track names etc. with underscores get displayed properly.
git-svn-id: svn://localhost/ardour2/branches/3.0@6491 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 247d750534..209c4760f1 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -35,6 +35,7 @@
#include "port_matrix_component.h"
#include "i18n.h"
#include "gui_thread.h"
+#include "utils.h"
using namespace std;
using namespace Gtk;
@@ -393,7 +394,10 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
if (can_rename_channels (bc[dim].bundle)) {
- snprintf (buf, sizeof (buf), _("Rename '%s'..."), bc[dim].bundle->channel_name (bc[dim].channel).c_str());
+ snprintf (
+ buf, sizeof (buf), _("Rename '%s'..."),
+ escape_underscores (bc[dim].bundle->channel_name (bc[dim].channel)).c_str()
+ );
sub.push_back (
MenuElem (
buf,
@@ -445,7 +449,7 @@ PortMatrix::popup_menu (BundleChannel column, BundleChannel row, uint32_t t)
}
}
- items.push_back (MenuElem (bc[dim].bundle->name().c_str(), *m));
+ items.push_back (MenuElem (escape_underscores (bc[dim].bundle->name()).c_str(), *m));
need_separator = true;
}
@@ -807,7 +811,7 @@ PortMatrix::add_remove_option (Menu_Helpers::MenuList& m, boost::weak_ptr<Bundle
}
char buf [64];
- snprintf (buf, sizeof (buf), _("Remove '%s'"), b->channel_name (c).c_str());
+ snprintf (buf, sizeof (buf), _("Remove '%s'"), escape_underscores (b->channel_name (c)).c_str());
m.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::remove_channel_proxy), w, c)));
}
@@ -822,6 +826,6 @@ PortMatrix::add_disassociate_option (Menu_Helpers::MenuList& m, boost::weak_ptr<
}
char buf [64];
- snprintf (buf, sizeof (buf), _("%s all from '%s'"), disassociation_verb().c_str(), b->channel_name (c).c_str());
+ snprintf (buf, sizeof (buf), _("%s all from '%s'"), disassociation_verb().c_str(), escape_underscores (b->channel_name (c)).c_str());
m.push_back (MenuElem (buf, sigc::bind (sigc::mem_fun (*this, &PortMatrix::disassociate_all_on_channel), w, c, d)));
}