Check-in [730e6dc9f1]
Overview
Comment: | Strip carriage return from plugin meta block, which causes field reading to fail on Windows. And use `empty_pixbuf` as fallback for uikit.pixbuf() in case the content isn't valid base64 still. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
730e6dc9f161ce70cbf05679b0f0d065 |
User & Date: | mario on 2016-11-09 15:15:06 |
Other Links: | manifest | tags |
Context
2016-11-09
| ||
20:06 | Fix binary file open mode (CRLF corruption on Windows) check-in: 9564d3909a user: mario tags: trunk | |
15:15 | Strip carriage return from plugin meta block, which causes field reading to fail on Windows. And use `empty_pixbuf` as fallback for uikit.pixbuf() in case the content isn't valid base64 still. check-in: 730e6dc9f1 user: mario tags: trunk | |
2016-11-08
| ||
20:01 | Add Windows support (taskkill instead of pkill) check-in: 20cd77b794 user: mario tags: trunk | |
Changes
Modified pluginconf.py from [98d9350ac0] to [cdf7ab2169].
1 2 3 4 5 6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | - + | # encoding: UTF-8 # api: python # type: handler # category: io # title: Plugin configuration # description: Read meta data, pyz/package contents, module locating |
︙ | |||
234 235 236 237 238 239 240 241 242 243 244 245 246 247 | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | + | "title": fn, "description": "no description", "config": [], "doc": "" } # Extract coherent comment block src = src.replace("\r", "") if not literal: src = rx.comment.search(src) if not src: log_ERR("Couldn't read source meta information:", fn) return meta src = src.group(0) src = rx.hash.sub("", src).strip() |
︙ | |||
289 290 291 292 293 294 295 | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | - + | # ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ # Pretty crude comment splitting approach. But works # well enough already. Technically a YAML parser would # do better; but is likely overkill. # class rx: comment = re.compile(r"""(^ {0,4}#.*\n)+""", re.M) |
︙ |
Modified uikit.py from [2f76cfbd7b] to [ce679bb712].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | - + | import copy import sys import re import base64 import inspect from compat2and3 import unicode, xrange, PY3, gzip_decode |
︙ | |||
613 614 615 616 617 618 619 | 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 | + - - + + + + + | return None if fmt and ver==3: p = GdkPixbuf.PixbufLoader.new_with_type(fmt) elif fmt: p = GdkPixbuf.PixbufLoader(fmt) else: p = GdkPixbuf.PixbufLoader() if decode: # inline encoding |
︙ |