forked from openlp/openlp
More button boxes and translations
This commit is contained in:
parent
fb97816711
commit
660028fd1e
@ -64,6 +64,10 @@ class UiStrings(object):
|
|||||||
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
|
||||||
Preview = translate('OpenLP.Ui', 'Preview')
|
Preview = translate('OpenLP.Ui', 'Preview')
|
||||||
PreviewSelect = unicode(translate('OpenLP.Ui', 'Preview the selected %s'))
|
PreviewSelect = unicode(translate('OpenLP.Ui', 'Preview the selected %s'))
|
||||||
|
ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
|
||||||
|
ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
|
||||||
|
ResetBG = translate('OpenLP.Ui', 'Reset Background')
|
||||||
|
ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
|
||||||
SendSelectLive = unicode(translate('OpenLP.Ui',
|
SendSelectLive = unicode(translate('OpenLP.Ui',
|
||||||
'Send the selected %s live'))
|
'Send the selected %s live'))
|
||||||
Service = translate('OpenLP.Ui', 'Service')
|
Service = translate('OpenLP.Ui', 'Service')
|
||||||
@ -98,18 +102,25 @@ def add_welcome_page(parent, image):
|
|||||||
parent.welcomeLayout.addStretch()
|
parent.welcomeLayout.addStretch()
|
||||||
parent.addPage(parent.welcomePage)
|
parent.addPage(parent.welcomePage)
|
||||||
|
|
||||||
def create_save_cancel_button_box(parent):
|
def create_accept_reject_button_box(parent, okay=False):
|
||||||
"""
|
"""
|
||||||
Creates a standard dialog button box with save and cancel buttons. The
|
Creates a standard dialog button box with two buttons. The buttons default
|
||||||
button box is connected to the parent's ``accept()`` and ``reject()``
|
to save and cancel but the ``okay`` parameter can be used to make the
|
||||||
|
buttons okay and cancel instead.
|
||||||
|
The button box is connected to the parent's ``accept()`` and ``reject()``
|
||||||
methods to handle the default ``accepted()`` and ``rejected()`` signals.
|
methods to handle the default ``accepted()`` and ``rejected()`` signals.
|
||||||
|
|
||||||
``parent``
|
``parent``
|
||||||
The parent object. This should be a ``QWidget`` descendant.
|
The parent object. This should be a ``QWidget`` descendant.
|
||||||
|
|
||||||
|
``okay``
|
||||||
|
If true creates an okay/cancel combination instead of save/cancel.
|
||||||
"""
|
"""
|
||||||
button_box = QtGui.QDialogButtonBox(parent)
|
button_box = QtGui.QDialogButtonBox(parent)
|
||||||
button_box.setStandardButtons(
|
accept_button = QtGui.QDialogButtonBox.Save
|
||||||
QtGui.QDialogButtonBox.Save | QtGui.QDialogButtonBox.Cancel)
|
if okay:
|
||||||
|
accept_button = QtGui.QDialogButtonBox.Ok
|
||||||
|
button_box.setStandardButtons(accept_button | QtGui.QDialogButtonBox.Cancel)
|
||||||
button_box.setObjectName(u'%sButtonBox' % parent)
|
button_box.setObjectName(u'%sButtonBox' % parent)
|
||||||
QtCore.QObject.connect(button_box, QtCore.SIGNAL(u'accepted()'),
|
QtCore.QObject.connect(button_box, QtCore.SIGNAL(u'accepted()'),
|
||||||
parent.accept)
|
parent.accept)
|
||||||
|
@ -176,8 +176,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
|||||||
self,translate('ImagePlugin.ExceptionDialog',
|
self,translate('ImagePlugin.ExceptionDialog',
|
||||||
'Select Attachment'),
|
'Select Attachment'),
|
||||||
SettingsManager.get_last_dir(u'exceptions'),
|
SettingsManager.get_last_dir(u'exceptions'),
|
||||||
u'%s (*.*) (*)' %
|
u'%s (*.*) (*)' % UiStrings.AllFiles)
|
||||||
unicode(translate('ImagePlugin.MediaItem', 'All Files')))
|
|
||||||
log.info(u'New files(s) %s', unicode(files))
|
log.info(u'New files(s) %s', unicode(files))
|
||||||
if files:
|
if files:
|
||||||
self.fileAttachment = unicode(files)
|
self.fileAttachment = unicode(files)
|
||||||
|
@ -27,30 +27,28 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_FileRenameDialog(object):
|
class Ui_FileRenameDialog(object):
|
||||||
def setupUi(self, FileRenameDialog):
|
def setupUi(self, fileRenameDialog):
|
||||||
FileRenameDialog.setObjectName(u'FileRenameDialog')
|
fileRenameDialog.setObjectName(u'fileRenameDialog')
|
||||||
FileRenameDialog.resize(300, 10)
|
fileRenameDialog.resize(300, 10)
|
||||||
self.dialogLayout = QtGui.QGridLayout(FileRenameDialog)
|
self.dialogLayout = QtGui.QGridLayout(fileRenameDialog)
|
||||||
self.dialogLayout.setObjectName(u'dialogLayout')
|
self.dialogLayout.setObjectName(u'dialogLayout')
|
||||||
self.fileNameLabel = QtGui.QLabel(FileRenameDialog)
|
self.fileNameLabel = QtGui.QLabel(fileRenameDialog)
|
||||||
self.fileNameLabel.setObjectName(u'fileNameLabel')
|
self.fileNameLabel.setObjectName(u'fileNameLabel')
|
||||||
self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
|
self.dialogLayout.addWidget(self.fileNameLabel, 0, 0)
|
||||||
self.fileNameEdit = QtGui.QLineEdit(FileRenameDialog)
|
self.fileNameEdit = QtGui.QLineEdit(fileRenameDialog)
|
||||||
self.fileNameEdit.setValidator(QtGui.QRegExpValidator(
|
self.fileNameEdit.setValidator(QtGui.QRegExpValidator(
|
||||||
QtCore.QRegExp(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
QtCore.QRegExp(r'[^/\\?*|<>\[\]":<>+%]+'), self))
|
||||||
self.fileNameEdit.setObjectName(u'fileNameEdit')
|
self.fileNameEdit.setObjectName(u'fileNameEdit')
|
||||||
self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
|
self.dialogLayout.addWidget(self.fileNameEdit, 0, 1)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(FileRenameDialog)
|
self.buttonBox = create_accept_reject_button_box(fileRenameDialog, True)
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
|
||||||
QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
|
||||||
self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
|
self.dialogLayout.addWidget(self.buttonBox, 1, 0, 1, 2)
|
||||||
self.retranslateUi(FileRenameDialog)
|
self.retranslateUi(fileRenameDialog)
|
||||||
self.setMaximumHeight(self.sizeHint().height())
|
self.setMaximumHeight(self.sizeHint().height())
|
||||||
QtCore.QMetaObject.connectSlotsByName(FileRenameDialog)
|
QtCore.QMetaObject.connectSlotsByName(fileRenameDialog)
|
||||||
|
|
||||||
def retranslateUi(self, FileRenameDialog):
|
def retranslateUi(self, fileRenameDialog):
|
||||||
self.fileNameLabel.setText(translate('OpenLP.FileRenameForm',
|
self.fileNameLabel.setText(translate('OpenLP.FileRenameForm',
|
||||||
'New File Name:'))
|
'New File Name:'))
|
||||||
|
@ -37,10 +37,6 @@ class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog):
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
QtGui.QDialog.__init__(self, parent)
|
QtGui.QDialog.__init__(self, parent)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
|
||||||
self.accept)
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
|
||||||
self.reject)
|
|
||||||
|
|
||||||
def exec_(self, copy=False):
|
def exec_(self, copy=False):
|
||||||
"""
|
"""
|
||||||
@ -51,5 +47,5 @@ class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog):
|
|||||||
'File Copy'))
|
'File Copy'))
|
||||||
else:
|
else:
|
||||||
self.setWindowTitle(translate('OpenLP.FileRenameForm',
|
self.setWindowTitle(translate('OpenLP.FileRenameForm',
|
||||||
'File Rename'))
|
'File Rename'))
|
||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box, \
|
from openlp.core.lib.ui import create_accept_reject_button_box, \
|
||||||
create_delete_push_button, create_up_down_push_button_set
|
create_delete_push_button, create_up_down_push_button_set
|
||||||
|
|
||||||
class Ui_ServiceItemEditDialog(object):
|
class Ui_ServiceItemEditDialog(object):
|
||||||
@ -50,7 +50,7 @@ class Ui_ServiceItemEditDialog(object):
|
|||||||
self.buttonLayout.addWidget(self.downButton)
|
self.buttonLayout.addWidget(self.downButton)
|
||||||
self.dialogLayout.addLayout(self.buttonLayout, 0, 1)
|
self.dialogLayout.addLayout(self.buttonLayout, 0, 1)
|
||||||
self.dialogLayout.addWidget(
|
self.dialogLayout.addWidget(
|
||||||
create_save_cancel_button_box(serviceItemEditDialog), 1, 0, 1, 2)
|
create_accept_reject_button_box(serviceItemEditDialog), 1, 0, 1, 2)
|
||||||
self.retranslateUi(serviceItemEditDialog)
|
self.retranslateUi(serviceItemEditDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(serviceItemEditDialog)
|
QtCore.QMetaObject.connectSlotsByName(serviceItemEditDialog)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class ServiceNoteForm(QtGui.QDialog):
|
class ServiceNoteForm(QtGui.QDialog):
|
||||||
"""
|
"""
|
||||||
@ -48,7 +48,7 @@ class ServiceNoteForm(QtGui.QDialog):
|
|||||||
self.textEdit = QtGui.QTextEdit(self)
|
self.textEdit = QtGui.QTextEdit(self)
|
||||||
self.textEdit.setObjectName(u'textEdit')
|
self.textEdit.setObjectName(u'textEdit')
|
||||||
self.dialogLayout.addWidget(self.textEdit)
|
self.dialogLayout.addWidget(self.textEdit)
|
||||||
self.dialogLayout.addWidget(create_save_cancel_button_box(self))
|
self.dialogLayout.addWidget(create_accept_reject_button_box(self))
|
||||||
QtCore.QMetaObject.connectSlotsByName(self)
|
QtCore.QMetaObject.connectSlotsByName(self)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate, build_icon
|
from openlp.core.lib import translate, build_icon
|
||||||
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_SettingsDialog(object):
|
class Ui_SettingsDialog(object):
|
||||||
def setupUi(self, settingsDialog):
|
def setupUi(self, settingsDialog):
|
||||||
@ -40,16 +41,9 @@ class Ui_SettingsDialog(object):
|
|||||||
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
|
self.settingsTabWidget = QtGui.QTabWidget(settingsDialog)
|
||||||
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
self.settingsTabWidget.setObjectName(u'settingsTabWidget')
|
||||||
self.settingsLayout.addWidget(self.settingsTabWidget)
|
self.settingsLayout.addWidget(self.settingsTabWidget)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(settingsDialog)
|
self.buttonBox = create_accept_reject_button_box(settingsDialog, True)
|
||||||
self.buttonBox.setStandardButtons(
|
|
||||||
QtGui.QDialogButtonBox.Cancel | QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
|
||||||
self.settingsLayout.addWidget(self.buttonBox)
|
self.settingsLayout.addWidget(self.buttonBox)
|
||||||
self.retranslateUi(settingsDialog)
|
self.retranslateUi(settingsDialog)
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
|
||||||
QtCore.SIGNAL(u'accepted()'), settingsDialog.accept)
|
|
||||||
QtCore.QObject.connect(self.buttonBox,
|
|
||||||
QtCore.SIGNAL(u'rejected()'), settingsDialog.reject)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
QtCore.QMetaObject.connectSlotsByName(settingsDialog)
|
||||||
|
|
||||||
def retranslateUi(self, settingsDialog):
|
def retranslateUi(self, settingsDialog):
|
||||||
|
@ -406,7 +406,7 @@ class ThemeManager(QtGui.QWidget):
|
|||||||
translate('OpenLP.ThemeManager', 'Select Theme Import File'),
|
translate('OpenLP.ThemeManager', 'Select Theme Import File'),
|
||||||
SettingsManager.get_last_dir(self.settingsSection),
|
SettingsManager.get_last_dir(self.settingsSection),
|
||||||
translate('OpenLP.ThemeManager', 'Theme v1 (*.theme);;'
|
translate('OpenLP.ThemeManager', 'Theme v1 (*.theme);;'
|
||||||
'Theme v2 (*.otz);;All Files (*.*)'))
|
'Theme v2 (*.otz);;%s (*.*)') % UiStrings.AllFiles)
|
||||||
log.info(u'New Themes %s', unicode(files))
|
log.info(u'New Themes %s', unicode(files))
|
||||||
if files:
|
if files:
|
||||||
for file in files:
|
for file in files:
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import build_icon, translate
|
from openlp.core.lib import build_icon, translate
|
||||||
from openlp.core.lib.ui import UiStrings, create_save_cancel_button_box, \
|
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box, \
|
||||||
create_delete_push_button, create_up_down_push_button_set
|
create_delete_push_button, create_up_down_push_button_set
|
||||||
|
|
||||||
class Ui_CustomEditDialog(object):
|
class Ui_CustomEditDialog(object):
|
||||||
@ -94,7 +94,7 @@ class Ui_CustomEditDialog(object):
|
|||||||
self.creditLabel.setBuddy(self.creditEdit)
|
self.creditLabel.setBuddy(self.creditEdit)
|
||||||
self.bottomFormLayout.addRow(self.creditLabel, self.creditEdit)
|
self.bottomFormLayout.addRow(self.creditLabel, self.creditEdit)
|
||||||
self.dialogLayout.addLayout(self.bottomFormLayout)
|
self.dialogLayout.addLayout(self.bottomFormLayout)
|
||||||
self.buttonBox = create_save_cancel_button_box(customEditDialog)
|
self.buttonBox = create_accept_reject_button_box(customEditDialog)
|
||||||
self.previewButton = QtGui.QPushButton()
|
self.previewButton = QtGui.QPushButton()
|
||||||
self.buttonBox.addButton(
|
self.buttonBox.addButton(
|
||||||
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate, SpellTextEdit
|
from openlp.core.lib import translate, SpellTextEdit
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_CustomSlideEditDialog(object):
|
class Ui_CustomSlideEditDialog(object):
|
||||||
def setupUi(self, customSlideEditDialog):
|
def setupUi(self, customSlideEditDialog):
|
||||||
@ -37,7 +37,7 @@ class Ui_CustomSlideEditDialog(object):
|
|||||||
self.slideTextEdit = SpellTextEdit(self)
|
self.slideTextEdit = SpellTextEdit(self)
|
||||||
self.slideTextEdit.setObjectName(u'slideTextEdit')
|
self.slideTextEdit.setObjectName(u'slideTextEdit')
|
||||||
self.dialogLayout.addWidget(self.slideTextEdit)
|
self.dialogLayout.addWidget(self.slideTextEdit)
|
||||||
self.buttonBox = create_save_cancel_button_box(customSlideEditDialog)
|
self.buttonBox = create_accept_reject_button_box(customSlideEditDialog)
|
||||||
self.splitButton = QtGui.QPushButton(customSlideEditDialog)
|
self.splitButton = QtGui.QPushButton(customSlideEditDialog)
|
||||||
self.splitButton.setObjectName(u'splitButton')
|
self.splitButton.setObjectName(u'splitButton')
|
||||||
self.buttonBox.addButton(self.splitButton,
|
self.buttonBox.addButton(self.splitButton,
|
||||||
|
@ -64,15 +64,11 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
'Select Image(s)')
|
'Select Image(s)')
|
||||||
file_formats = get_images_filter()
|
file_formats = get_images_filter()
|
||||||
self.OnNewFileMasks = u'%s;;%s (*.*) (*)' % (file_formats,
|
self.OnNewFileMasks = u'%s;;%s (*.*) (*)' % (file_formats,
|
||||||
unicode(UiStrings.AllFiles))
|
UiStrings.AllFiles)
|
||||||
self.replaceAction.setText(
|
self.replaceAction.setText(UiStrings.ReplaceBG)
|
||||||
translate('ImagePlugin.MediaItem', 'Replace Background'))
|
self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG)
|
||||||
self.replaceAction.setToolTip(
|
self.resetAction.setText(UiStrings.ResetBG)
|
||||||
translate('ImagePlugin.MediaItem', 'Replace Live Background'))
|
self.resetAction.setToolTip(UiStrings.ResetLiveBG)
|
||||||
self.resetAction.setText(
|
|
||||||
translate('ImagePlugin.MediaItem', 'Reset Background'))
|
|
||||||
self.resetAction.setToolTip(
|
|
||||||
translate('ImagePlugin.MediaItem', 'Reset Live Background'))
|
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
|
@ -31,7 +31,7 @@ from PyQt4 import QtCore, QtGui
|
|||||||
|
|
||||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||||
ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver
|
ItemCapabilities, SettingsManager, translate, check_item_selected, Receiver
|
||||||
from openlp.core.lib.ui import critical_error_message_box
|
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -64,16 +64,12 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.OnNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media')
|
self.OnNewPrompt = translate('MediaPlugin.MediaItem', 'Select Media')
|
||||||
self.OnNewFileMasks = unicode(translate('MediaPlugin.MediaItem',
|
self.OnNewFileMasks = unicode(translate('MediaPlugin.MediaItem',
|
||||||
'Videos (%s);;Audio (%s);;All files (*)')) % \
|
'Videos (%s);;Audio (%s);;%s (*)')) % (self.parent.video_list,
|
||||||
(self.parent.video_list, self.parent.audio_list)
|
self.parent.audio_list, UiStrings.AllFiles)
|
||||||
self.replaceAction.setText(
|
self.replaceAction.setText(UiStrings.ReplaceBG)
|
||||||
translate('MediaPlugin.MediaItem', 'Replace Background'))
|
self.replaceAction.setToolTip(UiStrings.ReplaceLiveBG)
|
||||||
self.replaceAction.setToolTip(
|
self.resetAction.setText(UiStrings.ResetBG)
|
||||||
translate('MediaPlugin.MediaItem', 'Replace Live Background'))
|
self.resetAction.setToolTip(UiStrings.ResetLiveBG)
|
||||||
self.resetAction.setText(
|
|
||||||
translate('MediaPlugin.MediaItem', 'Reset Background'))
|
|
||||||
self.resetAction.setToolTip(
|
|
||||||
translate('ImagePlugin.MediaItem', 'Reset Live Background'))
|
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_AuthorsDialog(object):
|
class Ui_AuthorsDialog(object):
|
||||||
def setupUi(self, authorsDialog):
|
def setupUi(self, authorsDialog):
|
||||||
@ -57,7 +57,7 @@ class Ui_AuthorsDialog(object):
|
|||||||
self.authorLayout.addRow(self.displayLabel, self.displayEdit)
|
self.authorLayout.addRow(self.displayLabel, self.displayEdit)
|
||||||
self.dialogLayout.addLayout(self.authorLayout)
|
self.dialogLayout.addLayout(self.authorLayout)
|
||||||
self.dialogLayout.addWidget(
|
self.dialogLayout.addWidget(
|
||||||
create_save_cancel_button_box(authorsDialog))
|
create_accept_reject_button_box(authorsDialog))
|
||||||
self.retranslateUi(authorsDialog)
|
self.retranslateUi(authorsDialog)
|
||||||
authorsDialog.setMaximumHeight(authorsDialog.sizeHint().height())
|
authorsDialog.setMaximumHeight(authorsDialog.sizeHint().height())
|
||||||
QtCore.QMetaObject.connectSlotsByName(authorsDialog)
|
QtCore.QMetaObject.connectSlotsByName(authorsDialog)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import build_icon, translate
|
from openlp.core.lib import build_icon, translate
|
||||||
from openlp.core.lib.ui import UiStrings, create_save_cancel_button_box
|
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_EditSongDialog(object):
|
class Ui_EditSongDialog(object):
|
||||||
def setupUi(self, editSongDialog):
|
def setupUi(self, editSongDialog):
|
||||||
@ -241,7 +241,7 @@ class Ui_EditSongDialog(object):
|
|||||||
self.themeTabLayout.addWidget(self.commentsGroupBox)
|
self.themeTabLayout.addWidget(self.commentsGroupBox)
|
||||||
self.songTabWidget.addTab(self.themeTab, u'')
|
self.songTabWidget.addTab(self.themeTab, u'')
|
||||||
self.dialogLayout.addWidget(self.songTabWidget)
|
self.dialogLayout.addWidget(self.songTabWidget)
|
||||||
self.buttonBox = create_save_cancel_button_box(editSongDialog)
|
self.buttonBox = create_accept_reject_button_box(editSongDialog)
|
||||||
self.dialogLayout.addWidget(self.buttonBox)
|
self.dialogLayout.addWidget(self.buttonBox)
|
||||||
self.retranslateUi(editSongDialog)
|
self.retranslateUi(editSongDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(editSongDialog)
|
QtCore.QMetaObject.connectSlotsByName(editSongDialog)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import build_icon, translate, SpellTextEdit
|
from openlp.core.lib import build_icon, translate, SpellTextEdit
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
from openlp.plugins.songs.lib import VerseType
|
from openlp.plugins.songs.lib import VerseType
|
||||||
|
|
||||||
class Ui_EditVerseDialog(object):
|
class Ui_EditVerseDialog(object):
|
||||||
@ -61,7 +61,7 @@ class Ui_EditVerseDialog(object):
|
|||||||
self.verseTypeLayout.addStretch()
|
self.verseTypeLayout.addStretch()
|
||||||
self.dialogLayout.addLayout(self.verseTypeLayout)
|
self.dialogLayout.addLayout(self.verseTypeLayout)
|
||||||
self.dialogLayout.addWidget(
|
self.dialogLayout.addWidget(
|
||||||
create_save_cancel_button_box(editVerseDialog))
|
create_accept_reject_button_box(editVerseDialog))
|
||||||
self.retranslateUi(editVerseDialog)
|
self.retranslateUi(editVerseDialog)
|
||||||
QtCore.QMetaObject.connectSlotsByName(editVerseDialog)
|
QtCore.QMetaObject.connectSlotsByName(editVerseDialog)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_SongBookDialog(object):
|
class Ui_SongBookDialog(object):
|
||||||
def setupUi(self, songBookDialog):
|
def setupUi(self, songBookDialog):
|
||||||
@ -51,7 +51,7 @@ class Ui_SongBookDialog(object):
|
|||||||
self.bookLayout.addRow(self.publisherLabel, self.publisherEdit)
|
self.bookLayout.addRow(self.publisherLabel, self.publisherEdit)
|
||||||
self.dialogLayout.addLayout(self.bookLayout)
|
self.dialogLayout.addLayout(self.bookLayout)
|
||||||
self.dialogLayout.addWidget(
|
self.dialogLayout.addWidget(
|
||||||
create_save_cancel_button_box(songBookDialog))
|
create_accept_reject_button_box(songBookDialog))
|
||||||
self.retranslateUi(songBookDialog)
|
self.retranslateUi(songBookDialog)
|
||||||
songBookDialog.setMaximumHeight(songBookDialog.sizeHint().height())
|
songBookDialog.setMaximumHeight(songBookDialog.sizeHint().height())
|
||||||
QtCore.QMetaObject.connectSlotsByName(songBookDialog)
|
QtCore.QMetaObject.connectSlotsByName(songBookDialog)
|
||||||
|
@ -460,8 +460,7 @@ class SongImportForm(OpenLPWizard):
|
|||||||
"""
|
"""
|
||||||
if filters:
|
if filters:
|
||||||
filters += u';;'
|
filters += u';;'
|
||||||
filters += u'%s (*)' % translate('SongsPlugin.ImportWizardForm',
|
filters += u'%s (*)' % UiStrings.AllFiles
|
||||||
'All Files')
|
|
||||||
filename = QtGui.QFileDialog.getOpenFileName(self, title,
|
filename = QtGui.QFileDialog.getOpenFileName(self, title,
|
||||||
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
|
||||||
filters)
|
filters)
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.lib.ui import create_save_cancel_button_box
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_TopicsDialog(object):
|
class Ui_TopicsDialog(object):
|
||||||
def setupUi(self, topicsDialog):
|
def setupUi(self, topicsDialog):
|
||||||
@ -45,7 +45,7 @@ class Ui_TopicsDialog(object):
|
|||||||
self.nameLayout.addRow(self.nameLabel, self.nameEdit)
|
self.nameLayout.addRow(self.nameLabel, self.nameEdit)
|
||||||
self.dialogLayout.addLayout(self.nameLayout)
|
self.dialogLayout.addLayout(self.nameLayout)
|
||||||
self.dialogLayout.addWidget(
|
self.dialogLayout.addWidget(
|
||||||
create_save_cancel_button_box(topicsDialog))
|
create_accept_reject_button_box(topicsDialog))
|
||||||
self.retranslateUi(topicsDialog)
|
self.retranslateUi(topicsDialog)
|
||||||
topicsDialog.setMaximumHeight(topicsDialog.sizeHint().height())
|
topicsDialog.setMaximumHeight(topicsDialog.sizeHint().height())
|
||||||
QtCore.QMetaObject.connectSlotsByName(topicsDialog)
|
QtCore.QMetaObject.connectSlotsByName(topicsDialog)
|
||||||
|
@ -25,7 +25,9 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_SongUsageDeleteDialog(object):
|
class Ui_SongUsageDeleteDialog(object):
|
||||||
def setupUi(self, songUsageDeleteDialog):
|
def setupUi(self, songUsageDeleteDialog):
|
||||||
@ -43,19 +45,11 @@ class Ui_SongUsageDeleteDialog(object):
|
|||||||
QtGui.QCalendarWidget.NoVerticalHeader)
|
QtGui.QCalendarWidget.NoVerticalHeader)
|
||||||
self.deleteCalendar.setObjectName(u'deleteCalendar')
|
self.deleteCalendar.setObjectName(u'deleteCalendar')
|
||||||
self.verticalLayout.addWidget(self.deleteCalendar)
|
self.verticalLayout.addWidget(self.deleteCalendar)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(songUsageDeleteDialog)
|
self.buttonBox = create_accept_reject_button_box(
|
||||||
|
songUsageDeleteDialog, True)
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(30, 210, 245, 25))
|
self.buttonBox.setGeometry(QtCore.QRect(30, 210, 245, 25))
|
||||||
self.buttonBox.setStandardButtons(
|
|
||||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
self.buttonBox.setObjectName(u'buttonBox')
|
||||||
|
|
||||||
self.retranslateUi(songUsageDeleteDialog)
|
self.retranslateUi(songUsageDeleteDialog)
|
||||||
QtCore.QObject.connect(
|
|
||||||
self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
|
||||||
songUsageDeleteDialog.accept)
|
|
||||||
QtCore.QObject.connect(
|
|
||||||
self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
|
||||||
songUsageDeleteDialog.close)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(songUsageDeleteDialog)
|
QtCore.QMetaObject.connectSlotsByName(songUsageDeleteDialog)
|
||||||
|
|
||||||
def retranslateUi(self, songUsageDeleteDialog):
|
def retranslateUi(self, songUsageDeleteDialog):
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import build_icon, translate
|
from openlp.core.lib import build_icon, translate
|
||||||
|
from openlp.core.lib.ui import create_accept_reject_button_box
|
||||||
|
|
||||||
class Ui_SongUsageDetailDialog(object):
|
class Ui_SongUsageDetailDialog(object):
|
||||||
def setupUi(self, songUsageDetailDialog):
|
def setupUi(self, songUsageDetailDialog):
|
||||||
@ -71,17 +72,10 @@ class Ui_SongUsageDetailDialog(object):
|
|||||||
self.verticalLayout4.addLayout(self.horizontalLayout)
|
self.verticalLayout4.addLayout(self.horizontalLayout)
|
||||||
self.verticalLayout2.addWidget(self.fileGroupBox)
|
self.verticalLayout2.addWidget(self.fileGroupBox)
|
||||||
self.verticalLayout.addWidget(self.dateRangeGroupBox)
|
self.verticalLayout.addWidget(self.dateRangeGroupBox)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(songUsageDetailDialog)
|
self.buttonBox = create_accept_reject_button_box(
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel |
|
songUsageDetailDialog, True)
|
||||||
QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName(u'buttonBox')
|
|
||||||
self.verticalLayout.addWidget(self.buttonBox)
|
self.verticalLayout.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(songUsageDetailDialog)
|
self.retranslateUi(songUsageDetailDialog)
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'accepted()'),
|
|
||||||
songUsageDetailDialog.accept)
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(u'rejected()'),
|
|
||||||
songUsageDetailDialog.close)
|
|
||||||
QtCore.QObject.connect(self.saveFilePushButton,
|
QtCore.QObject.connect(self.saveFilePushButton,
|
||||||
QtCore.SIGNAL(u'pressed()'),
|
QtCore.SIGNAL(u'pressed()'),
|
||||||
songUsageDetailDialog.defineOutputLocation)
|
songUsageDetailDialog.defineOutputLocation)
|
||||||
|
Loading…
Reference in New Issue
Block a user