forked from openlp/openlp
Headr1514
This commit is contained in:
commit
776dc06814
10
openlp.pyw
10
openlp.pyw
@ -241,8 +241,14 @@ def main():
|
|||||||
+ "/qt4_plugins")
|
+ "/qt4_plugins")
|
||||||
# i18n Set Language
|
# i18n Set Language
|
||||||
language = LanguageManager.get_language()
|
language = LanguageManager.get_language()
|
||||||
appTranslator = LanguageManager.get_translator(language)
|
app_translator, default_translator = \
|
||||||
app.installTranslator(appTranslator)
|
LanguageManager.get_translator(language)
|
||||||
|
if not app_translator.isEmpty():
|
||||||
|
app.installTranslator(app_translator)
|
||||||
|
if not default_translator.isEmpty():
|
||||||
|
app.installTranslator(default_translator)
|
||||||
|
else:
|
||||||
|
log.debug(u'Could not find default_translator.')
|
||||||
if not options.no_error_form:
|
if not options.no_error_form:
|
||||||
sys.excepthook = app.hookException
|
sys.excepthook = app.hookException
|
||||||
sys.exit(app.run())
|
sys.exit(app.run())
|
||||||
|
@ -37,6 +37,7 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
base_html_expands = []
|
base_html_expands = []
|
||||||
|
|
||||||
|
# Hex Color tags from http://www.w3schools.com/html/html_colornames.asp
|
||||||
base_html_expands.append({u'desc': u'Red', u'start tag': u'{r}',
|
base_html_expands.append({u'desc': u'Red', u'start tag': u'{r}',
|
||||||
u'start html': u'<span style="-webkit-text-fill-color:red">',
|
u'start html': u'<span style="-webkit-text-fill-color:red">',
|
||||||
u'end tag': u'{/r}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/r}', u'end html': u'</span>', u'protected': True})
|
||||||
@ -53,13 +54,13 @@ base_html_expands.append({u'desc': u'Green', u'start tag': u'{g}',
|
|||||||
u'start html': u'<span style="-webkit-text-fill-color:green">',
|
u'start html': u'<span style="-webkit-text-fill-color:green">',
|
||||||
u'end tag': u'{/g}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/g}', u'end html': u'</span>', u'protected': True})
|
||||||
base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}',
|
base_html_expands.append({u'desc': u'Pink', u'start tag': u'{pk}',
|
||||||
u'start html': u'<span style="-webkit-text-fill-color:#CC33CC">',
|
u'start html': u'<span style="-webkit-text-fill-color:#FFC0CB">',
|
||||||
u'end tag': u'{/pk}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/pk}', u'end html': u'</span>', u'protected': True})
|
||||||
base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}',
|
base_html_expands.append({u'desc': u'Orange', u'start tag': u'{o}',
|
||||||
u'start html': u'<span style="-webkit-text-fill-color:#CC0033">',
|
u'start html': u'<span style="-webkit-text-fill-color:#FFA500">',
|
||||||
u'end tag': u'{/o}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/o}', u'end html': u'</span>', u'protected': True})
|
||||||
base_html_expands.append({u'desc': u'Purple', u'start tag': u'{pp}',
|
base_html_expands.append({u'desc': u'Purple', u'start tag': u'{pp}',
|
||||||
u'start html': u'<span style="-webkit-text-fill-color:#9900FF">',
|
u'start html': u'<span style="-webkit-text-fill-color:#800080">',
|
||||||
u'end tag': u'{/pp}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/pp}', u'end html': u'</span>', u'protected': True})
|
||||||
base_html_expands.append({u'desc': u'White', u'start tag': u'{w}',
|
base_html_expands.append({u'desc': u'White', u'start tag': u'{w}',
|
||||||
u'start html': u'<span style="-webkit-text-fill-color:white">',
|
u'start html': u'<span style="-webkit-text-fill-color:white">',
|
||||||
@ -84,7 +85,8 @@ base_html_expands.append({u'desc': u'Underline', u'start tag': u'{u}',
|
|||||||
u'end tag': u'{/u}', u'end html': u'</span>', u'protected': True})
|
u'end tag': u'{/u}', u'end html': u'</span>', u'protected': True})
|
||||||
|
|
||||||
def translate(context, text, comment=None,
|
def translate(context, text, comment=None,
|
||||||
encoding=QtCore.QCoreApplication.CodecForTr, n=-1):
|
encoding=QtCore.QCoreApplication.CodecForTr, n=-1,
|
||||||
|
translate=QtCore.QCoreApplication.translate):
|
||||||
"""
|
"""
|
||||||
A special shortcut method to wrap around the Qt4 translation functions.
|
A special shortcut method to wrap around the Qt4 translation functions.
|
||||||
This abstracts the translation procedure so that we can change it if at a
|
This abstracts the translation procedure so that we can change it if at a
|
||||||
@ -101,8 +103,7 @@ def translate(context, text, comment=None,
|
|||||||
An identifying string for when the same text is used in different roles
|
An identifying string for when the same text is used in different roles
|
||||||
within the same context.
|
within the same context.
|
||||||
"""
|
"""
|
||||||
return QtCore.QCoreApplication.translate(
|
return translate(context, text, comment, encoding, n)
|
||||||
context, text, comment, encoding, n)
|
|
||||||
|
|
||||||
def get_text_file_string(text_file):
|
def get_text_file_string(text_file):
|
||||||
"""
|
"""
|
||||||
|
@ -28,6 +28,24 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.lib import translate, build_icon
|
from openlp.core.lib import translate, build_icon
|
||||||
|
|
||||||
|
class CaptureShortcutButton(QtGui.QPushButton):
|
||||||
|
"""
|
||||||
|
A class to encapsulate a ``QPushButton``.
|
||||||
|
"""
|
||||||
|
def __init__(self, *args):
|
||||||
|
QtGui.QPushButton.__init__(self, *args)
|
||||||
|
self.setCheckable(True)
|
||||||
|
|
||||||
|
def keyPressEvent(self, event):
|
||||||
|
"""
|
||||||
|
Block the ``Key_Space`` key, so that the button will not change the
|
||||||
|
checked state.
|
||||||
|
"""
|
||||||
|
if event.key() == QtCore.Qt.Key_Space and self.isChecked():
|
||||||
|
# Ignore the event, so that the parent can take care of this.
|
||||||
|
event.ignore()
|
||||||
|
|
||||||
|
|
||||||
class Ui_ShortcutListDialog(object):
|
class Ui_ShortcutListDialog(object):
|
||||||
def setupUi(self, shortcutListDialog):
|
def setupUi(self, shortcutListDialog):
|
||||||
shortcutListDialog.setObjectName(u'shortcutListDialog')
|
shortcutListDialog.setObjectName(u'shortcutListDialog')
|
||||||
@ -56,12 +74,11 @@ class Ui_ShortcutListDialog(object):
|
|||||||
self.detailsLayout.addWidget(self.customRadioButton, 1, 0, 1, 1)
|
self.detailsLayout.addWidget(self.customRadioButton, 1, 0, 1, 1)
|
||||||
self.primaryLayout = QtGui.QHBoxLayout()
|
self.primaryLayout = QtGui.QHBoxLayout()
|
||||||
self.primaryLayout.setObjectName(u'primaryLayout')
|
self.primaryLayout.setObjectName(u'primaryLayout')
|
||||||
self.primaryPushButton = QtGui.QPushButton(shortcutListDialog)
|
self.primaryPushButton = CaptureShortcutButton(shortcutListDialog)
|
||||||
self.primaryPushButton.setObjectName(u'primaryPushButton')
|
self.primaryPushButton.setObjectName(u'primaryPushButton')
|
||||||
self.primaryPushButton.setMinimumSize(QtCore.QSize(84, 0))
|
self.primaryPushButton.setMinimumSize(QtCore.QSize(84, 0))
|
||||||
self.primaryPushButton.setIcon(
|
self.primaryPushButton.setIcon(
|
||||||
build_icon(u':/system/system_configure_shortcuts.png'))
|
build_icon(u':/system/system_configure_shortcuts.png'))
|
||||||
self.primaryPushButton.setCheckable(True)
|
|
||||||
self.primaryLayout.addWidget(self.primaryPushButton)
|
self.primaryLayout.addWidget(self.primaryPushButton)
|
||||||
self.clearPrimaryButton = QtGui.QToolButton(shortcutListDialog)
|
self.clearPrimaryButton = QtGui.QToolButton(shortcutListDialog)
|
||||||
self.clearPrimaryButton.setObjectName(u'clearPrimaryButton')
|
self.clearPrimaryButton.setObjectName(u'clearPrimaryButton')
|
||||||
@ -72,9 +89,8 @@ class Ui_ShortcutListDialog(object):
|
|||||||
self.detailsLayout.addLayout(self.primaryLayout, 1, 1, 1, 1)
|
self.detailsLayout.addLayout(self.primaryLayout, 1, 1, 1, 1)
|
||||||
self.alternateLayout = QtGui.QHBoxLayout()
|
self.alternateLayout = QtGui.QHBoxLayout()
|
||||||
self.alternateLayout.setObjectName(u'alternateLayout')
|
self.alternateLayout.setObjectName(u'alternateLayout')
|
||||||
self.alternatePushButton = QtGui.QPushButton(shortcutListDialog)
|
self.alternatePushButton = CaptureShortcutButton(shortcutListDialog)
|
||||||
self.alternatePushButton.setObjectName(u'alternatePushButton')
|
self.alternatePushButton.setObjectName(u'alternatePushButton')
|
||||||
self.alternatePushButton.setCheckable(True)
|
|
||||||
self.alternatePushButton.setIcon(
|
self.alternatePushButton.setIcon(
|
||||||
build_icon(u':/system/system_configure_shortcuts.png'))
|
build_icon(u':/system/system_configure_shortcuts.png'))
|
||||||
self.alternateLayout.addWidget(self.alternatePushButton)
|
self.alternateLayout.addWidget(self.alternatePushButton)
|
||||||
|
@ -71,7 +71,9 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
QtCore.SIGNAL(u'clicked(bool)'), self.onCustomRadioButtonClicked)
|
QtCore.SIGNAL(u'clicked(bool)'), self.onCustomRadioButtonClicked)
|
||||||
|
|
||||||
def keyPressEvent(self, event):
|
def keyPressEvent(self, event):
|
||||||
if self.primaryPushButton.isChecked() or \
|
if event.key() == QtCore.Qt.Key_Space:
|
||||||
|
self.keyReleaseEvent(event)
|
||||||
|
elif self.primaryPushButton.isChecked() or \
|
||||||
self.alternatePushButton.isChecked():
|
self.alternatePushButton.isChecked():
|
||||||
event.ignore()
|
event.ignore()
|
||||||
elif event.key() == QtCore.Qt.Key_Escape:
|
elif event.key() == QtCore.Qt.Key_Escape:
|
||||||
@ -163,6 +165,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
self.customRadioButton.setChecked(True)
|
self.customRadioButton.setChecked(True)
|
||||||
if toggled:
|
if toggled:
|
||||||
self.alternatePushButton.setChecked(False)
|
self.alternatePushButton.setChecked(False)
|
||||||
|
self.primaryPushButton.setText(u'')
|
||||||
return
|
return
|
||||||
action = self._currentItemAction()
|
action = self._currentItemAction()
|
||||||
if action is None:
|
if action is None:
|
||||||
@ -181,6 +184,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
self.customRadioButton.setChecked(True)
|
self.customRadioButton.setChecked(True)
|
||||||
if toggled:
|
if toggled:
|
||||||
self.primaryPushButton.setChecked(False)
|
self.primaryPushButton.setChecked(False)
|
||||||
|
self.alternatePushButton.setText(u'')
|
||||||
return
|
return
|
||||||
action = self._currentItemAction()
|
action = self._currentItemAction()
|
||||||
if action is None:
|
if action is None:
|
||||||
@ -211,10 +215,11 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
self.primaryPushButton.setChecked(column in [0, 1])
|
self.primaryPushButton.setChecked(column in [0, 1])
|
||||||
self.alternatePushButton.setChecked(column not in [0, 1])
|
self.alternatePushButton.setChecked(column not in [0, 1])
|
||||||
if column in [0, 1]:
|
if column in [0, 1]:
|
||||||
|
self.primaryPushButton.setText(u'')
|
||||||
self.primaryPushButton.setFocus(QtCore.Qt.OtherFocusReason)
|
self.primaryPushButton.setFocus(QtCore.Qt.OtherFocusReason)
|
||||||
else:
|
else:
|
||||||
|
self.alternatePushButton.setText(u'')
|
||||||
self.alternatePushButton.setFocus(QtCore.Qt.OtherFocusReason)
|
self.alternatePushButton.setFocus(QtCore.Qt.OtherFocusReason)
|
||||||
self.onCurrentItemChanged(item)
|
|
||||||
|
|
||||||
def onCurrentItemChanged(self, item=None, previousItem=None):
|
def onCurrentItemChanged(self, item=None, previousItem=None):
|
||||||
"""
|
"""
|
||||||
@ -247,6 +252,12 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog):
|
|||||||
elif len(shortcuts) == 2:
|
elif len(shortcuts) == 2:
|
||||||
primary_text = shortcuts[0].toString()
|
primary_text = shortcuts[0].toString()
|
||||||
alternate_text = shortcuts[1].toString()
|
alternate_text = shortcuts[1].toString()
|
||||||
|
# When we are capturing a new shortcut, we do not want, the buttons to
|
||||||
|
# display the current shortcut.
|
||||||
|
if self.primaryPushButton.isChecked():
|
||||||
|
primary_text = u''
|
||||||
|
if self.alternatePushButton.isChecked():
|
||||||
|
alternate_text = u''
|
||||||
self.primaryPushButton.setText(primary_text)
|
self.primaryPushButton.setText(primary_text)
|
||||||
self.alternatePushButton.setText(alternate_text)
|
self.alternatePushButton.setText(alternate_text)
|
||||||
self.primaryLabel.setText(primary_label_text)
|
self.primaryLabel.setText(primary_label_text)
|
||||||
|
@ -28,6 +28,7 @@ The :mod:`languagemanager` module provides all the translation settings and
|
|||||||
language file loading for OpenLP.
|
language file loading for OpenLP.
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
@ -55,8 +56,14 @@ class LanguageManager(object):
|
|||||||
language = QtCore.QLocale.system().name()
|
language = QtCore.QLocale.system().name()
|
||||||
lang_path = AppLocation.get_directory(AppLocation.LanguageDir)
|
lang_path = AppLocation.get_directory(AppLocation.LanguageDir)
|
||||||
app_translator = QtCore.QTranslator()
|
app_translator = QtCore.QTranslator()
|
||||||
if app_translator.load(language, lang_path):
|
app_translator.load(language, lang_path)
|
||||||
return app_translator
|
# A translator for buttons and other default strings provided by Qt.
|
||||||
|
if sys.platform != u'win32' and sys.platform != u'darwin':
|
||||||
|
lang_path = QtCore.QLibraryInfo.location(
|
||||||
|
QtCore.QLibraryInfo.TranslationsPath)
|
||||||
|
default_translator = QtCore.QTranslator()
|
||||||
|
default_translator.load(u'qt_%s' % language, lang_path)
|
||||||
|
return app_translator, default_translator
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def find_qm_files():
|
def find_qm_files():
|
||||||
|
@ -72,76 +72,85 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.hasDeleteIcon = False
|
self.hasDeleteIcon = False
|
||||||
self.addToServiceItem = False
|
self.addToServiceItem = False
|
||||||
|
|
||||||
|
def addSearchTab(self, prefix, name):
|
||||||
|
"""
|
||||||
|
Creates and adds generic search tab.
|
||||||
|
|
||||||
|
``prefix``
|
||||||
|
The prefix of the tab, this is either ``quick`` or ``advanced``.
|
||||||
|
|
||||||
|
``name``
|
||||||
|
The translated string to display.
|
||||||
|
"""
|
||||||
|
tab = QtGui.QWidget()
|
||||||
|
tab.setObjectName(prefix + u'Tab')
|
||||||
|
layout = QtGui.QGridLayout(tab)
|
||||||
|
layout.setObjectName(prefix + u'Layout')
|
||||||
|
versionLabel = QtGui.QLabel(tab)
|
||||||
|
versionLabel.setObjectName(prefix + u'VersionLabel')
|
||||||
|
layout.addWidget(versionLabel, 0, 0, QtCore.Qt.AlignRight)
|
||||||
|
versionComboBox = media_item_combo_box(tab, prefix + u'VersionComboBox')
|
||||||
|
versionLabel.setBuddy(versionComboBox)
|
||||||
|
layout.addWidget(versionComboBox, 0, 1, 1, 2)
|
||||||
|
secondLabel = QtGui.QLabel(tab)
|
||||||
|
secondLabel.setObjectName(prefix + u'SecondLabel')
|
||||||
|
layout.addWidget(secondLabel, 1, 0, QtCore.Qt.AlignRight)
|
||||||
|
secondComboBox = media_item_combo_box(tab, prefix + u'SecondComboBox')
|
||||||
|
versionLabel.setBuddy(secondComboBox)
|
||||||
|
layout.addWidget(secondComboBox, 1, 1, 1, 2)
|
||||||
|
searchButtonLayout = QtGui.QHBoxLayout()
|
||||||
|
searchButtonLayout.setObjectName(prefix + u'SearchButtonLayout')
|
||||||
|
searchButtonLayout.addStretch()
|
||||||
|
searchButton = QtGui.QPushButton(tab)
|
||||||
|
searchButton.setObjectName(prefix + u'SearchButton')
|
||||||
|
searchButtonLayout.addWidget(searchButton)
|
||||||
|
self.searchTabWidget.addTab(tab, name)
|
||||||
|
setattr(self, prefix + u'Tab', tab)
|
||||||
|
setattr(self, prefix + u'Layout', layout)
|
||||||
|
setattr(self, prefix + u'VersionLabel', versionLabel)
|
||||||
|
setattr(self, prefix + u'VersionComboBox', versionComboBox)
|
||||||
|
setattr(self, prefix + u'SecondLabel', secondLabel)
|
||||||
|
setattr(self, prefix + u'SecondComboBox', secondComboBox)
|
||||||
|
setattr(self, prefix + u'SearchButtonLayout', searchButtonLayout)
|
||||||
|
setattr(self, prefix + u'SearchButton', searchButton)
|
||||||
|
|
||||||
def addEndHeaderBar(self):
|
def addEndHeaderBar(self):
|
||||||
self.searchTabWidget = QtGui.QTabWidget(self)
|
self.searchTabWidget = QtGui.QTabWidget(self)
|
||||||
self.searchTabWidget.setSizePolicy(
|
self.searchTabWidget.setSizePolicy(
|
||||||
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
|
||||||
self.searchTabWidget.setObjectName(u'SearchTabWidget')
|
self.searchTabWidget.setObjectName(u'searchTabWidget')
|
||||||
# Add the Quick Search tab.
|
# Add the Quick Search tab.
|
||||||
self.quickTab = QtGui.QWidget()
|
self.addSearchTab(
|
||||||
self.quickTab.setObjectName(u'quickTab')
|
u'quick', translate('BiblesPlugin.MediaItem', 'Quick'))
|
||||||
self.quickLayout = QtGui.QFormLayout(self.quickTab)
|
|
||||||
self.quickLayout.setObjectName(u'quickLayout')
|
|
||||||
self.quickVersionLabel = QtGui.QLabel(self.quickTab)
|
|
||||||
self.quickVersionLabel.setObjectName(u'quickVersionLabel')
|
|
||||||
self.quickVersionComboBox = media_item_combo_box(self.quickTab,
|
|
||||||
u'quickVersionComboBox')
|
|
||||||
self.quickVersionLabel.setBuddy(self.quickVersionComboBox)
|
|
||||||
self.quickLayout.addRow(self.quickVersionLabel,
|
|
||||||
self.quickVersionComboBox)
|
|
||||||
self.quickSecondLabel = QtGui.QLabel(self.quickTab)
|
|
||||||
self.quickSecondLabel.setObjectName(u'quickSecondLabel')
|
|
||||||
self.quickSecondComboBox = media_item_combo_box(self.quickTab,
|
|
||||||
u'quickSecondComboBox')
|
|
||||||
self.quickSecondLabel.setBuddy(self.quickSecondComboBox)
|
|
||||||
self.quickLayout.addRow(self.quickSecondLabel, self.quickSecondComboBox)
|
|
||||||
self.quickSearchLabel = QtGui.QLabel(self.quickTab)
|
self.quickSearchLabel = QtGui.QLabel(self.quickTab)
|
||||||
self.quickSearchLabel.setObjectName(u'quickSearchLabel')
|
self.quickSearchLabel.setObjectName(u'quickSearchLabel')
|
||||||
|
self.quickLayout.addWidget(
|
||||||
|
self.quickSearchLabel, 2, 0, QtCore.Qt.AlignRight)
|
||||||
self.quickSearchEdit = SearchEdit(self.quickTab)
|
self.quickSearchEdit = SearchEdit(self.quickTab)
|
||||||
self.quickSearchEdit.setObjectName(u'quickSearchEdit')
|
self.quickSearchEdit.setObjectName(u'quickSearchEdit')
|
||||||
self.quickSearchLabel.setBuddy(self.quickSearchEdit)
|
self.quickSearchLabel.setBuddy(self.quickSearchEdit)
|
||||||
self.quickLayout.addRow(self.quickSearchLabel, self.quickSearchEdit)
|
self.quickLayout.addWidget(self.quickSearchEdit, 2, 1, 1, 2)
|
||||||
self.quickLayoutLabel = QtGui.QLabel(self.quickTab)
|
self.quickLayoutLabel = QtGui.QLabel(self.quickTab)
|
||||||
self.quickLayoutLabel.setObjectName(u'quickClearLabel')
|
self.quickLayoutLabel.setObjectName(u'quickClearLabel')
|
||||||
|
self.quickLayout.addWidget(
|
||||||
|
self.quickLayoutLabel, 3, 0, QtCore.Qt.AlignRight)
|
||||||
self.quickLayoutComboBox = media_item_combo_box(self.quickTab,
|
self.quickLayoutComboBox = media_item_combo_box(self.quickTab,
|
||||||
u'quickLayoutComboBox')
|
u'quickLayoutComboBox')
|
||||||
self.quickLayoutComboBox.addItems([u'', u'', u''])
|
self.quickLayoutComboBox.addItems([u'', u'', u''])
|
||||||
self.quickLayout.addRow(self.quickLayoutLabel, self.quickLayoutComboBox)
|
self.quickLayout.addWidget(self.quickLayoutComboBox, 3, 1, 1, 2)
|
||||||
self.quickClearLabel = QtGui.QLabel(self.quickTab)
|
self.quickClearLabel = QtGui.QLabel(self.quickTab)
|
||||||
self.quickClearLabel.setObjectName(u'quickClearLabel')
|
self.quickClearLabel.setObjectName(u'quickClearLabel')
|
||||||
|
self.quickLayout.addWidget(
|
||||||
|
self.quickClearLabel, 4, 0, QtCore.Qt.AlignRight)
|
||||||
self.quickClearComboBox = media_item_combo_box(self.quickTab,
|
self.quickClearComboBox = media_item_combo_box(self.quickTab,
|
||||||
u'quickClearComboBox')
|
u'quickClearComboBox')
|
||||||
self.quickLayout.addRow(self.quickClearLabel, self.quickClearComboBox)
|
self.quickLayout.addWidget(self.quickClearComboBox, 4, 1, 1, 2)
|
||||||
self.quickSearchButtonLayout = QtGui.QHBoxLayout()
|
self.quickLayout.addLayout(self.quickSearchButtonLayout, 6, 1, 1, 2)
|
||||||
self.quickSearchButtonLayout.setObjectName(u'quickSearchButtonLayout')
|
# Add a QWidget, so that the quick tab has as many rows as the advanced
|
||||||
self.quickSearchButtonLayout.addStretch()
|
# tab.
|
||||||
self.quickSearchButton = QtGui.QPushButton(self.quickTab)
|
self.quickLayout.addWidget(QtGui.QWidget(), 7, 0)
|
||||||
self.quickSearchButton.setObjectName(u'quickSearchButton')
|
|
||||||
self.quickSearchButtonLayout.addWidget(self.quickSearchButton)
|
|
||||||
self.quickLayout.addRow(self.quickSearchButtonLayout)
|
|
||||||
self.searchTabWidget.addTab(self.quickTab,
|
|
||||||
translate('BiblesPlugin.MediaItem', 'Quick'))
|
|
||||||
# Add the Advanced Search tab.
|
# Add the Advanced Search tab.
|
||||||
self.advancedTab = QtGui.QWidget()
|
self.addSearchTab(u'advanced', UiStrings().Advanced)
|
||||||
self.advancedTab.setObjectName(u'advancedTab')
|
|
||||||
self.advancedLayout = QtGui.QGridLayout(self.advancedTab)
|
|
||||||
self.advancedLayout.setObjectName(u'advancedLayout')
|
|
||||||
self.advancedVersionLabel = QtGui.QLabel(self.advancedTab)
|
|
||||||
self.advancedVersionLabel.setObjectName(u'advancedVersionLabel')
|
|
||||||
self.advancedLayout.addWidget(self.advancedVersionLabel, 0, 0,
|
|
||||||
QtCore.Qt.AlignRight)
|
|
||||||
self.advancedVersionComboBox = media_item_combo_box(self.advancedTab,
|
|
||||||
u'advancedVersionComboBox')
|
|
||||||
self.advancedVersionLabel.setBuddy(self.advancedVersionComboBox)
|
|
||||||
self.advancedLayout.addWidget(self.advancedVersionComboBox, 0, 1, 1, 2)
|
|
||||||
self.advancedSecondLabel = QtGui.QLabel(self.advancedTab)
|
|
||||||
self.advancedSecondLabel.setObjectName(u'advancedSecondLabel')
|
|
||||||
self.advancedLayout.addWidget(self.advancedSecondLabel, 1, 0,
|
|
||||||
QtCore.Qt.AlignRight)
|
|
||||||
self.advancedSecondComboBox = media_item_combo_box(self.advancedTab,
|
|
||||||
u'advancedSecondComboBox')
|
|
||||||
self.advancedSecondLabel.setBuddy(self.advancedSecondComboBox)
|
|
||||||
self.advancedLayout.addWidget(self.advancedSecondComboBox, 1, 1, 1, 2)
|
|
||||||
self.advancedBookLabel = QtGui.QLabel(self.advancedTab)
|
self.advancedBookLabel = QtGui.QLabel(self.advancedTab)
|
||||||
self.advancedBookLabel.setObjectName(u'advancedBookLabel')
|
self.advancedBookLabel.setObjectName(u'advancedBookLabel')
|
||||||
self.advancedLayout.addWidget(self.advancedBookLabel, 2, 0,
|
self.advancedLayout.addWidget(self.advancedBookLabel, 2, 0,
|
||||||
@ -152,7 +161,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
self.advancedLayout.addWidget(self.advancedBookComboBox, 2, 1, 1, 2)
|
self.advancedLayout.addWidget(self.advancedBookComboBox, 2, 1, 1, 2)
|
||||||
self.advancedChapterLabel = QtGui.QLabel(self.advancedTab)
|
self.advancedChapterLabel = QtGui.QLabel(self.advancedTab)
|
||||||
self.advancedChapterLabel.setObjectName(u'advancedChapterLabel')
|
self.advancedChapterLabel.setObjectName(u'advancedChapterLabel')
|
||||||
self.advancedLayout.addWidget(self.advancedChapterLabel, 3, 1)
|
self.advancedLayout.addWidget(self.advancedChapterLabel, 3, 1, 1, 2)
|
||||||
self.advancedVerseLabel = QtGui.QLabel(self.advancedTab)
|
self.advancedVerseLabel = QtGui.QLabel(self.advancedTab)
|
||||||
self.advancedVerseLabel.setObjectName(u'advancedVerseLabel')
|
self.advancedVerseLabel.setObjectName(u'advancedVerseLabel')
|
||||||
self.advancedLayout.addWidget(self.advancedVerseLabel, 3, 2)
|
self.advancedLayout.addWidget(self.advancedVerseLabel, 3, 2)
|
||||||
@ -184,16 +193,8 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
u'advancedClearComboBox')
|
u'advancedClearComboBox')
|
||||||
self.advancedClearLabel.setBuddy(self.advancedClearComboBox)
|
self.advancedClearLabel.setBuddy(self.advancedClearComboBox)
|
||||||
self.advancedLayout.addWidget(self.advancedClearComboBox, 6, 1, 1, 2)
|
self.advancedLayout.addWidget(self.advancedClearComboBox, 6, 1, 1, 2)
|
||||||
self.advancedSearchButtonLayout = QtGui.QHBoxLayout()
|
|
||||||
self.advancedSearchButtonLayout.setObjectName(
|
|
||||||
u'advancedSearchButtonLayout')
|
|
||||||
self.advancedSearchButtonLayout.addStretch()
|
|
||||||
self.advancedSearchButton = QtGui.QPushButton(self.advancedTab)
|
|
||||||
self.advancedSearchButton.setObjectName(u'advancedSearchButton')
|
|
||||||
self.advancedSearchButtonLayout.addWidget(self.advancedSearchButton)
|
|
||||||
self.advancedLayout.addLayout(
|
self.advancedLayout.addLayout(
|
||||||
self.advancedSearchButtonLayout, 7, 0, 1, 3)
|
self.advancedSearchButtonLayout, 7, 0, 1, 3)
|
||||||
self.searchTabWidget.addTab(self.advancedTab, UiStrings().Advanced)
|
|
||||||
# Add the search tab widget to the page layout.
|
# Add the search tab widget to the page layout.
|
||||||
self.pageLayout.addWidget(self.searchTabWidget)
|
self.pageLayout.addWidget(self.searchTabWidget)
|
||||||
# Combo Boxes
|
# Combo Boxes
|
||||||
@ -213,7 +214,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
QtCore.SIGNAL(u'activated(int)'), self.updateAutoCompleter)
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.quickLayoutComboBox, QtCore.SIGNAL(u'activated(int)'),
|
self.quickLayoutComboBox, QtCore.SIGNAL(u'activated(int)'),
|
||||||
self.onlayoutStyleComboBoxChanged)
|
self.onLayoutStyleComboBoxChanged)
|
||||||
# Buttons
|
# Buttons
|
||||||
QtCore.QObject.connect(self.advancedSearchButton,
|
QtCore.QObject.connect(self.advancedSearchButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onAdvancedSearchButton)
|
QtCore.SIGNAL(u'pressed()'), self.onAdvancedSearchButton)
|
||||||
@ -844,7 +845,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
return u'{su}[%s]{/su}' % verse_text
|
return u'{su}[%s]{/su}' % verse_text
|
||||||
return u'{su}%s{/su}' % verse_text
|
return u'{su}%s{/su}' % verse_text
|
||||||
|
|
||||||
def onlayoutStyleComboBoxChanged(self):
|
def onLayoutStyleComboBoxChanged(self):
|
||||||
self.settings.layout_style = self.quickLayoutComboBox.currentIndex()
|
self.settings.layout_style = self.quickLayoutComboBox.currentIndex()
|
||||||
self.settings.layoutStyleComboBox.setCurrentIndex(
|
self.settings.layoutStyleComboBox.setCurrentIndex(
|
||||||
self.settings.layout_style)
|
self.settings.layout_style)
|
||||||
|
1683
resources/i18n/af.ts
1683
resources/i18n/af.ts
File diff suppressed because it is too large
Load Diff
3584
resources/i18n/cs.ts
3584
resources/i18n/cs.ts
File diff suppressed because it is too large
Load Diff
1602
resources/i18n/de.ts
1602
resources/i18n/de.ts
File diff suppressed because it is too large
Load Diff
1491
resources/i18n/en.ts
1491
resources/i18n/en.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1491
resources/i18n/es.ts
1491
resources/i18n/es.ts
File diff suppressed because it is too large
Load Diff
1495
resources/i18n/et.ts
1495
resources/i18n/et.ts
File diff suppressed because it is too large
Load Diff
1491
resources/i18n/fr.ts
1491
resources/i18n/fr.ts
File diff suppressed because it is too large
Load Diff
1559
resources/i18n/hu.ts
1559
resources/i18n/hu.ts
File diff suppressed because it is too large
Load Diff
2699
resources/i18n/id.ts
2699
resources/i18n/id.ts
File diff suppressed because it is too large
Load Diff
1495
resources/i18n/ja.ts
1495
resources/i18n/ja.ts
File diff suppressed because it is too large
Load Diff
1491
resources/i18n/ko.ts
1491
resources/i18n/ko.ts
File diff suppressed because it is too large
Load Diff
1992
resources/i18n/nb.ts
1992
resources/i18n/nb.ts
File diff suppressed because it is too large
Load Diff
1495
resources/i18n/nl.ts
1495
resources/i18n/nl.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1495
resources/i18n/ru.ts
1495
resources/i18n/ru.ts
File diff suppressed because it is too large
Load Diff
1491
resources/i18n/sv.ts
1491
resources/i18n/sv.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user