Changeset 2856


Ignore:
Timestamp:
Aug 18, 2007, 7:22:31 PM (15 years ago)
Author:
charles
Message:

highlight error torrents in red in the main window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr_window.c

    r2400 r2856  
    8080    TrTorrent * gtor;
    8181    char  * name, * mb, * str, * top, * bottom;
     82    const char * fmt;
    8283    guint64 size;
    8384    int     status, err, eta, tpeers, upeers, dpeers;
     
    113114    }
    114115
    115     str = g_markup_printf_escaped( "<b>%s (%s)</b>\n<small>%s\n%s</small>",
    116                                    name, mb, top,
    117                                    ( NULL == bottom ? "" : bottom ) );
     116    fmt = err==TR_OK
     117        ? "<b>%s (%s)</b>\n<small>%s\n%s</small>"
     118        : "<span color='red'><b>%s (%s)</b>\n<small>%s\n%s</small></span>";
     119    str = g_markup_printf_escaped( fmt, name, mb, top, (bottom ? bottom : "") );
    118120    g_object_set( rend, "markup", str, NULL );
    119121    g_free( name );
Note: See TracChangeset for help on using the changeset viewer.