Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Check-in [daefcf55d1]

Overview
SHA1:daefcf55d144dafe0698c5bd94abd1bc080b8c14
Date: 2016-12-11 14:18:09
User: mario
Comment:Switch order of load_config() widget checks: on Windows the spinbutton may have a different parent
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-12-11
15:11
[de1e8b9558] Document prefstore and cachereset plugins. (user: mario, tags: trunk)
14:18
[daefcf55d1] Switch order of load_config() widget checks: on Windows the spinbutton may have a different parent (user: mario, tags: trunk)
13:32
[978c9ffe56] safeguard absent config option (user: mario, tags: trunk)
Changes

Modified channels/configwin.py from [78b3f90f28] to [461aa8a0a3].

    49     49   
    50     50       
    51     51       # Load values from conf. store into gtk widgets
    52     52       def load_config(self, config, prefix="config_"):
    53     53           for key,val in config.items():
    54     54               w = self.main.get_widget(prefix + key)
    55     55               if w:
           56  +                # number
           57  +                if isinstance(w, gtk.SpinButton):
           58  +                    w.set_value(int(val))
    56     59                   # input field
    57         -                if isinstance(w, gtk.Entry):
           60  +                elif isinstance(w, gtk.Entry):
    58     61                       w.set_text(str(val))
    59     62                   # checkmark
    60     63                   elif isinstance(w, gtk.CheckButton):
    61     64                       w.set_active(bool(val))
    62     65                   # dropdown
    63     66                   elif isinstance(w, ComboBoxText):
    64     67                       w.set_default(val)
    65         -                # number
    66         -                elif isinstance(w, gtk.SpinButton):
    67         -                    w.set_value(int(val))
    68     68                   # list
    69     69                   elif isinstance(w, gtk.ListStore):
    70     70                       w.clear()
    71     71                       if isinstance(val, dict):
    72     72                           for k,v in val.items():
    73     73                               w.append([k, v, uikit.app_bin_check(v)])
    74     74                           w.append(["", "", gtk.STOCK_NEW])
................................................................................
   113    113   
   114    114       # iterate over channel and feature plugins
   115    115       def add_plugins(self):
   116    116           ls = all_plugin_meta()
   117    117           for name,meta in sorted(ls.items(), key=lambda e: e[1]["type"]+e[1]["title"].lower(), reverse=False):
   118    118               if not name in conf.plugins:
   119    119                   conf.plugins[name] = False
          120  +                conf.add_plugin_defaults(meta, name)
   120    121               add_ = self.add_channels if meta.get("type") == "channel" else self.add_features
   121    122               self.add_plg(name, meta, add_)
   122    123           pass
   123    124   
   124    125       # Description text
   125    126       plugin_text = "<span size='larger' weight='heavy'>{title}</span> "\
   126    127                   + "<span style='italic' foreground='slate blue'>({type}/{category})</span> "\