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

display mime-type icon in file list #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
might be nice to use

    g_content_type_guess()

and

    g_content_type_get_icon()

to display an icon for Wanted-file instead of stock icon.

I guess this requires a new TRG_COLTYPE_ internally?  I'm still a little rough 
on the icon handling stuff in GTK.

For that matter I think the text for the Wanted column should not be there, 
rather it should just be GTK_STOCK_APPLY or GTK_STOP_CANCEL, with a text 
tooltip, cleaner ui imho.

Original issue reported on code.google.com by reardo...@gmail.com on 30 Sep 2011 at 3:23

GoogleCodeExporter commented 9 years ago
Just looking at it some more... why is the icon set in the model, shouldn't the 
view handle it exclusively?  The model should just know whether it is Wanted or 
not, not how to display?

Original comment by reardo...@gmail.com on 30 Sep 2011 at 3:34

GoogleCodeExporter commented 9 years ago
I think the model needs to set it, as the model should be what's reporting the 
latest (unless a change hasn't been acknowledged) update from the server. The 
view should only set the icon in response to interaction so there's instant 
feedback.

If the user changes it, it'll suspend updates on the model until torrent_set is 
acknowledged. This is to avoid if switching back to the old setting between 
updates (usually).

Original comment by a...@eth0.org.uk on 30 Sep 2011 at 8:55

GoogleCodeExporter commented 9 years ago
Yeah it would, I've added TRG_COLTYPE_PIXBUFICONTEXT for you.

Original comment by a...@eth0.org.uk on 1 Oct 2011 at 12:19

GoogleCodeExporter commented 9 years ago
First pass.  I still think the Wanted column should be an icon, not text, but 
the the existing custom cell_renderer was way beyond me.

I do not g_object_unref() the icon, and it needs to be done, I'm just not sure 
when and where.  But given it's just a pointer which is likely reused many, 
many times, I'm not to stressed.

Original comment by reardo...@gmail.com on 2 Oct 2011 at 1:23

Attachments:

GoogleCodeExporter commented 9 years ago
Nice.

I've added an unref after it's set in the model, I'd expect the model to ref it.

Original comment by a...@eth0.org.uk on 3 Oct 2011 at 7:48