forked from openlp/openlp
r1390
This commit is contained in:
commit
88cfbf5d02
@ -33,8 +33,7 @@ from ConfigParser import SafeConfigParser
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate, PluginStatus, check_directory_exists, \
|
from openlp.core.lib import translate, PluginStatus, Receiver, build_icon
|
||||||
Receiver, build_icon
|
|
||||||
from openlp.core.utils import get_web_page, AppLocation
|
from openlp.core.utils import get_web_page, AppLocation
|
||||||
from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
|
from firsttimewizard import Ui_FirstTimeWizard, FirstTimePage
|
||||||
|
|
||||||
@ -95,7 +94,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
language = unicode(self.config.get(
|
language = unicode(self.config.get(
|
||||||
u'bibles_%s' % lang, u'title'), u'utf8')
|
u'bibles_%s' % lang, u'title'), u'utf8')
|
||||||
langItem = QtGui.QTreeWidgetItem(
|
langItem = QtGui.QTreeWidgetItem(
|
||||||
self.biblesTreeWidget, QtCore.QStringList(language))
|
self.biblesTreeWidget, QtCore.QStringList(language))
|
||||||
bibles = self.config.get(u'bibles_%s' % lang, u'translations')
|
bibles = self.config.get(u'bibles_%s' % lang, u'translations')
|
||||||
bibles = bibles.split(u',')
|
bibles = bibles.split(u',')
|
||||||
for bible in bibles:
|
for bible in bibles:
|
||||||
@ -104,8 +103,9 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
filename = unicode(self.config.get(
|
filename = unicode(self.config.get(
|
||||||
u'bible_%s' % bible, u'filename'))
|
u'bible_%s' % bible, u'filename'))
|
||||||
item = QtGui.QTreeWidgetItem(
|
item = QtGui.QTreeWidgetItem(
|
||||||
langItem, QtCore.QStringList(title))
|
langItem, QtCore.QStringList(title))
|
||||||
item.setData(0, QtCore.Qt.UserRole, QtCore.QVariant(filename))
|
item.setData(0, QtCore.Qt.UserRole,
|
||||||
|
QtCore.QVariant(filename))
|
||||||
item.setCheckState(0, QtCore.Qt.Unchecked)
|
item.setCheckState(0, QtCore.Qt.Unchecked)
|
||||||
item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
|
item.setFlags(item.flags() | QtCore.Qt.ItemIsUserCheckable)
|
||||||
self.biblesTreeWidget.expandAll()
|
self.biblesTreeWidget.expandAll()
|
||||||
@ -224,7 +224,8 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
'Enabling selected plugins...'))
|
'Enabling selected plugins...'))
|
||||||
self._setPluginStatus(self.songsCheckBox, u'songs/status')
|
self._setPluginStatus(self.songsCheckBox, u'songs/status')
|
||||||
self._setPluginStatus(self.bibleCheckBox, u'bibles/status')
|
self._setPluginStatus(self.bibleCheckBox, u'bibles/status')
|
||||||
self._setPluginStatus(self.presentationCheckBox, u'presentations/status')
|
self._setPluginStatus(self.presentationCheckBox,
|
||||||
|
u'presentations/status')
|
||||||
self._setPluginStatus(self.imageCheckBox, u'images/status')
|
self._setPluginStatus(self.imageCheckBox, u'images/status')
|
||||||
self._setPluginStatus(self.mediaCheckBox, u'media/status')
|
self._setPluginStatus(self.mediaCheckBox, u'media/status')
|
||||||
self._setPluginStatus(self.remoteCheckBox, u'remotes/status')
|
self._setPluginStatus(self.remoteCheckBox, u'remotes/status')
|
||||||
@ -276,4 +277,3 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
|
|||||||
status = PluginStatus.Active if field.checkState() \
|
status = PluginStatus.Active if field.checkState() \
|
||||||
== QtCore.Qt.Checked else PluginStatus.Inactive
|
== QtCore.Qt.Checked else PluginStatus.Inactive
|
||||||
QtCore.QSettings().setValue(tag, QtCore.QVariant(status))
|
QtCore.QSettings().setValue(tag, QtCore.QVariant(status))
|
||||||
|
|
||||||
|
@ -46,7 +46,8 @@ class Ui_FirstTimeLanguageDialog(object):
|
|||||||
self.languageLabel.setObjectName(u'languageLabel')
|
self.languageLabel.setObjectName(u'languageLabel')
|
||||||
self.languageLayout.addWidget(self.languageLabel)
|
self.languageLayout.addWidget(self.languageLabel)
|
||||||
self.languageComboBox = QtGui.QComboBox(languageDialog)
|
self.languageComboBox = QtGui.QComboBox(languageDialog)
|
||||||
self.languageComboBox.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
|
self.languageComboBox.setSizeAdjustPolicy(
|
||||||
|
QtGui.QComboBox.AdjustToContents)
|
||||||
self.languageComboBox.setObjectName("languageComboBox")
|
self.languageComboBox.setObjectName("languageComboBox")
|
||||||
self.languageLayout.addWidget(self.languageComboBox)
|
self.languageLayout.addWidget(self.languageComboBox)
|
||||||
self.dialogLayout.addLayout(self.languageLayout)
|
self.dialogLayout.addLayout(self.languageLayout)
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
from openlp.core.utils import LanguageManager
|
from openlp.core.utils import LanguageManager
|
||||||
from firsttimelanguagedialog import Ui_FirstTimeLanguageDialog
|
from firsttimelanguagedialog import Ui_FirstTimeLanguageDialog
|
||||||
|
|
||||||
|
@ -426,7 +426,7 @@ class MainDisplay(DisplayWidget):
|
|||||||
if self.hideMode:
|
if self.hideMode:
|
||||||
self.hideDisplay(self.hideMode)
|
self.hideDisplay(self.hideMode)
|
||||||
else:
|
else:
|
||||||
self.setVisible(True)
|
self.setVisible(True)
|
||||||
preview = QtGui.QImage(self.screen[u'size'].width(),
|
preview = QtGui.QImage(self.screen[u'size'].width(),
|
||||||
self.screen[u'size'].height(),
|
self.screen[u'size'].height(),
|
||||||
QtGui.QImage.Format_ARGB32_Premultiplied)
|
QtGui.QImage.Format_ARGB32_Premultiplied)
|
||||||
|
@ -227,6 +227,10 @@ class BGExtract(object):
|
|||||||
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
cleanup = [(re.compile('\s+'), lambda match: ' ')]
|
||||||
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
verses = BeautifulSoup(str(soup), markupMassage=cleanup)
|
||||||
verse_list = {}
|
verse_list = {}
|
||||||
|
# Cater for inconsistent mark up in the first verse of a chapter.
|
||||||
|
first_verse = verses.find(u'versenum')
|
||||||
|
if first_verse:
|
||||||
|
verse_list[1] = unicode(first_verse.contents[0])
|
||||||
for verse in verses(u'sup', u'versenum'):
|
for verse in verses(u'sup', u'versenum'):
|
||||||
raw_verse_num = verse.next
|
raw_verse_num = verse.next
|
||||||
clean_verse_num = 0
|
clean_verse_num = 0
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from songimport import SongImport
|
|
||||||
from oooimport import OooImport
|
from oooimport import OooImport
|
||||||
|
|
||||||
if os.name == u'nt':
|
if os.name == u'nt':
|
||||||
|
Loading…
Reference in New Issue
Block a user