diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-15 23:06:48 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-15 23:06:48 +0200 |
commit | 454b26668bb7ad50ee6bb375eceddac0de9124d9 (patch) | |
tree | 82c2de175b7504dd5f3e14b318a511e529089fd0 | |
parent | 8df3513f9a5837a83c4cf344b43cd4a45e0db74b (diff) |
gtkui: multiline metadata fix
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 16 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.c | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index e1ad1d2d..ec70c227 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -171,6 +171,14 @@ void main_draw_group_title (DdbListview *listview, cairo_t *drawable, DdbListvie if (group_by_str && group_by_str[0]) { char str[1024]; deadbeef->pl_format_title ((DB_playItem_t *)it, -1, str, sizeof (str), -1, group_by_str); + char *lb = strchr (str, '\r'); + if (lb) { + *lb = 0; + } + lb = strchr (str, '\n'); + if (lb) { + *lb = 0; + } int theming = !gtkui_override_listview_colors (); if (theming) { GdkColor *clr = >k_widget_get_style(theme_treeview)->fg[GTK_STATE_NORMAL]; @@ -214,6 +222,14 @@ main_get_group (DdbListviewIter it, char *str, int size) { return -1; } deadbeef->pl_format_title ((DB_playItem_t *)it, -1, str, size, -1, group_by_str); + char *lb = strchr (str, '\r'); + if (lb) { + *lb = 0; + } + lb = strchr (str, '\n'); + if (lb) { + *lb = 0; + } return 0; } diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index 795bb9a3..f2cacd80 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -280,6 +280,14 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D else if (it) { char text[1024]; deadbeef->pl_format_title (it, -1, text, sizeof (text), cinf->id, cinf->format); + char *lb = strchr (text, '\r'); + if (lb) { + *lb = 0; + } + lb = strchr (text, '\n'); + if (lb) { + *lb = 0; + } GdkColor *color = NULL; if (theming) { if (deadbeef->pl_is_selected (it)) { |