From 7d64d08fab70510565ab687bd8f8763e24bce087 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 22 Jun 2009 22:31:43 +0000 Subject: [PATCH] Bit of a hack: limit mix group names to 5 chars within the strip to stop them getting too wide. git-svn-id: svn://localhost/ardour2/branches/3.0@5250 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/mixer_strip.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc index 07e17159dc..6ba9c655d8 100644 --- a/gtk2_ardour/mixer_strip.cc +++ b/gtk2_ardour/mixer_strip.cc @@ -1125,9 +1125,14 @@ MixerStrip::route_group_changed (void *ignored) ENSURE_GUI_THREAD(bind (mem_fun(*this, &MixerStrip::route_group_changed), ignored)); RouteGroup *rg = _route->route_group(); - + if (rg) { - group_label.set_text (rg->name()); + /* XXX: this needs a better algorithm */ + string truncated = rg->name (); + if (truncated.length () > 5) { + truncated = truncated.substr (0, 5); + } + group_label.set_text (truncated); } else { switch (_width) { case Wide: