Ticket #2042: patch-to-remove-icons-from-torrent-list.diff

File patch-to-remove-icons-from-torrent-list.diff, 3.9 KB (added by charles, 13 years ago)

patch to remove icons from the main window's torrent list

  • torrent-cell-renderer.c

     
    466466                GtkCellRendererState    flags )
    467467{
    468468    int w, h;
    469     GdkRectangle icon_area;
    470469    GdkRectangle name_area;
    471470    GdkRectangle stat_area;
    472471    GdkRectangle prog_area;
     
    489488    /* get the cell dimensions */
    490489    g_object_set( p->icon_renderer, "pixbuf", icon, NULL );
    491490    gtk_cell_renderer_get_size( p->icon_renderer, widget, NULL, NULL, NULL, &w, &h );
    492     icon_area.width = w;
    493     icon_area.height = h;
    494491    text_renderer = get_text_renderer( st, cell );
    495492    g_object_set( text_renderer, "text", name, "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL );
    496493    gtk_cell_renderer_get_size( text_renderer, widget, NULL, NULL, NULL, &w, &h );
     
    511508    fill_area.width -= cell->parent.xpad * 2;
    512509    fill_area.height -= cell->parent.ypad * 2;
    513510
    514     /* icon */
    515     icon_area.x = fill_area.x;
    516     icon_area.y = fill_area.y + ( fill_area.height - icon_area.height ) / 2;
    517 
    518511    /* short status (right justified) */
    519512    stat_area.x = fill_area.x + fill_area.width - stat_area.width;
    520513    stat_area.y = fill_area.y + ( name_area.height - stat_area.height ) / 2;
    521514
    522515    /* name */
    523     name_area.x = icon_area.x + icon_area.width + GUI_PAD;
     516    name_area.x = fill_area.x;
    524517    name_area.y = fill_area.y;
    525518    name_area.width = stat_area.x - GUI_PAD - name_area.x;
    526519
     
    535528    **/
    536529   
    537530    g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", active, NULL );
    538     gtk_cell_renderer_render( p->icon_renderer, window, widget, &icon_area, &icon_area, &icon_area, flags );
    539531    g_object_set( text_renderer, "text", status, "scale", SMALL_SCALE, "sensitive", active, "ellipsize", PANGO_ELLIPSIZE_END, NULL );
    540532    gtk_cell_renderer_render( text_renderer, window, widget, &stat_area, &stat_area, &stat_area, flags );
    541533    g_object_set( text_renderer, "text", name, "scale", 1.0, NULL );
     
    559551{
    560552    int w, h;
    561553    GdkRectangle fill_area;
    562     GdkRectangle icon_area;
    563554    GdkRectangle name_area;
    564555    GdkRectangle stat_area;
    565556    GdkRectangle prog_area;
     
    585576    /* get the idealized cell dimensions */
    586577    g_object_set( p->icon_renderer, "pixbuf", icon, NULL );
    587578    gtk_cell_renderer_get_size( p->icon_renderer, widget, NULL, NULL, NULL, &w, &h );
    588     icon_area.width = w;
    589     icon_area.height = h;
    590579    text_renderer = get_text_renderer( st, cell );
    591580    g_object_set( text_renderer, "text", name, "weight", PANGO_WEIGHT_BOLD, "ellipsize", PANGO_ELLIPSIZE_NONE, "scale", 1.0, NULL );
    592581    gtk_cell_renderer_get_size( text_renderer, widget, NULL, NULL, NULL, &w, &h );
     
    611600    fill_area.width -= cell->parent.xpad * 2;
    612601    fill_area.height -= cell->parent.ypad * 2;
    613602
    614     /* icon */
    615     icon_area.x = fill_area.x;
    616     icon_area.y = fill_area.y + ( fill_area.height - icon_area.height ) / 2;
    617 
    618603    /* name */
    619     name_area.x = icon_area.x + icon_area.width + GUI_PAD;
     604    name_area.x = fill_area.x + GUI_PAD_SMALL;
    620605    name_area.y = fill_area.y;
    621     name_area.width = fill_area.width - GUI_PAD - icon_area.width - GUI_PAD_SMALL;
     606    name_area.width = fill_area.width - ( GUI_PAD_SMALL * 2 );
    622607
    623608    /* prog */
    624609    prog_area.x = name_area.x;
     
    641626    **/
    642627   
    643628    g_object_set( p->icon_renderer, "pixbuf", icon, "sensitive", active, NULL );
    644     gtk_cell_renderer_render( p->icon_renderer, window, widget, &icon_area, &icon_area, &icon_area, flags );
    645629    g_object_set( text_renderer, "text", name, "scale", 1.0, "sensitive", active, "ellipsize", PANGO_ELLIPSIZE_END, "weight", PANGO_WEIGHT_BOLD, NULL );
    646630    gtk_cell_renderer_render( text_renderer, window, widget, &name_area, &name_area, &name_area, flags );
    647631    g_object_set( text_renderer, "text", progress, "scale", SMALL_SCALE, "weight", PANGO_WEIGHT_NORMAL, NULL );