forked from openlp/openlp
set default plugin status in plugin.py instead of in the plugins
This commit is contained in:
parent
d6baae9f34
commit
65d0dac3c8
@ -150,7 +150,6 @@ class Plugin(QtCore.QObject):
|
||||
log.debug(u'Plugin %s initialised' % name)
|
||||
QtCore.QObject.__init__(self)
|
||||
self.name = name
|
||||
Settings.extend_default_settings(default_settings)
|
||||
self.textStrings = {}
|
||||
self.setPluginTextStrings()
|
||||
self.nameStrings = self.textStrings[StringContent.Name]
|
||||
@ -175,6 +174,10 @@ class Plugin(QtCore.QObject):
|
||||
self.pluginManager = plugin_helpers[u'pluginmanager']
|
||||
self.formParent = plugin_helpers[u'formparent']
|
||||
self.mediaController = plugin_helpers[u'mediacontroller']
|
||||
# Add the default status to the default settings.
|
||||
default_settings[name + u'/status'] = PluginStatus.Inactive
|
||||
# Add settings to the dict of all settings.
|
||||
Settings.extend_default_settings(default_settings)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_add_service_item' % self.name),
|
||||
self.processAddServiceEvent)
|
||||
QtCore.QObject.connect(Receiver.get_receiver(), QtCore.SIGNAL(u'%s_config_updated' % self.name),
|
||||
|
@ -31,7 +31,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.core.lib.ui import create_action, UiStrings
|
||||
from openlp.core.lib.theme import VerticalType
|
||||
@ -117,7 +117,6 @@ HTML = """
|
||||
__default_settings__ = {
|
||||
u'alerts/font face': QtGui.QFont().family(),
|
||||
u'alerts/font size': 40,
|
||||
u'alerts/status': PluginStatus.Inactive,
|
||||
u'alerts/db type': u'sqlite',
|
||||
u'alerts/location': AlertLocation.Bottom,
|
||||
u'alerts/background color': u'#660000',
|
||||
|
@ -31,7 +31,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings
|
||||
from openlp.core.lib.ui import create_action, UiStrings
|
||||
from openlp.core.utils.actions import ActionList
|
||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem, LayoutStyle, DisplayStyle, \
|
||||
@ -44,7 +44,6 @@ log = logging.getLogger(__name__)
|
||||
|
||||
__default_settings__ = {
|
||||
u'bibles/db type': u'sqlite',
|
||||
u'bibles/status': PluginStatus.Inactive,
|
||||
u'bibles/last search type': BibleSearch.Reference,
|
||||
u'bibles/verse layout style': LayoutStyle.VersePerSlide,
|
||||
u'bibles/book name language': LanguageSelection.Bible,
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
|
||||
from openlp.plugins.custom.lib.db import CustomSlide, init_schema
|
||||
@ -39,7 +39,6 @@ log = logging.getLogger(__name__)
|
||||
|
||||
__default_settings__ = {
|
||||
u'custom/db type': u'sqlite',
|
||||
u'custom/status': PluginStatus.Inactive,
|
||||
u'custom/last search type': CustomSearch.Titles,
|
||||
u'custom/display footer': True,
|
||||
u'custom/add custom from service': True
|
||||
|
@ -31,15 +31,14 @@ from PyQt4 import QtCore, QtGui
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, ImageSource, Settings, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, ImageSource, Settings
|
||||
from openlp.plugins.images.lib import ImageMediaItem, ImageTab
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__default_settings__ = {
|
||||
u'images/images count': 0,
|
||||
u'images/background color': u'#000000',
|
||||
u'images/status': PluginStatus.Inactive
|
||||
u'images/background color': u'#000000'
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Settings
|
||||
from openlp.plugins.media.lib import MediaMediaItem, MediaTab
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -39,7 +39,6 @@ log = logging.getLogger(__name__)
|
||||
__default_settings__ = {
|
||||
u'media/media count': 0,
|
||||
u'media/media auto start': QtCore.Qt.Unchecked,
|
||||
u'media/status': PluginStatus.Inactive
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate
|
||||
from openlp.core.utils import AppLocation
|
||||
from openlp.plugins.presentations.lib import PresentationController, \
|
||||
PresentationMediaItem, PresentationTab
|
||||
@ -47,7 +47,6 @@ __default_settings__ = {
|
||||
u'presentations/override app': QtCore.Qt.Unchecked,
|
||||
u'presentations/presentations count': 0,
|
||||
u'presentations/Powerpoint': 2,
|
||||
u'presentations/status': PluginStatus.Inactive,
|
||||
u'presentations/Powerpoint Viewer': 2
|
||||
}
|
||||
|
||||
|
@ -29,14 +29,13 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, translate, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, StringContent, translate, build_icon
|
||||
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
__default_settings__ = {
|
||||
u'remotes/twelve hour': True,
|
||||
u'remotes/status': PluginStatus.Inactive,
|
||||
u'remotes/port': 4316,
|
||||
u'remotes/ip address': u'0.0.0.0'
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ import sqlite3
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, PluginStatus, UiStrings
|
||||
from openlp.core.lib import Plugin, StringContent, build_icon, translate, Receiver, UiStrings
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.utils import get_filesystem_encoding
|
||||
@ -48,7 +48,6 @@ from openlp.plugins.songs.lib.olpimport import OpenLPSongImport
|
||||
log = logging.getLogger(__name__)
|
||||
__default_settings__ = {
|
||||
u'songs/db type': u'sqlite',
|
||||
u'songs/status': PluginStatus.Inactive,
|
||||
u'songs/last search type': SongSearch.Entire,
|
||||
u'songs/last import type': SongFormat.OpenLyrics,
|
||||
u'songs/update service on edit': False,
|
||||
|
@ -32,7 +32,7 @@ from datetime import datetime
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import build_icon, Plugin, Receiver, Settings, StringContent, translate, PluginStatus
|
||||
from openlp.core.lib import build_icon, Plugin, Receiver, Settings, StringContent, translate
|
||||
from openlp.core.lib.db import Manager
|
||||
from openlp.core.lib.ui import create_action
|
||||
from openlp.core.utils.actions import ActionList
|
||||
@ -44,7 +44,6 @@ log = logging.getLogger(__name__)
|
||||
|
||||
__default_settings__ = {
|
||||
u'songusage/db type': u'sqlite',
|
||||
u'songusage/status': PluginStatus.Inactive,
|
||||
u'songusage/active': False,
|
||||
u'songusage/to date': QtCore.QDate.currentDate(),
|
||||
u'songusage/from date': QtCore.QDate.currentDate().addYears(-1)
|
||||
|
Loading…
Reference in New Issue
Block a user