ocarina: Escape tooltip text
GTK was printing a warning whenever a non-escaped string was hovered over. The tooltip was also empty. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
cefbf36415
commit
234626ea81
|
@ -1,6 +1,14 @@
|
|||
|
||||
#include <ocarina/songlist.h>
|
||||
|
||||
string formatted(string str)
|
||||
{
|
||||
char *escaped = g_markup_escape_text(str.c_str(), -1);
|
||||
string ret = escaped;
|
||||
g_free(escaped);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void SongList::freeze()
|
||||
{
|
||||
gtk_widget_freeze_child_notify(treeview);
|
||||
|
@ -30,7 +38,7 @@ void SongList::insert(libsaria::Track *track)
|
|||
4, track->get_artist().c_str(),
|
||||
5, track->get_album().c_str(),
|
||||
6, track->get_year(),
|
||||
7, track->get_filepath().c_str(),
|
||||
7, formatted(track->get_filepath()).c_str(),
|
||||
-1);
|
||||
ins_next++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue