Check-in [614c2f6690]
Overview
Comment: | Add channel icon above title/link in toolbar. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
614c2f66907d8303f6c195a1cc4b6f8a |
User & Date: | mario on 2020-05-13 17:44:46 |
Other Links: | manifest | tags |
Context
2020-05-13
| ||
17:45 | Format exceptions log.() calls check-in: 84f2995f8d user: mario tags: trunk | |
17:44 | Add channel icon above title/link in toolbar. check-in: 614c2f6690 user: mario tags: trunk | |
17:43 | Add new radio-browser icon. check-in: 1c189d72bc user: mario tags: trunk | |
Changes
Modified channels/ui_cht.py from [4b36d8e17b] to [4f149ec26e].
1 2 3 | # encoding: utf-8 # title: Channel toolbar link # description: Shows current channel and a link to online service in toolbar. | | | | > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # encoding: utf-8 # title: Channel toolbar link # description: Shows current channel and a link to online service in toolbar. # version: 1.2 # depends: streamtuner2 >= 2.2.2 # type: feature # category: ui # # Reintroduces the channel/service link in the toolbar, # just like in streamtuner1. # # Note this requires '[✔] Add current channel name to window title' # in the general Options. import re from config import conf,log from uikit import * # Channel Homepage in Toolbar class ui_cht(object): module = 'ui_cht' # Hook toolbar label def __init__(self, parent): self.label = parent.toolbar_link self.icon = parent.get_widget("toolbar_icon") parent.hooks["switch"].append(self.switchy) # Update link label def switchy(self, meta, *x, **y): title = meta.get("title", meta.get("id", (""))) url = meta.get("url", "") domain = re.sub("^.+?//|/.+$", "", url) self.label.set_markup("<big><b>{}</b></big>\n<a href='{}'>{}</a>".format(title, url, domain)) # icon (since 2.2.2) if self.icon and meta.get("png"): pixbuf = uikit.pixbuf(meta["png"]) pixbuf = pixbuf.scale_simple(32, 32, gtk.gdk.INTERP_BILINEAR) self.icon.set_from_pixbuf(pixbuf) |
Modified gtk3.xml.gz from [1691d2599f] to [17fe20f088].
cannot compute difference between binary files