[gpodder] Re: gPodder (color) customization

  • From: Marcos Riban <marcosriban@xxxxxxxxx>
  • To: gpodder@xxxxxxxxxxxxx
  • Date: Sat, 15 Sep 2012 11:08:56 +0200

WOW, many thanks for taking the time to help me out here! I am surely going to play around with this a lot.

In your screenshot and after searching gpodder pictures on the internet I have seen that in Linux the podcast episode list has alternating row colors, whereas in Windows it is white. Is there a setting in the .py config files, too, or is this an Linux specific thing?

And there's a different thing: For about 3-5 days now gPodder does not download YouTube feeds any more, I always get this message:  "NAME OF EPISODE - HTTP Error 403: Forbidden". I have tried to re-add the channels to gPodder using the shortcut yt:USERNAME but it's always the same error. Maybe YouTube has changed something and gPodder needs to be updated at it's grabbing functions.

Thanks again
Marcos

Freitag, 14. September 2012 21:31
Hi Marcos,

2012/9/12 Marcos Riban <marcosriban@xxxxxxxxx>
regarding the "theming" thing I agree with you as this is exactly what I had in mind myself: adjusting gPodder to my personal taste without generalizing it or forcing it upon the public.
If you could tell me where to edit the source code, that would be very kind.
Here we go:

All customizations refer to the podcast list on the left side:
1) Set a custom background color (#e7ebef)
In src/gpodder/gtkui/main.py at the beginning of init_podcast_list_treeview, do:

self.treeChannels.modify_base(gtk.STATE_NORMAL, gtk.gdk.color_parse('#e7ebef'))

2) Set a different size for the podcast pictures
In the same function, a few lines below, change the iconcell width property:

iconcell.set_property('width', YOUR_CUSTOM_SIZE)

And you also have to edit src/gpodder/gtkui/model.py, search for
self._max_image_side = ... and modify it, e.g.:

self._max_image_side = YOUR_CUSTOM_SIZE

3) Increase font size of podcast title
You can do that in def _format_description(self, ...) in the same file
(model.py), simply use Pango Markup for it:

http://developer.gnome.org/pango/stable/PangoMarkupFormat.html

For example, you can change this line:

d.append(title_markup)

to this:

d.append('<span size="xx-large">' + title_markup + '</span>')

4) Hide the description text below the podcast title
In the same function, remove the 4 lines at the end (the first line is
"if description_markup.strip():") and only add the following line
instead:

return ''.join(d)

5) Edit the look of the dynamic episode count and place it below the podcast
title like this: "New: 2 | Total: 4". So instead of having the episode count
on the right side of the podcast title I would like to see it below where
the description text (4) was before.
In src/gpodder/gtkui/main.py comment out the following lines:

        iconcell = gtk.CellRendererPixbuf()
        iconcell.set_property('xalign', 1.0)
        column.pack_start(iconcell, False)
        column.add_attribute(iconcell, 'pixbuf', PodcastListModel.C_PILL)
        column.add_attribute(iconcell, 'visible',
PodcastListModel.C_PILL_VISIBLE)

How to add the episode count and things to the description is left as
an exercise to the reader, otherwise it wouldn't be fun at all ;)
(Hint: _format_description has some interesting parameters that might
come in handy).

Voila: http://o.thp.io/images/gpodder-customization-example_2012-09-14.png

Enjoy,
Thomas

Other related posts: