Check-in [39304eb90b]
Overview
| Comment: | Introduce channel.fixed_size=[24,24] to constrain favicon CellRendererPixbuf. Works in conjunction to .img_resize= attribute for favicon/img converter. Set expand:False in default datamap[] for favicon cell. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
39304eb90b41f27dc680fdf493b7174e |
| User & Date: | mario on 2015-05-24 08:52:13 |
| Other Links: | manifest | tags |
Context
|
2015-05-24
| ||
| 10:02 | Lighter highlight color: for plugin options. check-in: 160f4dd660 user: mario tags: trunk | |
| 08:52 | Introduce channel.fixed_size=[24,24] to constrain favicon CellRendererPixbuf. Works in conjunction to .img_resize= attribute for favicon/img converter. Set expand:False in default datamap[] for favicon cell. check-in: 39304eb90b user: mario tags: trunk | |
| 08:49 | Check for string length (.q) before starting cache/server search. Wrap channel+cat switching in ukit.do(). check-in: 708ecda3e9 user: mario tags: trunk | |
Changes
Modified channels/__init__.py from [54759d6b53] to [9cd47dabe0].
| ︙ | |||
72 73 74 75 76 77 78 79 80 81 82 83 84 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | + - + |
# Gtk widgets
gtk_list = None # Gtk widget for station treeview
gtk_cat = None # Gtk widget for category columns
ls = None # ListStore for station treeview
rowmap = None # Preserve streams-datamap
pix_entry = None # ListStore entry that contains favicon
img_resize = None # Rescale `img` references to icon size
fixed_size = [24,24] # Default height+width for favicons
# mapping of stream{} data into gtk treeview/treestore representation
datamap = [
# coltitle width [ datasrc key, type, renderer, attrs ] [cellrenderer2], ...
["", 20, ["state", str, "pixbuf", {}], ],
["Genre", 65, ['genre', str, "t", {}], ],
|
| ︙ | |||
183 184 185 186 187 188 189 | 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | - + + |
# add to main menu
uikit.add_menu([parent.channelmenuitems], self.meta["title"], lambda w: parent.channel_switch_by_name(self.module) or 1)
# Just wraps uikit.columns() to retain liststore, rowmap and pix_entry
def columns(self, entries=None):
self.ls, self.rowmap, self.pix_entry = uikit.columns(
|
| ︙ |
Modified contrib/reddit.py from [3ee971501f] to [74725ffeda].
| ︙ | |||
46 47 48 49 50 51 52 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + + - + + |
class reddit (ChannelPlugin):
# control attributes
has_search = False
listformat = "srv"
audioformat = "video/youtube"
titles = dict(playing="submitter", listeners="votes", bitrate=False)
# favicon scaling (from reddit preview `img`)
|
| ︙ | |||
292 293 294 295 296 297 298 | 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | - |
if not format:
if conf.reddit_keep_all:
state = "gtk-page-setup"
format = "url/http"
else:
log.DATA_SKIP(format, row["url"])
continue
|
| ︙ |
Modified uikit.py from [b587b433a7] to [a196775096].
| ︙ | |||
82 83 84 85 86 87 88 | 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | - + - + - - + + - + - + - - - + + + + + + + + - - - - - - - |
#
# An according entries list then would contain a dictionary for each row:
# entries = [ {"titlerow":"first", "interndat":123}, {"titlerow":"..."}, ]
# Keys not mentioned in the datamap get ignored, and defaults are applied
# for missing cols. All values must already be in the correct type however.
#
@staticmethod
|
| ︙ |