summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/mainplaylist.c16
-rw-r--r--plugins/gtkui/plcommon.c8
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 = &gtk_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)) {