170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186 | p.setdefault(field, "-")
return p
# Download a plugin
def install(self, p):
src = ahttp.get(p["$file"], encoding="utf-8")
with open("{}/{$name}.py".format(conf.plugin_dir, **p), "w") as f:
f.write(src)
self.parent.status("Plugin '{$name}.py' installed.".format(**p))
# Empty out [channels] and [feature] tab in configdialog, so it rereads them
def clean_config_vboxen(self, *w):
self.parent.configwin.first_open = 1
for vbox in [self.parent.plugin_options, self.parent.feature_options]:
for c in vbox.get_children()[1:]: |
>
|
|
>
| 170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188 | p.setdefault(field, "-")
return p
# Download a plugin
def install(self, p):
src = ahttp.get(p["$file"], encoding="utf-8")
name = p["$name"]
with open("{}/{}.py".format(conf.plugin_dir, name), "w") as f:
f.write(src)
self.parent.status("Plugin '{}.py' installed.".format(name))
conf.add_plugin_defaults(plugin_meta(module=name), name)
# Empty out [channels] and [feature] tab in configdialog, so it rereads them
def clean_config_vboxen(self, *w):
self.parent.configwin.first_open = 1
for vbox in [self.parent.plugin_options, self.parent.feature_options]:
for c in vbox.get_children()[1:]: |