openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #19671
[Merge] lp:~googol/openlp/short-lines into lp:openlp
Andreas Preikschat has proposed merging lp:~googol/openlp/short-lines into lp:openlp.
Requested reviews:
Andreas Preikschat (googol)
For more details, see:
https://code.launchpad.net/~googol/openlp/short-lines/+merge/151164
--
https://code.launchpad.net/~googol/openlp/short-lines/+merge/151164
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/lib/theme.py'
--- openlp/core/lib/theme.py 2013-02-02 21:16:42 +0000
+++ openlp/core/lib/theme.py 2013-03-01 09:26:55 +0000
@@ -200,12 +200,10 @@
Names = [u'top', u'middle', u'bottom']
-BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow',
- u'slide_transition']
+BOOLEAN_LIST = [u'bold', u'italics', u'override', u'outline', u'shadow', u'slide_transition']
-INTEGER_LIST = [u'size', u'line_adjustment', u'x', u'height', u'y',
- u'width', u'shadow_size', u'outline_size', u'horizontal_align',
- u'vertical_align', u'wrap_style']
+INTEGER_LIST = [u'size', u'line_adjustment', u'x', u'height', u'y', u'width', u'shadow_size', u'outline_size',
+ u'horizontal_align', u'vertical_align', u'wrap_style']
class ThemeXML(object):
@@ -234,8 +232,7 @@
if self.background_filename and path:
self.theme_name = self.theme_name.strip()
self.background_filename = self.background_filename.strip()
- self.background_filename = os.path.join(path, self.theme_name,
- self.background_filename)
+ self.background_filename = os.path.join(path, self.theme_name, self.background_filename)
def _new_document(self, name):
"""
@@ -308,11 +305,9 @@
# Create endColor element
self.child_element(background, u'borderColor', unicode(borderColor))
- def add_font(self, name, color, size, override, fonttype=u'main',
- bold=u'False', italics=u'False', line_adjustment=0,
- xpos=0, ypos=0, width=0, height=0, outline=u'False',
- outline_color=u'#ffffff', outline_pixel=2, shadow=u'False',
- shadow_color=u'#ffffff', shadow_pixel=5):
+ def add_font(self, name, color, size, override, fonttype=u'main', bold=u'False', italics=u'False',
+ line_adjustment=0, xpos=0, ypos=0, width=0, height=0, outline=u'False', outline_color=u'#ffffff',
+ outline_pixel=2, shadow=u'False', shadow_color=u'#ffffff', shadow_pixel=5):
"""
Add a Font.
=== modified file 'openlp/core/ui/advancedtab.py'
--- openlp/core/ui/advancedtab.py 2013-02-07 08:42:17 +0000
+++ openlp/core/ui/advancedtab.py 2013-03-01 09:26:55 +0000
@@ -308,8 +308,7 @@
self.service_name_day.setItemText(5, translate('OpenLP.AdvancedTab', 'Saturday'))
self.service_name_day.setItemText(6, translate('OpenLP.AdvancedTab', 'Sunday'))
self.service_name_day.setItemText(7, translate('OpenLP.AdvancedTab', 'Now'))
- self.service_name_time.setToolTip(translate('OpenLP.AdvancedTab',
- 'Time when usual service starts.'))
+ self.service_name_time.setToolTip(translate('OpenLP.AdvancedTab', 'Time when usual service starts.'))
self.service_name_label.setText(translate('OpenLP.AdvancedTab', 'Name:'))
self.service_name_edit.setToolTip(translate('OpenLP.AdvancedTab', 'Consult the OpenLP manual for usage.'))
self.service_name_revert_button.setToolTip(
@@ -524,8 +523,7 @@
"""
Select the background colour of the default display screen.
"""
- new_color = QtGui.QColorDialog.getColor(
- QtGui.QColor(self.default_color), self)
+ new_color = QtGui.QColorDialog.getColor(QtGui.QColor(self.default_color), self)
if new_color.isValid():
self.default_color = new_color.name()
self.default_color_button.setStyleSheet(u'background-color: %s' % self.default_color)
=== modified file 'openlp/core/ui/exceptiondialog.py'
--- openlp/core/ui/exceptiondialog.py 2013-02-01 19:58:18 +0000
+++ openlp/core/ui/exceptiondialog.py 2013-03-01 09:26:55 +0000
@@ -85,8 +85,7 @@
self.exceptionLayout.addWidget(self.button_box)
self.retranslateUi(exceptionDialog)
- QtCore.QObject.connect(self.descriptionTextEdit,
- QtCore.SIGNAL(u'textChanged()'), self.onDescriptionUpdated)
+ QtCore.QObject.connect(self.descriptionTextEdit, QtCore.SIGNAL(u'textChanged()'), self.onDescriptionUpdated)
def retranslateUi(self, exceptionDialog):
"""
@@ -102,9 +101,6 @@
'developers, so please e-mail it to bugs@xxxxxxxxxx, along with a '
'detailed description of what you were doing when the problem '
'occurred.'))
- self.sendReportButton.setText(translate('OpenLP.ExceptionDialog',
- 'Send E-Mail'))
- self.saveReportButton.setText(translate('OpenLP.ExceptionDialog',
- 'Save to File'))
- self.attachFileButton.setText(translate('OpenLP.ExceptionDialog',
- 'Attach File'))
+ self.sendReportButton.setText(translate('OpenLP.ExceptionDialog', 'Send E-Mail'))
+ self.saveReportButton.setText(translate('OpenLP.ExceptionDialog', 'Save to File'))
+ self.attachFileButton.setText(translate('OpenLP.ExceptionDialog', 'Attach File'))
=== modified file 'openlp/core/ui/firsttimeform.py'
--- openlp/core/ui/firsttimeform.py 2013-02-10 16:10:32 +0000
+++ openlp/core/ui/firsttimeform.py 2013-03-01 09:26:55 +0000
@@ -98,8 +98,7 @@
self.update_screen_list_combo()
self.was_download_cancelled = False
self.downloading = translate('OpenLP.FirstTimeWizard', 'Downloading %s...')
- QtCore.QObject.connect(self.cancelButton, QtCore.SIGNAL('clicked()'),
- self.onCancelButtonClicked)
+ QtCore.QObject.connect(self.cancelButton, QtCore.SIGNAL('clicked()'), self.onCancelButtonClicked)
QtCore.QObject.connect(self.noInternetFinishButton, QtCore.SIGNAL('clicked()'),
self.onNoInternetFinishButtonClicked)
QtCore.QObject.connect(self, QtCore.SIGNAL(u'currentIdChanged(int)'), self.onCurrentIdChanged)
=== modified file 'openlp/core/ui/firsttimelanguageform.py'
--- openlp/core/ui/firsttimelanguageform.py 2013-02-01 20:36:27 +0000
+++ openlp/core/ui/firsttimelanguageform.py 2013-03-01 09:26:55 +0000
@@ -48,8 +48,7 @@
self.setupUi(self)
self.qmList = LanguageManager.get_qm_list()
self.languageComboBox.addItem(u'Autodetect')
- for key in sorted(self.qmList.keys()):
- self.languageComboBox.addItem(key)
+ self.languageComboBox.addItems(sorted(self.qmList.keys()))
def exec_(self):
"""
=== modified file 'openlp/core/ui/firsttimewizard.py'
--- openlp/core/ui/firsttimewizard.py 2013-02-01 20:36:27 +0000
+++ openlp/core/ui/firsttimewizard.py 2013-03-01 09:26:55 +0000
@@ -208,13 +208,11 @@
"""
Translate the UI on the fly
"""
- FirstTimeWizard.setWindowTitle(translate(
- 'OpenLP.FirstTimeWizard', 'First Time Wizard'))
+ FirstTimeWizard.setWindowTitle(translate('OpenLP.FirstTimeWizard', 'First Time Wizard'))
self.titleLabel.setText(u'<span style="font-size:14pt; font-weight:600;">%s</span>' %
translate('OpenLP.FirstTimeWizard', 'Welcome to the First Time Wizard'))
self.informationLabel.setText(translate('OpenLP.FirstTimeWizard',
- 'This wizard will help you to configure OpenLP for initial use.'
- ' Click the next button below to start.'))
+ 'This wizard will help you to configure OpenLP for initial use. Click the next button below to start.'))
self.pluginPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Activate required Plugins'))
self.pluginPage.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select the Plugins you wish to use. '))
self.songsCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
@@ -240,8 +238,7 @@
'check your Internet connection and re-run this wizard by '
'selecting "Tools/Re-run First Time Wizard" from OpenLP.')
self.cancelWizardText = translate('OpenLP.FirstTimeWizard',
- '\n\nTo cancel the First Time Wizard completely (and not start '
- 'OpenLP), click the Cancel button now.')
+ '\n\nTo cancel the First Time Wizard completely (and not start OpenLP), click the Cancel button now.')
self.songsPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Sample Songs'))
self.songsPage.setSubTitle(translate('OpenLP.FirstTimeWizard', 'Select and download public domain songs.'))
self.biblesPage.setTitle(translate('OpenLP.FirstTimeWizard', 'Sample Bibles'))
=== modified file 'openlp/core/ui/formattingtagform.py'
--- openlp/core/ui/formattingtagform.py 2013-02-05 08:05:28 +0000
+++ openlp/core/ui/formattingtagform.py 2013-03-01 09:26:55 +0000
@@ -127,7 +127,6 @@
self.tagTableWidget.selectRow(self.tagTableWidget.rowCount() - 1)
self.onRowSelected()
self.tagTableWidget.scrollToBottom()
- #self.savePushButton.setEnabled(False)
def onDeleteClicked(self):
"""
=== modified file 'openlp/core/ui/generaltab.py'
--- openlp/core/ui/generaltab.py 2013-02-09 17:13:27 +0000
+++ openlp/core/ui/generaltab.py 2013-03-01 09:26:55 +0000
@@ -231,8 +231,7 @@
self.usernameLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect username:'))
self.passwordLabel.setText(translate('OpenLP.GeneralTab', 'SongSelect password:'))
# Moved from display tab
- self.overrideRadioButton.setText(translate('OpenLP.GeneralTab',
- 'Override display position:'))
+ self.overrideRadioButton.setText(translate('OpenLP.GeneralTab', 'Override display position:'))
self.customXLabel.setText(translate('OpenLP.GeneralTab', 'X'))
self.customYLabel.setText(translate('OpenLP.GeneralTab', 'Y'))
self.customHeightLabel.setText(translate('OpenLP.GeneralTab', 'Height'))
=== modified file 'openlp/core/ui/maindisplay.py'
--- openlp/core/ui/maindisplay.py 2013-02-14 21:31:17 +0000
+++ openlp/core/ui/maindisplay.py 2013-03-01 09:26:55 +0000
@@ -96,14 +96,11 @@
self.frame = self.page.mainFrame()
if self.isLive and log.getEffectiveLevel() == logging.DEBUG:
self.webView.settings().setAttribute(QtWebKit.QWebSettings.DeveloperExtrasEnabled, True)
- QtCore.QObject.connect(self.webView,
- QtCore.SIGNAL(u'loadFinished(bool)'), self.isWebLoaded)
+ QtCore.QObject.connect(self.webView, QtCore.SIGNAL(u'loadFinished(bool)'), self.isWebLoaded)
self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
- self.frame.setScrollBarPolicy(QtCore.Qt.Vertical,
- QtCore.Qt.ScrollBarAlwaysOff)
- self.frame.setScrollBarPolicy(QtCore.Qt.Horizontal,
- QtCore.Qt.ScrollBarAlwaysOff)
+ self.frame.setScrollBarPolicy(QtCore.Qt.Vertical, QtCore.Qt.ScrollBarAlwaysOff)
+ self.frame.setScrollBarPolicy(QtCore.Qt.Horizontal, QtCore.Qt.ScrollBarAlwaysOff)
def resizeEvent(self, event):
"""
@@ -213,9 +210,7 @@
image_file = Settings().value(u'advanced/default image')
splash_image = QtGui.QImage(image_file)
self.initialFrame = QtGui.QImage(
- self.screen[u'size'].width(),
- self.screen[u'size'].height(),
- QtGui.QImage.Format_ARGB32_Premultiplied)
+ self.screen[u'size'].width(), self.screen[u'size'].height(), QtGui.QImage.Format_ARGB32_Premultiplied)
painter_image = QtGui.QPainter()
painter_image.begin(self.initialFrame)
painter_image.fillRect(self.initialFrame.rect(), background_color)
=== modified file 'openlp/core/ui/printserviceform.py'
--- openlp/core/ui/printserviceform.py 2013-02-07 08:42:17 +0000
+++ openlp/core/ui/printserviceform.py 2013-03-01 09:26:55 +0000
@@ -173,18 +173,16 @@
custom_css = get_text_file_string(css_path)
if not custom_css:
custom_css = DEFAULT_CSS
- self._addElement(u'style', custom_css, html_data.head,
- attribute=(u'type', u'text/css'))
+ self._addElement(u'style', custom_css, html_data.head, attribute=(u'type', u'text/css'))
self._addElement(u'body', parent=html_data)
- self._addElement(u'h1', cgi.escape(self.titleLineEdit.text()),
- html_data.body, classId=u'serviceTitle')
+ self._addElement(u'h1', cgi.escape(self.titleLineEdit.text()), html_data.body, classId=u'serviceTitle')
for index, item in enumerate(self.service_manager.service_items):
self._addPreviewItem(html_data.body, item[u'service_item'], index)
# Add the custom service notes:
if self.footerTextEdit.toPlainText():
div = self._addElement(u'div', parent=html_data.body, classId=u'customNotes')
- self._addElement(u'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div,
- classId=u'customNotesTitle')
+ self._addElement(
+ u'span', translate('OpenLP.ServiceManager', 'Custom Service Notes: '), div, classId=u'customNotesTitle')
self._addElement(u'span', cgi.escape(self.footerTextEdit.toPlainText()), div, classId=u'customNotesText')
self.document.setHtml(html.tostring(html_data))
self.previewWidget.updatePreview()
@@ -227,8 +225,7 @@
if self.notesCheckBox.isChecked():
if item.notes:
p = self._addElement(u'div', classId=u'itemNotes', parent=div)
- self._addElement(u'span', translate('OpenLP.ServiceManager', 'Notes: '), p,
- classId=u'itemNotesTitle')
+ self._addElement(u'span', translate('OpenLP.ServiceManager', 'Notes: '), p, classId=u'itemNotesTitle')
self._addElement(u'span', cgi.escape(item.notes).replace(u'\n', u'<br>'), p, classId=u'itemNotesText')
# Add play length of media files.
if item.is_media() and self.metaDataCheckBox.isChecked():
@@ -236,13 +233,11 @@
if item.end_time > 0:
tme = item.end_time - item.start_time
title = self._addElement(u'div', classId=u'media', parent=div)
- self._addElement(u'span', translate('OpenLP.ServiceManager', 'Playing time: '), title,
- classId=u'mediaTitle')
- self._addElement(u'span', unicode(datetime.timedelta(seconds=tme)),
- title, classId=u'mediaText')
+ self._addElement(
+ u'span', translate('OpenLP.ServiceManager', 'Playing time: '), title, classId=u'mediaTitle')
+ self._addElement(u'span', unicode(datetime.timedelta(seconds=tme)), title, classId=u'mediaText')
- def _addElement(self, tag, text=None, parent=None, classId=None,
- attribute=None):
+ def _addElement(self, tag, text=None, parent=None, classId=None, attribute=None):
"""
Creates a html element. If ``text`` is given, the element's text will
set and if a ``parent`` is given, the element is appended.
=== modified file 'openlp/core/ui/serviceitemeditform.py'
--- openlp/core/ui/serviceitemeditform.py 2013-02-01 21:34:23 +0000
+++ openlp/core/ui/serviceitemeditform.py 2013-03-01 09:26:55 +0000
@@ -46,8 +46,7 @@
QtGui.QDialog.__init__(self, self.main_window)
self.setupUi(self)
self.item_list = []
- QtCore.QObject.connect(self.list_widget, QtCore.SIGNAL(u'currentRowChanged(int)'),
- self.on_current_row_changed)
+ QtCore.QObject.connect(self.list_widget, QtCore.SIGNAL(u'currentRowChanged(int)'), self.on_current_row_changed)
def set_service_item(self, item):
"""
@@ -57,8 +56,7 @@
self.item_list = []
if self.item.is_image():
self.data = True
- for frame in self.item._raw_frames:
- self.item_list.append(frame)
+ self.item_list.extend(self.item._raw_frames)
self.load_data()
self.list_widget.setCurrentItem(self.list_widget.currentItem())
@@ -94,9 +92,8 @@
self.item_list.pop(row)
self.load_data()
if row == self.list_widget.count():
- self.list_widget.setCurrentRow(row - 1)
- else:
- self.list_widget.setCurrentRow(row)
+ row -= 1
+ self.list_widget.setCurrentRow(row)
def on_up_button_clicked(self):
"""
@@ -163,4 +160,4 @@
self._main_window = Registry().get(u'main_window')
return self._main_window
- main_window = property(_get_main_window)
\ No newline at end of file
+ main_window = property(_get_main_window)
=== modified file 'openlp/core/ui/starttimeform.py'
--- openlp/core/ui/starttimeform.py 2013-02-05 08:05:28 +0000
+++ openlp/core/ui/starttimeform.py 2013-03-01 09:26:55 +0000
@@ -69,12 +69,9 @@
"""
When the dialog succeeds, this is run
"""
- start = self.hourSpinBox.value() * 3600 + \
- self.minuteSpinBox.value() * 60 + \
- self.secondSpinBox.value()
+ start = self.hourSpinBox.value() * 3600 + self.minuteSpinBox.value() * 60 + self.secondSpinBox.value()
end = self.hourFinishSpinBox.value() * 3600 + \
- self.minuteFinishSpinBox.value() * 60 + \
- self.secondFinishSpinBox.value()
+ self.minuteFinishSpinBox.value() * 60 + self.secondFinishSpinBox.value()
if end > self.item[u'service_item'].media_length:
critical_error_message_box(title=translate('OpenLP.StartTimeForm', 'Time Validation Error'),
message=translate('OpenLP.StartTimeForm', 'Finish time is set after the end of the media item'))
=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py 2013-02-27 11:24:50 +0000
+++ openlp/core/ui/thememanager.py 2013-03-01 09:26:55 +0000
@@ -291,8 +291,7 @@
save_to = None
save_from = None
if theme_data.background_type == u'image':
- save_to = os.path.join(self.path, new_theme_name,
- os.path.split(unicode(theme_data.background_filename))[1])
+ save_to = os.path.join(self.path, new_theme_name, os.path.split(unicode(theme_data.background_filename))[1])
save_from = theme_data.background_filename
theme_data.theme_name = new_theme_name
theme_data.extend_image_filename(self.path)
@@ -373,8 +372,7 @@
for files in os.walk(source):
for name in files[2]:
theme_zip.write(
- os.path.join(source, name).encode(u'utf-8'),
- os.path.join(theme, name).encode(u'utf-8')
+ os.path.join(source, name).encode(u'utf-8'), os.path.join(theme, name).encode(u'utf-8')
)
QtGui.QMessageBox.information(self,
translate('OpenLP.ThemeManager', 'Theme Exported'),
@@ -771,20 +769,20 @@
theme = Theme(xml_data)
new_theme = ThemeXML()
new_theme.theme_name = self.badV1NameChars.sub(u'', theme.Name)
- if theme.BackgroundType == 0:
+ if theme.BackgroundType == BackgroundType.Solid:
new_theme.background_type = BackgroundType.to_string(BackgroundType.Solid)
new_theme.background_color = unicode(theme.BackgroundParameter1.name())
- elif theme.BackgroundType == 1:
+ elif theme.BackgroundType == BackgroundType.Horizontal:
new_theme.background_type = BackgroundType.to_string(BackgroundType.Gradient)
new_theme.background_direction = BackgroundGradientType.to_string(BackgroundGradientType.Horizontal)
if theme.BackgroundParameter3.name() == 1:
new_theme.background_direction = BackgroundGradientType.to_string(BackgroundGradientType.Horizontal)
new_theme.background_start_color = unicode(theme.BackgroundParameter1.name())
new_theme.background_end_color = unicode(theme.BackgroundParameter2.name())
- elif theme.BackgroundType == 2:
+ elif theme.BackgroundType == BackgroundType.Image:
new_theme.background_type = BackgroundType.to_string(BackgroundType.Image)
new_theme.background_filename = unicode(theme.BackgroundParameter1)
- elif theme.BackgroundType == 3:
+ elif theme.BackgroundType == BackgroundType.Transparent:
new_theme.background_type = BackgroundType.to_string(BackgroundType.Transparent)
new_theme.font_main_name = theme.FontName
new_theme.font_main_color = unicode(theme.FontColor.name())
=== modified file 'openlp/core/ui/themewizard.py'
--- openlp/core/ui/themewizard.py 2013-02-05 08:05:28 +0000
+++ openlp/core/ui/themewizard.py 2013-03-01 09:26:55 +0000
@@ -48,8 +48,7 @@
themeWizard.setModal(True)
themeWizard.setWizardStyle(QtGui.QWizard.ModernStyle)
themeWizard.setOptions(QtGui.QWizard.IndependentPages |
- QtGui.QWizard.NoBackButtonOnStartPage |
- QtGui.QWizard.HaveCustomButton1)
+ QtGui.QWizard.NoBackButtonOnStartPage | QtGui.QWizard.HaveCustomButton1)
self.spacer = QtGui.QSpacerItem(10, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Minimum)
# Welcome Page
add_welcome_page(themeWizard, u':/wizards/wizard_createtheme.bmp')
@@ -398,9 +397,8 @@
self.titleLabel.setText(u'<span style="font-size:14pt; font-weight:600;">%s</span>' %
translate('OpenLP.ThemeWizard', 'Welcome to the Theme Wizard'))
self.informationLabel.setText(
- translate('OpenLP.ThemeWizard', 'This wizard will help you to '
- 'create and edit your themes. Click the next button below to '
- 'start the process by setting up your background.'))
+ translate('OpenLP.ThemeWizard', 'This wizard will help you to create and edit your themes. Click the next '
+ 'button below to start the process by setting up your background.'))
self.backgroundPage.setTitle(translate('OpenLP.ThemeWizard', 'Set Up Background'))
self.backgroundPage.setSubTitle(translate('OpenLP.ThemeWizard', 'Set up your theme\'s background '
'according to the parameters below.'))
@@ -417,10 +415,8 @@
self.gradientTypeLabel.setText(translate('OpenLP.ThemeWizard', 'Gradient:'))
self.gradientComboBox.setItemText(BackgroundGradientType.Horizontal,
translate('OpenLP.ThemeWizard', 'Horizontal'))
- self.gradientComboBox.setItemText(BackgroundGradientType.Vertical,
- translate('OpenLP.ThemeWizard', 'Vertical'))
- self.gradientComboBox.setItemText(BackgroundGradientType.Circular,
- translate('OpenLP.ThemeWizard', 'Circular'))
+ self.gradientComboBox.setItemText(BackgroundGradientType.Vertical, translate('OpenLP.ThemeWizard', 'Vertical'))
+ self.gradientComboBox.setItemText(BackgroundGradientType.Circular, translate('OpenLP.ThemeWizard', 'Circular'))
self.gradientComboBox.setItemText(BackgroundGradientType.LeftTop,
translate('OpenLP.ThemeWizard', 'Top Left - Bottom Right'))
self.gradientComboBox.setItemText(BackgroundGradientType.LeftBottom,
@@ -484,12 +480,10 @@
self.footerHeightSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'px'))
self.footerPositionCheckBox.setText(translate('OpenLP.ThemeWizard', 'Use default location'))
themeWizard.setOption(QtGui.QWizard.HaveCustomButton1, False)
- themeWizard.setButtonText(QtGui.QWizard.CustomButton1,
- translate('OpenLP.ThemeWizard', 'Layout Preview'))
+ themeWizard.setButtonText(QtGui.QWizard.CustomButton1, translate('OpenLP.ThemeWizard', 'Layout Preview'))
self.previewPage.setTitle(translate('OpenLP.ThemeWizard', 'Preview and Save'))
self.previewPage.setSubTitle(translate('OpenLP.ThemeWizard', 'Preview the theme and save it.'))
self.themeNameLabel.setText(translate('OpenLP.ThemeWizard', 'Theme name:'))
# Align all QFormLayouts towards each other.
- labelWidth = max(self.backgroundLabel.minimumSizeHint().width(),
- self.horizontalLabel.minimumSizeHint().width())
+ labelWidth = max(self.backgroundLabel.minimumSizeHint().width(), self.horizontalLabel.minimumSizeHint().width())
self.spacer.changeSize(labelWidth, 0, QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
=== modified file 'openlp/core/ui/wizard.py'
--- openlp/core/ui/wizard.py 2013-02-07 08:42:17 +0000
+++ openlp/core/ui/wizard.py 2013-03-01 09:26:55 +0000
@@ -57,11 +57,9 @@
Importing = translate('OpenLP.Ui', 'Importing')
ImportingType = translate('OpenLP.Ui', 'Importing "%s"...')
ImportSelect = translate('OpenLP.Ui', 'Select Import Source')
- ImportSelectLong = translate('OpenLP.Ui',
- 'Select the import format and the location to import from.')
- NoSqlite = translate('OpenLP.Ui', 'The openlp.org 1.x importer has been '
- 'disabled due to a missing Python module. If you want to use this '
- 'importer, you will need to install the "python-sqlite" module.')
+ ImportSelectLong = translate('OpenLP.Ui', 'Select the import format and the location to import from.')
+ NoSqlite = translate('OpenLP.Ui', 'The openlp.org 1.x importer has been disabled due to a missing Python module. '
+ 'If you want to use this importer, you will need to install the "python-sqlite" module.')
OpenTypeFile = translate('OpenLP.Ui', 'Open %s File')
OpenTypeFolder = translate('OpenLP.Ui', 'Open %s Folder')
PercentSymbolFormat = translate('OpenLP.Ui', '%p%')
@@ -106,8 +104,7 @@
self.setModal(True)
self.setWizardStyle(QtGui.QWizard.ModernStyle)
self.setOptions(QtGui.QWizard.IndependentPages |
- QtGui.QWizard.NoBackButtonOnStartPage |
- QtGui.QWizard.NoBackButtonOnLastPage)
+ QtGui.QWizard.NoBackButtonOnStartPage | QtGui.QWizard.NoBackButtonOnLastPage)
add_welcome_page(self, image)
self.addCustomPages()
self.addProgressPage()
@@ -281,8 +278,7 @@
The place where to save the last opened directory.
"""
folder = QtGui.QFileDialog.getExistingDirectory(self, title,
- Settings().value(self.plugin.settingsSection + u'/' + setting_name),
- QtGui.QFileDialog.ShowDirsOnly)
+ Settings().value(self.plugin.settingsSection + u'/' + setting_name), QtGui.QFileDialog.ShowDirsOnly)
if folder:
editbox.setText(folder)
Settings().setValue(self.plugin.settingsSection + u'/' + setting_name, folder)
Follow ups