Ignore:
Timestamp:
04/28/2009 02:35:08 AM (16 years ago)
Author:
Andrew Resch <andrewresch@gmail.com>
Branches:
2.0.x, develop, extjs4-port, master
Children:
78b5c0
Parents:
925dcd
Message:

Made TrackerIcons a component to prevent trying to get an icon multiple
times
Fixed showing the wrong tracker icon in the TorrentView when the icon
could not be retrieved from the tracker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • deluge/ui/gtkui/torrentview.py

    r925dcd r7b72d7  
    7676
    7777def cell_data_trackericon(column, cell, model, row, data):
    78     icon_path = TrackerIcons().get(model[row][data])
     78    icon_path = component.get("TrackerIcons").get(model[row][data])
    7979    if icon_path:
    8080        try:
     
    8282        except Exception, e:
    8383            pass
    84         if cell.get_property("pixbuf") != icon:
    85             cell.set_property("pixbuf", icon)
     84    else:
     85        icon = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, 16, 16)
     86        icon.fill(0x00000000)
     87
     88    if cell.get_property("pixbuf") != icon:
     89        cell.set_property("pixbuf", icon)
    8690
    8791
Note: See TracChangeset for help on using the changeset viewer.