1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-17 12:02:48 +01:00

Fix the Settings... action in the DI context menu

This commit is contained in:
David Sansome 2011-07-18 22:20:58 +00:00
parent ceae993d62
commit f5b8bbec9e

View File

@ -8,14 +8,16 @@ class Plugin:
def __init__(self): def __init__(self):
self.settings_dialog = None self.settings_dialog = None
# Create the services and add them to the Internet tab cb = self.ShowSettings
self.di_service = DigitallyImportedService(clementine.internet_model, self.ShowSettings)
self.sky_service = SkyFmService(clementine.internet_model, self.ShowSettings)
clementine.internet_model.AddService(self.di_service)
clementine.internet_model.AddService(self.sky_service)
# Register for when the user clicks the Settings button # Register for when the user clicks the Settings button
__script__.connect("SettingsDialogRequested()", self.ShowSettings) __script__.connect("SettingsDialogRequested()", cb)
# Create the services and add them to the Internet tab
self.di_service = DigitallyImportedService(clementine.internet_model, cb)
self.sky_service = SkyFmService(clementine.internet_model, cb)
clementine.internet_model.AddService(self.di_service)
clementine.internet_model.AddService(self.sky_service)
def ShowSettings(self): def ShowSettings(self):
if not self.settings_dialog: if not self.settings_dialog: