Make methods static where possible

This commit is contained in:
Simon Hanna 2016-01-04 01:18:01 +01:00
parent 12f71b3eec
commit 4206d11228
9 changed files with 25 additions and 13 deletions

View File

@ -191,7 +191,8 @@ class AlertsPlugin(Plugin):
self.alert_form.load_list()
self.alert_form.exec()
def about(self):
@staticmethod
def about():
"""
Plugin Alerts about method
@ -215,7 +216,8 @@ class AlertsPlugin(Plugin):
'title': translate('AlertsPlugin', 'Alerts', 'container title')
}
def get_display_javascript(self):
@staticmethod
def get_display_javascript():
"""
Add Javascript to the main display.
"""
@ -229,7 +231,8 @@ class AlertsPlugin(Plugin):
return CSS % (align, self.settings_tab.font_face, self.settings_tab.font_size, self.settings_tab.font_color,
self.settings_tab.background_color)
def get_display_html(self):
@staticmethod
def get_display_html():
"""
Add HTML to the main display.
"""

View File

@ -167,7 +167,8 @@ class BiblePlugin(Plugin):
if self.media_item:
self.media_item.on_import_click()
def about(self):
@staticmethod
def about():
"""
Return the about text for the plugin manager
"""

View File

@ -62,7 +62,8 @@ class CustomPlugin(Plugin):
self.icon_path = ':/plugins/plugin_custom.png'
self.icon = build_icon(self.icon_path)
def about(self):
@staticmethod
def about():
about_text = translate('CustomPlugin', '<strong>Custom Slide Plugin </strong><br />The custom slide plugin '
'provides the ability to set up custom text slides that can be displayed on the screen '
'the same way songs are. This plugin provides greater freedom over the songs plugin.')

View File

@ -53,7 +53,8 @@ class ImagePlugin(Plugin):
self.icon_path = ':/plugins/plugin_images.png'
self.icon = build_icon(self.icon_path)
def about(self):
@staticmethod
def about():
about_text = translate('ImagePlugin', '<strong>Image Plugin</strong>'
'<br />The image plugin provides displaying of images.<br />One '
'of the distinguishing features of this plugin is the ability to '

View File

@ -84,7 +84,8 @@ class MediaPlugin(Plugin):
visible_name = self.get_string(StringContent.VisibleName)
self.settings_tab = MediaTab(parent, self.name, visible_name['title'], self.icon_path)
def about(self):
@staticmethod
def about():
"""
Return the about text for the plugin manager
"""

View File

@ -137,7 +137,8 @@ class PresentationPlugin(Plugin):
self.register_controllers(controller)
return bool(self.controllers)
def about(self):
@staticmethod
def about():
"""
Return information about this plugin.
"""

View File

@ -88,7 +88,8 @@ class RemotesPlugin(Plugin):
self.server.stop_server()
self.server = None
def about(self):
@staticmethod
def about():
"""
Information about this plugin
"""

View File

@ -211,7 +211,8 @@ class SongsPlugin(Plugin):
if self.media_item:
self.media_item.on_export_click()
def about(self):
@staticmethod
def about():
"""
Provides information for the plugin manager to display.
@ -343,7 +344,8 @@ class SongsPlugin(Plugin):
for song in songs:
self.manager.delete_object(Song, song.id)
def _count_songs(self, db_file):
@staticmethod
def _count_songs(db_file):
"""
Provide a count of the songs in the database

View File

@ -227,7 +227,8 @@ class SongUsagePlugin(Plugin):
self.song_usage_detail_form.initialise()
self.song_usage_detail_form.exec()
def about(self):
@staticmethod
def about():
"""
The plugin about text