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