forked from openlp/openlp
Fix database versions
This commit is contained in:
parent
0a5d089f07
commit
1239cd707c
@ -182,6 +182,7 @@ class Manager(object):
|
||||
settings.beginGroup(plugin_name)
|
||||
self.db_url = u''
|
||||
self.is_dirty = False
|
||||
self.session = None
|
||||
db_type = unicode(
|
||||
settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString())
|
||||
if db_type == u'sqlite':
|
||||
|
@ -158,6 +158,8 @@ class PluginManager(object):
|
||||
for plugin in self.plugins:
|
||||
if plugin.status is not PluginStatus.Disabled:
|
||||
plugin.settings_tab = plugin.getSettingsTab(settings_form)
|
||||
else:
|
||||
plugin.settings_tab = None
|
||||
settings_form.plugins = self.plugins
|
||||
|
||||
def hook_import_menu(self, import_menu):
|
||||
|
@ -117,6 +117,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||
self.pluginListWidget.currentItem().text().split(u'(')[0][:-1]
|
||||
self.activePlugin = None
|
||||
for plugin in self.parent().pluginManager.plugins:
|
||||
if plugin.status != PluginStatus.Disabled:
|
||||
if plugin.nameStrings[u'singular'] == plugin_name_singular:
|
||||
self.activePlugin = plugin
|
||||
break
|
||||
@ -126,7 +127,7 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
||||
self._clearDetails()
|
||||
|
||||
def onStatusComboBoxChanged(self, status):
|
||||
if self.programaticChange:
|
||||
if self.programaticChange or status == PluginStatus.Disabled:
|
||||
return
|
||||
if status == 0:
|
||||
Receiver.send_message(u'cursor_busy')
|
||||
|
@ -64,6 +64,9 @@ class SongsPlugin(Plugin):
|
||||
self.icon_path = u':/plugins/plugin_songs.png'
|
||||
self.icon = build_icon(self.icon_path)
|
||||
|
||||
def checkPreConditions(self):
|
||||
return not self.manager.session == None
|
||||
|
||||
def initialise(self):
|
||||
log.info(u'Songs Initialising')
|
||||
Plugin.initialise(self)
|
||||
|
Loading…
Reference in New Issue
Block a user