diff --git a/gtk/tr_window.c b/gtk/tr_window.c index e8dfee03d..8a02f557d 100644 --- a/gtk/tr_window.c +++ b/gtk/tr_window.c @@ -79,6 +79,7 @@ formatname( GtkTreeViewColumn * col SHUTUP, GtkCellRenderer * rend, { TrTorrent * gtor; char * name, * mb, * str, * top, * bottom; + const char * fmt; guint64 size; int status, err, eta, tpeers, upeers, dpeers; @@ -112,9 +113,10 @@ formatname( GtkTreeViewColumn * col SHUTUP, GtkCellRenderer * rend, bottom = NULL; } - str = g_markup_printf_escaped( "%s (%s)\n%s\n%s", - name, mb, top, - ( NULL == bottom ? "" : bottom ) ); + fmt = err==TR_OK + ? "%s (%s)\n%s\n%s" + : "%s (%s)\n%s\n%s"; + str = g_markup_printf_escaped( fmt, name, mb, top, (bottom ? bottom : "") ); g_object_set( rend, "markup", str, NULL ); g_free( name ); g_free( mb );