Treferwynd / transmission-remote-gtk

Automatically exported from code.google.com/p/transmission-remote-gtk
GNU General Public License v2.0
0 stars 0 forks source link

favicon for trackers #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
transmission-qt has a nice feature of using the favicon for a tracker rather 
than a generic image.  it seems to use a heuristic to lookup 
"trackerdomain.com/favicon.ico" rather than 
"fully-qualified-trackername.trackerdomain.com/..."

an improvement would be to also check for "www.trackerdomain.com" if the first 
check failed, as this is a common scenario, ie check the torrent site not the 
tracker per se.

Original issue reported on code.google.com by reardo...@gmail.com on 21 Sep 2011 at 4:09

GoogleCodeExporter commented 9 years ago
Nice, but probably a lot of code for something which is pretty useless. Again, 
I might consider applying a good patch but I'm not doing this myself.

Original comment by a...@eth0.org.uk on 21 Sep 2011 at 4:50

GoogleCodeExporter commented 9 years ago
[I am filing a lot of these features bugs just to create a record and have 
something to index when/if I do create patches]

Original comment by reardo...@gmail.com on 21 Sep 2011 at 10:26

GoogleCodeExporter commented 9 years ago
I started an implementation for this but to be honest I cannot figure out how 
to get state_selector to mix pixbufs with theme icons.  It seems like the 
column render requires every row to image to be of the same type.  
gtk_cell_renderer_pixbuf_new() in trg_state_selector_constructor() requires 
that the image sub-column be one type or another.  

Right now it is set to "stock-id" and thus relies on theme icons.

Any thought on how one might mix "stock-id" images with "pixbuf" images in the 
same column cell-renderer?

Original comment by reardo...@gmail.com on 25 Sep 2011 at 1:00

GoogleCodeExporter commented 9 years ago
Yeah, I think you're right that you can't mix cell renderers.

So I think it'd be necessary to have a custom cell renderer. Shouldn't be too 
hard, I think you could subclass the GtkCellRendererPixbuf, and in the 
property_set for a new property like trg-state-icon:

If !g_strcmp0(value, GTK_STOCK_NETWORK)
  g_object_set(self, "stock-id", value);
else
  g_object_set(self, "pixbuf", load_pixbuf_from_somewhere(value));

Original comment by a...@eth0.org.uk on 25 Sep 2011 at 9:34