Check-in [50c68197c7]
Overview
Comment: | Enable `list`/`array`/`table` config schemes in addition to `dict`. Currently unused, just added because it's little more code. No custom value="x,x,x|y,y,y" parser yet. Not for `dict` either, as it's only used by specbuttons with a predefined list. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
50c68197c7f3427db8ce244557332a31 |
User & Date: | mario on 2016-10-28 23:12:11 |
Other Links: | manifest | tags |
Context
2016-10-28
| ||
23:18 | bump minor versions check-in: 1478740ada user: mario tags: trunk | |
23:12 | Enable `list`/`array`/`table` config schemes in addition to `dict`. Currently unused, just added because it's little more code. No custom value="x,x,x|y,y,y" parser yet. Not for `dict` either, as it's only used by specbuttons with a predefined list. check-in: 50c68197c7 user: mario tags: trunk | |
23:08 | Fix add_default=False logic. check-in: 87a6d5ac96 user: mario tags: trunk | |
Changes
Modified channels/configwin.py from [834ef930af] to [f3a2a25e57].
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | - + + - - - + + + + + + + + + | # dropdown elif isinstance(w, ComboBoxText): w.set_default(val) # number elif isinstance(w, gtk.SpinButton): w.set_value(int(val)) # list |
︙ | |||
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 | + + + + + - - - - + + + + | elif isinstance(w, gtk.CheckButton): config[key] = w.get_active() # int elif isinstance(w, gtk.SpinButton): config[key] = int(w.get_value(val)) # dict elif isinstance(w, gtk.ListStore): if key in config and isinstance(config[key], list): config[key] = [] for row in w: config[key].append([str(e) for e in row]) else: |
︙ |
Modified channels/specbuttons.py from [19182e61c1] to [0939200c7c].
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | - + | # encoding: utf-8 # title: Spec buttons for apps # description: Adds configurable mini toolbar buttons # version: 0.7 # depends: streamtuner2 >= 2.2.0 # type: feature # category: ui # config: # { name: specbutton_rows, value: 2, max: 4, type: int, description: "Number of rows to arrange buttons in." } |
︙ |
Modified help/specbuttons.page from [3b72d31b24] to [76c3d65779].
1 2 3 4 5 6 7 8 9 10 11 | 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 | - + - - - + + + + - + | <page xmlns="http://projectmallard.org/1.0/" type="guide" id="specbuttons"> <info> <link type="guide" xref="index#extra"/> <link type="guide" xref="configuration#apps"/> <link type="guide" xref="configuration#gui"/> <desc>Toolbar application short cuts.</desc> </info> |
︙ | |||
54 55 56 57 58 59 60 61 | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | + + + + + - + + + | <p>Placeholders like %title and %url or %pls and %m3u are supported for all commands as well. So you can have additional play/record shortcuts.</p> </section> <section> <title>icon rows</title> <p>With the "number of rows" setting, more buttons can be packed together. It looks okay with up to 3 rows - when using the large sized main toolbar. The defined icon shortcuts will always be packed column-wise.</p> <note style="bug"><p>The icon list isn't ordered. So you cannot |
Modified pluginconf.py from [3b562696a0] to [25ef6eb532].
︙ | |||
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | + + + + | if "name" in opt and "value" in opt: if opt["name"] not in conf_options: # typemap "bool" and "int" here if opt["type"] in ("bool", "boolean"): val = opt["value"].lower() in ("1", "true", "yes", "on") elif opt["type"] in ("int", "integer", "numeric"): val = int(opt["value"]) elif opt["type"] in ("array", "table", "list"): val = [ opt["value"].split(",") ] elif opt["type"] in ("dict"): val = dict(opt["value"].split(",")) else: val = str(opt["value"]) conf_options[opt["name"]] = val # Initial plugin activation status if module and module not in conf_plugins: conf_plugins[module] = meta.get("priority") in ( "core", "builtin", "always", "default", "standard" ) |
Modified uikit.py from [1647517a84] to [26d04e8c56].
︙ | |||
508 509 510 511 512 513 514 | 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 | + + - + + + - - + | w.show_all() return w # Config win table (editable dictionary, two columns w/ executable indicator pixbuf) @staticmethod def config_treeview(opt, columns=["Icon", "Command"]): lno = len(columns) if lno == 2: |
︙ | |||
538 539 540 541 542 543 544 545 546 547 | 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 | + - + - - - + + + | return w, liststore # Generic Gtk callback to update ListStore when entries get edited. # where user_data = (liststore, column #id) @staticmethod def liststore_edit(cell, row, text, user_data): #log.EDIT(cell, row, text, user_data) row = int(row) liststore, column = user_data liststore[row][column] = text # update executable-indicator pixbuf |
︙ |