mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Escape angled brackets in playlist names for tooltips.
git-svn-id: svn://localhost/ardour2/branches/3.0@12672 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1804efbd14
commit
d7551a8f08
3 changed files with 18 additions and 2 deletions
|
|
@ -1591,13 +1591,17 @@ RouteTimeAxisView::update_playlist_tip ()
|
||||||
take_name = take_name.substr (idx + group_string.length());
|
take_name = take_name.substr (idx + group_string.length());
|
||||||
|
|
||||||
/* set the playlist button tooltip to the take name */
|
/* set the playlist button tooltip to the take name */
|
||||||
ARDOUR_UI::instance()->set_tip (playlist_button,string_compose(_("Take: %1.%2"), rg->name(), take_name));
|
ARDOUR_UI::instance()->set_tip (
|
||||||
|
playlist_button,
|
||||||
|
string_compose(_("Take: %1.%2"), escape_angled_brackets (rg->name()), escape_angled_brackets (take_name))
|
||||||
|
);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set the playlist button tooltip to the playlist name */
|
/* set the playlist button tooltip to the playlist name */
|
||||||
ARDOUR_UI::instance()->set_tip (playlist_button, _("Playlist") + std::string(": ") + track()->playlist()->name());
|
ARDOUR_UI::instance()->set_tip (playlist_button, _("Playlist") + std::string(": ") + escape_angled_brackets (track()->playlist()->name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
#include <gtkmm/label.h>
|
#include <gtkmm/label.h>
|
||||||
#include <gtkmm/paned.h>
|
#include <gtkmm/paned.h>
|
||||||
#include <gtk/gtkpaned.h>
|
#include <gtk/gtkpaned.h>
|
||||||
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
#include "pbd/file_utils.h"
|
#include "pbd/file_utils.h"
|
||||||
|
|
||||||
|
|
@ -680,6 +681,16 @@ escape_underscores (string const & s)
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Replace < and > with < and > respectively to make < > display correctly in markup strings */
|
||||||
|
string
|
||||||
|
escape_angled_brackets (string const & s)
|
||||||
|
{
|
||||||
|
string o = s;
|
||||||
|
boost::replace_all (o, "<", "<");
|
||||||
|
boost::replace_all (o, ">", ">");
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
Gdk::Color
|
Gdk::Color
|
||||||
unique_random_color (list<Gdk::Color>& used_colors)
|
unique_random_color (list<Gdk::Color>& used_colors)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ void set_pango_fontsize ();
|
||||||
void resize_window_to_proportion_of_monitor (Gtk::Window*, int, int);
|
void resize_window_to_proportion_of_monitor (Gtk::Window*, int, int);
|
||||||
|
|
||||||
std::string escape_underscores (std::string const &);
|
std::string escape_underscores (std::string const &);
|
||||||
|
std::string escape_angled_brackets (std::string const &);
|
||||||
|
|
||||||
Gdk::Color unique_random_color (std::list<Gdk::Color> &);
|
Gdk::Color unique_random_color (std::list<Gdk::Color> &);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue