forked from openlp/openlp
add a dialog at startup which inform the user that the bible format has changed and provide a possibility to upgrade
small cleanup
This commit is contained in:
parent
b9204fa62b
commit
4bee8ca5f6
15
openlp.pyw
15
openlp.pyw
@ -37,7 +37,8 @@ from traceback import format_exception
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, check_directory_exists
|
from openlp.core.lib import Receiver, check_directory_exists, SettingsManager, \
|
||||||
|
translate
|
||||||
from openlp.core.lib.ui import UiStrings
|
from openlp.core.lib.ui import UiStrings
|
||||||
from openlp.core.resources import qInitResources
|
from openlp.core.resources import qInitResources
|
||||||
from openlp.core.ui.mainwindow import MainWindow
|
from openlp.core.ui.mainwindow import MainWindow
|
||||||
@ -130,6 +131,18 @@ class OpenLP(QtGui.QApplication):
|
|||||||
u'general/update check', QtCore.QVariant(True)).toBool()
|
u'general/update check', QtCore.QVariant(True)).toBool()
|
||||||
if update_check:
|
if update_check:
|
||||||
VersionThread(self.mainWindow).start()
|
VersionThread(self.mainWindow).start()
|
||||||
|
for plugin in self.mainWindow.pluginManager.plugins:
|
||||||
|
if plugin.name == u'Bibles' and plugin.isActive() and len(
|
||||||
|
SettingsManager.get_files(u'bibles/bibles', u'.sqlite')) == 0 \
|
||||||
|
and len(SettingsManager.get_files(u'bibles', u'.sqlite')) > 0:
|
||||||
|
if QtGui.QMessageBox.information(self.mainWindow,
|
||||||
|
translate('OpenLP', 'Information'), translate('OpenLP',
|
||||||
|
'Bible format has changed.\nYou have to upgrade your '
|
||||||
|
'existing bibles.\nShould OpenLP upgrade now?'),
|
||||||
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||||
|
QtGui.QMessageBox.No)) == QtGui.QMessageBox.Yes:
|
||||||
|
plugin.onToolsUpgradeItemTriggered()
|
||||||
|
break
|
||||||
DelayStartThread(self.mainWindow).start()
|
DelayStartThread(self.mainWindow).start()
|
||||||
return self.exec_()
|
return self.exec_()
|
||||||
|
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
The bible import functions for OpenLP
|
The bible import functions for OpenLP
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
#import os
|
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user