use super()

This commit is contained in:
Andreas Preikschat 2013-08-01 19:24:54 +02:00
commit 5fe9de5377
5 changed files with 10 additions and 10 deletions

View File

@ -153,7 +153,7 @@ class AlertsPlugin(Plugin):
def initialise(self):
log.info(u'Alerts Initialising')
Plugin.initialise(self)
super(AlertsPlugin, self).initialise()
self.tools_alert_item.setVisible(True)
action_list = ActionList.get_instance()
action_list.add_action(self.tools_alert_item, UiStrings().Tools)
@ -164,7 +164,7 @@ class AlertsPlugin(Plugin):
"""
log.info(u'Alerts Finalising')
self.manager.finalise()
Plugin.finalise(self)
super(AlertsPlugin, self).finalise()
self.tools_alert_item.setVisible(False)
action_list = ActionList.get_instance()
action_list.remove_action(self.tools_alert_item, u'Tools')

View File

@ -82,7 +82,7 @@ class PresentationPlugin(Plugin):
Initialise the plugin. Determine which controllers are enabled are start their processes.
"""
log.info(u'Presentations Initialising')
Plugin.initialise(self)
super(PresentationPlugin, self).initialise()
for controller in self.controllers:
if self.controllers[controller].enabled():
try:
@ -103,7 +103,7 @@ class PresentationPlugin(Plugin):
controller = self.controllers[key]
if controller.enabled():
controller.kill()
Plugin.finalise(self)
super(PresentationPlugin, self).finalise()
def create_media_manager_item(self):
"""

View File

@ -66,7 +66,7 @@ class RemotesPlugin(Plugin):
Initialise the remotes plugin, and start the http server
"""
log.debug(u'initialise')
Plugin.initialise(self)
super(RemotesPlugin, self).initialise()
self.server = HttpServer()
self.server.start_server()
@ -75,7 +75,7 @@ class RemotesPlugin(Plugin):
Tidy up and close down the http server
"""
log.debug(u'finalise')
Plugin.finalise(self)
super(RemotesPlugin, self).finalise()
if self.server:
self.server.close()
self.server = None

View File

@ -94,7 +94,7 @@ class SongsPlugin(Plugin):
def initialise(self):
log.info(u'Songs Initialising')
Plugin.initialise(self)
super(SongsPlugin, self).initialise()
self.song_import_item.setVisible(True)
self.song_export_item.setVisible(True)
self.tools_reindex_item.setVisible(True)
@ -308,7 +308,7 @@ class SongsPlugin(Plugin):
action_list.remove_action(self.song_export_item, UiStrings().Export)
action_list.remove_action(self.tools_reindex_item, UiStrings().Tools)
action_list.remove_action(self.tools_find_duplicates, UiStrings().Tools)
Plugin.finalise(self)
super(SongsPlugin, self).finalise()
def new_service_created(self):
"""

View File

@ -122,7 +122,7 @@ class SongUsagePlugin(Plugin):
def initialise(self):
log.info(u'SongUsage Initialising')
Plugin.initialise(self)
super(SongUsagePlugin, self).initialise()
Registry().register_function(u'slidecontroller_live_started', self.display_song_usage)
Registry().register_function(u'print_service_started', self.print_song_usage)
self.song_usage_active = Settings().value(self.settings_section + u'/active')
@ -143,7 +143,7 @@ class SongUsagePlugin(Plugin):
"""
log.info(u'Plugin Finalise')
self.manager.finalise()
Plugin.finalise(self)
super(SongUsagePlugin, self).finalise()
self.song_usage_menu.menuAction().setVisible(False)
action_list = ActionList.get_instance()
action_list.remove_action(self.song_usage_status, translate('SongUsagePlugin', 'Song Usage'))