From b895b677bf29cca95fe0626616d7495113386b04 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 20 Jun 2009 13:41:55 +0000 Subject: Optional tabs down the LHS of the editor window to indicate edit group membership. git-svn-id: svn://localhost/ardour2/branches/3.0@5220 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/port_matrix_component.cc | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'gtk2_ardour/port_matrix_component.cc') diff --git a/gtk2_ardour/port_matrix_component.cc b/gtk2_ardour/port_matrix_component.cc index a68e21730d..3086e11e90 100644 --- a/gtk2_ardour/port_matrix_component.cc +++ b/gtk2_ardour/port_matrix_component.cc @@ -110,34 +110,3 @@ PortMatrixComponent::dimensions () return std::make_pair (_width, _height); } -std::pair -PortMatrixComponent::display_port_name (cairo_t* cr, std::string const &n, double avail) const -{ - /* XXX hopefully there exists a more efficient way of doing this */ - - Glib::ustring name = Glib::ustring (n).uppercase (); - bool abbreviated = false; - uint32_t width = 0; - - while (1) { - if (name.length() <= 2) { - break; - } - - cairo_text_extents_t ext; - cairo_text_extents (cr, name.c_str(), &ext); - if (ext.width < avail) { - width = ext.width; - break; - } - - if (abbreviated) { - name = name.substr (0, name.length() - 2) + "."; - } else { - name = name.substr (0, name.length() - 1) + "."; - abbreviated = true; - } - } - - return std::make_pair (name, width); -} -- cgit v1.2.3