Reload all extractors' config after saving changes in the settings dialog
This commit is contained in:
@@ -21,7 +21,7 @@ class configuration(object):
|
||||
if str(i["id"]) == current_output_device:
|
||||
self.view.set_value("general", "output_device", i["name"])
|
||||
break
|
||||
extractors = get_extractors()
|
||||
extractors = get_extractors(import_all=True)
|
||||
for i in extractors:
|
||||
if hasattr(i, "settings"):
|
||||
panel = getattr(i, "settings")(self.view.notebook)
|
||||
|
@@ -92,6 +92,7 @@ class Controller(object):
|
||||
# Event functions. These functions will call other functions in a thread and are bound to widget events.
|
||||
def on_settings(self, *args, **kwargs):
|
||||
settings = configuration.configuration()
|
||||
self.reload_extractors()
|
||||
|
||||
def on_search(self, *args, **kwargs):
|
||||
wx.CallAfter(self.search)
|
||||
@@ -257,4 +258,9 @@ class Controller(object):
|
||||
self.change_status(_(u"No results found. "))
|
||||
else:
|
||||
self.change_status(u"")
|
||||
wx.CallAfter(self.window.list.SetFocus)
|
||||
wx.CallAfter(self.window.list.SetFocus)
|
||||
|
||||
def reload_extractors(self):
|
||||
extractors = [i.interface.name for i in get_extractors()]
|
||||
self.window.extractor.SetItems(extractors)
|
||||
self.window.extractor.SetValue(extractors[0])
|
Reference in New Issue
Block a user