Changeset 8909


Ignore:
Timestamp:
Aug 13, 2009, 2:23:47 PM (13 years ago)
Author:
charles
Message:

(trunk gtk) #2330: on older versions of GTK+, error messages are hard to read in the main window's torrent list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/torrent-cell-renderer.c

    r8900 r8909  
    503503    const gboolean active = st->activity != TR_STATUS_STOPPED;
    504504    const double percentDone = MAX( 0.0, st->percentDone );
     505    const gboolean sensitive = active || st->error;
    505506
    506507    icon = get_icon( tor, MINIMAL_ICON_SIZE, widget );
     
    556557    **/
    557558
    558     g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", active, NULL );
     559    g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", sensitive, NULL );
    559560    gtk_cell_renderer_render( p->icon_renderer, window, widget, &icon_area, &icon_area, &icon_area, flags );
    560     g_object_set( text_renderer, "text", status, "scale", SMALL_SCALE, "sensitive", active, "ellipsize", PANGO_ELLIPSIZE_END, NULL );
     561    g_object_set( text_renderer, "text", status, "scale", SMALL_SCALE, "sensitive", sensitive, "ellipsize", PANGO_ELLIPSIZE_END, NULL );
    561562    gtk_cell_renderer_render( text_renderer, window, widget, &stat_area, &stat_area, &stat_area, flags );
    562563    g_object_set( text_renderer, "text", name, "scale", 1.0, NULL );
    563564    gtk_cell_renderer_render( text_renderer, window, widget, &name_area, &name_area, &name_area, flags );
    564     g_object_set( p->progress_renderer, "value", (int)(percentDone*100.0), "text", "", "sensitive", active, NULL );
     565    g_object_set( p->progress_renderer, "value", (int)(percentDone*100.0), "text", "", "sensitive", sensitive, NULL );
    565566    gtk_cell_renderer_render( p->progress_renderer, window, widget, &prog_area, &prog_area, &prog_area, flags );
    566567
     
    598599    const gboolean active = st->activity != TR_STATUS_STOPPED;
    599600    const double percentDone = MAX( 0.0, st->percentDone );
     601    const gboolean sensitive = active || st->error;
    600602
    601603    icon = get_icon( tor, FULL_ICON_SIZE, widget );
     
    662664    **/
    663665
    664     g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", active, NULL );
     666    g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", sensitive, NULL );
    665667    gtk_cell_renderer_render( p->icon_renderer, window, widget, &icon_area, &icon_area, &icon_area, flags );
    666     g_object_set( text_renderer, "text", name, "scale", 1.0, "sensitive", active, "ellipsize", PANGO_ELLIPSIZE_END, "weight", PANGO_WEIGHT_BOLD, NULL );
     668    g_object_set( text_renderer, "text", name, "scale", 1.0, "sensitive", sensitive, "ellipsize", PANGO_ELLIPSIZE_END, "weight", PANGO_WEIGHT_BOLD, NULL );
    667669    gtk_cell_renderer_render( text_renderer, window, widget, &name_area, &name_area, &name_area, flags );
    668670    g_object_set( text_renderer, "text", progress, "scale", SMALL_SCALE, "weight", PANGO_WEIGHT_NORMAL, NULL );
    669671    gtk_cell_renderer_render( text_renderer, window, widget, &prog_area, &prog_area, &prog_area, flags );
    670     g_object_set( p->progress_renderer, "value", (int)(percentDone*100.0), "text", "", "sensitive", active, NULL );
     672    g_object_set( p->progress_renderer, "value", (int)(percentDone*100.0), "text", "", "sensitive", sensitive, NULL );
    671673    gtk_cell_renderer_render( p->progress_renderer, window, widget, &prct_area, &prct_area, &prct_area, flags );
    672674    g_object_set( text_renderer, "text", status, NULL );
Note: See TracChangeset for help on using the changeset viewer.