Changeset 7b72d7
- Timestamp:
- 04/28/2009 02:35:08 AM (16 years ago)
- Branches:
- 2.0.x, develop, extjs4-port, master
- Children:
- 78b5c0
- Parents:
- 925dcd
- Location:
- deluge/ui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/ui/gtkui/filtertreeview.py
r925dcd r7b72d7 31 31 import deluge.component as component 32 32 import deluge.common 33 from deluge.ui.tracker_icons import TrackerIcons34 33 from deluge.log import LOG as log 35 34 from deluge.ui.client import client … … 72 71 self.sidebar = component.get("SideBar") 73 72 self.config = ConfigManager("gtkui.conf") 74 self.tracker_icons = TrackerIcons()73 self.tracker_icons = component.get("TrackerIcons") 75 74 76 75 self.label_view = gtk.TreeView() -
deluge/ui/gtkui/gtkui.py
r925dcd r7b72d7 51 51 from pluginmanager import PluginManager 52 52 from ipcinterface import IPCInterface 53 from deluge.ui.tracker_icons import TrackerIcons 53 54 54 55 from queuedtorrents import QueuedTorrents … … 167 168 client.set_disconnect_callback(self.__on_disconnect) 168 169 170 self.trackericons = TrackerIcons() 169 171 # Initialize various components of the gtkui 170 172 self.mainwindow = MainWindow() -
deluge/ui/gtkui/torrentview.py
r925dcd r7b72d7 76 76 77 77 def 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]) 79 79 if icon_path: 80 80 try: … … 82 82 except Exception, e: 83 83 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) 86 90 87 91 -
deluge/ui/tracker_icons.py
r925dcd r7b72d7 32 32 import os 33 33 import deluge.configmanager 34 import deluge.component as component 34 35 35 36 #some servers don't have their favicon at the expected location … … 61 62 return data 62 63 63 class TrackerIcons( object):64 class TrackerIcons(component.Component): 64 65 def __init__(self): 66 component.Component.__init__(self, "TrackerIcons") 65 67 #set image cache dir 66 68 self.image_dir = os.path.join(deluge.configmanager.get_config_dir(), "icons") … … 141 143 f.write(icon_data) 142 144 f.close() 143 self.images[tracker_host] = filename144 145 else: 145 146 filename = None 147 148 self.images[tracker_host] = filename 146 149 147 150 if callback:
Note:
See TracChangeset
for help on using the changeset viewer.