added a service category in settings for all services

This commit is contained in:
Manuel Cortez 2019-06-24 12:54:43 -05:00
parent 7756d71b32
commit 4254f444db
2 changed files with 4 additions and 2 deletions

View File

@ -21,15 +21,16 @@ class configuration(object):
if str(i["id"]) == current_output_device: if str(i["id"]) == current_output_device:
self.view.set_value("general", "output_device", i["name"]) self.view.set_value("general", "output_device", i["name"])
break break
self.view.realize()
extractors = get_extractors(import_all=True) extractors = get_extractors(import_all=True)
for i in extractors: for i in extractors:
if hasattr(i, "settings"): if hasattr(i, "settings"):
panel = getattr(i, "settings")(self.view.notebook) panel = getattr(i, "settings")(self.view.notebook)
self.view.notebook.AddPage(panel, panel.name) self.view.notebook.InsertSubPage(1, panel, panel.name)
panel.load() panel.load()
if hasattr(panel, "on_enabled"): if hasattr(panel, "on_enabled"):
panel.on_enabled() panel.on_enabled()
self.view.realize()
def save(self): def save(self):
selected_output_device = self.view.get_value("general", "output_device") selected_output_device = self.view.get_value("general", "output_device")

View File

@ -28,6 +28,7 @@ class configurationDialog(widgetUtils.BaseDialog):
self.general.SetFocus() self.general.SetFocus()
def realize(self): def realize(self):
self.notebook.AddPage(wx.Panel(self.notebook, wx.NewId()), _("Services"))
self.sizer.Add(self.notebook, 0, wx.ALL, 5) self.sizer.Add(self.notebook, 0, wx.ALL, 5)
ok_cancel_box = wx.BoxSizer(wx.HORIZONTAL) ok_cancel_box = wx.BoxSizer(wx.HORIZONTAL)
ok = wx.Button(self.panel, wx.ID_OK, _("Save")) ok = wx.Button(self.panel, wx.ID_OK, _("Save"))