From 352ee8e041b48b27018105c415796cef6a6e1fc1 Mon Sep 17 00:00:00 2001 From: M2j Date: Mon, 2 Apr 2012 12:32:52 +0200 Subject: [PATCH] Bug #960386: string fixes fix missalignment of theme level selection labels change default theme level to song level --- openlp/core/lib/ui.py | 1 - openlp/core/ui/advancedtab.py | 48 ++++++++------------------ openlp/core/ui/themestab.py | 17 +++++---- openlp/plugins/bibles/lib/biblestab.py | 12 ++----- openlp/plugins/images/lib/imagetab.py | 5 +-- openlp/plugins/songs/lib/songstab.py | 5 ++- 6 files changed, 32 insertions(+), 56 deletions(-) diff --git a/openlp/core/lib/ui.py b/openlp/core/lib/ui.py index 038be08b9..50a5c39d0 100644 --- a/openlp/core/lib/ui.py +++ b/openlp/core/lib/ui.py @@ -93,7 +93,6 @@ class UiStrings(object): self.New = translate('OpenLP.Ui', 'New') self.NewService = translate('OpenLP.Ui', 'New Service') self.NewTheme = translate('OpenLP.Ui', 'New Theme') - self.NextTrack = translate('OpenLP.Ui', 'Next Track') self.NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular') self.NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural') self.NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular') diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index 4322eb29a..fc344f0d5 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -195,33 +195,20 @@ class AdvancedTab(SettingsTab): # Service Item Slide Limits self.slideGroupBox = QtGui.QGroupBox(self.rightColumn) self.slideGroupBox.setObjectName(u'slideGroupBox') - self.slideLayout = QtGui.QFormLayout(self.slideGroupBox) - self.slideLayout.setLabelAlignment( - QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) - self.slideLayout.setFormAlignment( - QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) + self.slideLayout = QtGui.QVBoxLayout(self.slideGroupBox) self.slideLayout.setObjectName(u'slideLayout') + self.slideLabel = QtGui.QLabel(self.slideGroupBox) + self.slideLabel.setWordWrap(True) + self.slideLayout.addWidget(self.slideLabel) self.endSlideRadioButton = QtGui.QRadioButton(self.slideGroupBox) self.endSlideRadioButton.setObjectName(u'endSlideRadioButton') - self.endSlideLabel = QtGui.QLabel(self.slideGroupBox) - self.endSlideLabel.setWordWrap(True) - self.endSlideLabel.setObjectName(u'endSlideLabel') - self.slideLayout.addRow(self.endSlideRadioButton, self.endSlideLabel) + self.slideLayout.addWidget(self.endSlideRadioButton) self.wrapSlideRadioButton = QtGui.QRadioButton(self.slideGroupBox) self.wrapSlideRadioButton.setObjectName(u'wrapSlideRadioButton') - self.wrapSlideLabel = QtGui.QLabel(self.slideGroupBox) - self.wrapSlideLabel.setWordWrap(True) - self.wrapSlideLabel.setObjectName(u'wrapSlideLabel') - self.slideLayout.addRow(self.wrapSlideRadioButton, - self.wrapSlideLabel) + self.slideLayout.addWidget(self.wrapSlideRadioButton) self.nextItemRadioButton = QtGui.QRadioButton(self.slideGroupBox) - self.nextItemRadioButton.setChecked(True) self.nextItemRadioButton.setObjectName(u'nextItemRadioButton') - self.nextItemLabel = QtGui.QLabel(self.slideGroupBox) - self.nextItemLabel.setWordWrap(True) - self.nextItemLabel.setObjectName(u'nextItemLabel') - self.slideLayout.addRow(self.nextItemRadioButton, - self.nextItemLabel) + self.slideLayout.addWidget(self.nextItemRadioButton) self.rightLayout.addWidget(self.slideGroupBox) self.x11GroupBox = QtGui.QGroupBox(self.leftColumn) self.x11GroupBox.setObjectName(u'x11GroupBox') @@ -340,22 +327,15 @@ class AdvancedTab(SettingsTab): # Slide Limits self.slideGroupBox.setTitle( translate('OpenLP.GeneralTab', 'Service Item Slide Limits')) + self.slideLabel.setText(translate('OpenLP.GeneralTab', + 'Behavior at advance over the last slide or decrease previous the ' + 'first slide:')) self.endSlideRadioButton.setText( - translate('OpenLP.GeneralTab', '&End Slide')) - self.endSlideLabel.setText( - translate('OpenLP.GeneralTab', 'Up and down arrow keys ' - 'stop at the top and bottom slides of each Service Item.')) + translate('OpenLP.GeneralTab', '&Keep Slide')) self.wrapSlideRadioButton.setText( - translate('OpenLP.GeneralTab', '&Wrap Slide')) - self.wrapSlideLabel.setText( - translate('OpenLP.GeneralTab', 'Up and down arrow keys ' - 'wrap around at the top and bottom slides of each Service Item.')) - self.nextItemRadioButton.setText( - translate('OpenLP.GeneralTab', '&Next Item')) - self.nextItemLabel.setText( - translate('OpenLP.GeneralTab', 'Up and down arrow keys ' - 'advance to the next or previous Service Item from the ' - 'top and bottom slides of each Service Item.')) + translate('OpenLP.GeneralTab', '&Wrap Arround')) + self.nextItemRadioButton.setText(translate('OpenLP.GeneralTab', + '&Move to Next/Previous Service Item')) def load(self): """ diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py index e0c264903..2967c0a0d 100644 --- a/openlp/core/ui/themestab.py +++ b/openlp/core/ui/themestab.py @@ -71,24 +71,28 @@ class ThemesTab(SettingsTab): self.SongLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox) self.SongLevelRadioButton.setObjectName(u'SongLevelRadioButton') self.SongLevelLabel = QtGui.QLabel(self.LevelGroupBox) - self.SongLevelLabel.setWordWrap(True) self.SongLevelLabel.setObjectName(u'SongLevelLabel') self.LevelLayout.addRow(self.SongLevelRadioButton, self.SongLevelLabel) self.ServiceLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox) self.ServiceLevelRadioButton.setObjectName(u'ServiceLevelRadioButton') self.ServiceLevelLabel = QtGui.QLabel(self.LevelGroupBox) - self.ServiceLevelLabel.setWordWrap(True) self.ServiceLevelLabel.setObjectName(u'ServiceLevelLabel') self.LevelLayout.addRow(self.ServiceLevelRadioButton, self.ServiceLevelLabel) self.GlobalLevelRadioButton = QtGui.QRadioButton(self.LevelGroupBox) - self.GlobalLevelRadioButton.setChecked(True) self.GlobalLevelRadioButton.setObjectName(u'GlobalLevelRadioButton') self.GlobalLevelLabel = QtGui.QLabel(self.LevelGroupBox) - self.GlobalLevelLabel.setWordWrap(True) self.GlobalLevelLabel.setObjectName(u'GlobalLevelLabel') self.LevelLayout.addRow(self.GlobalLevelRadioButton, self.GlobalLevelLabel) + label_top_margin = (self.SongLevelRadioButton.sizeHint().height() - + self.SongLevelLabel.sizeHint().height()) / 2 + for label in [self.SongLevelLabel, self.ServiceLevelLabel, + self.GlobalLevelLabel]: + rect = label.rect() + rect.setTop(rect.top() + label_top_margin) + label.setFrameRect(rect) + label.setWordWrap(True) self.rightLayout.addWidget(self.LevelGroupBox) self.rightLayout.addStretch() QtCore.QObject.connect(self.SongLevelRadioButton, @@ -131,9 +135,8 @@ class ThemesTab(SettingsTab): settings = QtCore.QSettings() settings.beginGroup(self.settingsSection) self.theme_level = settings.value( - u'theme level', QtCore.QVariant(ThemeLevel.Global)).toInt()[0] - self.global_theme = unicode(settings.value( - u'global theme', QtCore.QVariant(u'')).toString()) + u'theme level', ThemeLevel.Song).toInt()[0] + self.global_theme = unicode(settings.value(u'global theme').toString()) settings.endGroup() if self.theme_level == ThemeLevel.Global: self.GlobalLevelRadioButton.setChecked(True) diff --git a/openlp/plugins/bibles/lib/biblestab.py b/openlp/plugins/bibles/lib/biblestab.py index 09d340ad4..353dc265d 100644 --- a/openlp/plugins/bibles/lib/biblestab.py +++ b/openlp/plugins/bibles/lib/biblestab.py @@ -276,11 +276,10 @@ class BiblesTab(SettingsTab): 'end marks may be defined.\nThey have to be separated by a ' 'vertical bar "|".\nPlease clear this edit line to use the ' 'default value.')) - self.languageSelectionGroupBox.setTitle( - translate('BiblesPlugin.BiblesTab', 'Preferred Bookname Language')) + self.languageSelectionGroupBox.setTitle(translate('BiblesPlugin.BiblesTab', + 'Default Search Field Language')) self.languageSelectionLabel.setText(translate('BiblesPlugin.BiblesTab', - 'Choose the language in which the book names of the\nBible should ' - 'be displayed in the Bible search:')) + 'Book name language in search field:')) self.languageSelectionComboBox.setItemText(LanguageSelection.Bible, translate('BiblesPlugin.BiblesTab', 'Bible language')) self.languageSelectionComboBox.setItemText( @@ -288,11 +287,6 @@ class BiblesTab(SettingsTab): translate('BiblesPlugin.BiblesTab', 'Application language')) self.languageSelectionComboBox.setItemText(LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English')) - self.languageSelectionComboBox.setToolTip( - translate('BiblesPlugin.BiblesTab', 'Multiple options:\n ' - 'Bible language - the language in which the Bible book names ' - 'were imported\n Application language - the language you have ' - 'chosen for OpenLP\n English - always use English book names')) def onBibleThemeComboBoxChanged(self): self.bible_theme = self.bibleThemeComboBox.currentText() diff --git a/openlp/plugins/images/lib/imagetab.py b/openlp/plugins/images/lib/imagetab.py index be54e207c..4e708bd17 100644 --- a/openlp/plugins/images/lib/imagetab.py +++ b/openlp/plugins/images/lib/imagetab.py @@ -53,6 +53,7 @@ class ImageTab(SettingsTab): self.formLayout.addRow(self.colorLayout) self.informationLabel = QtGui.QLabel(self.bgColorGroupBox) self.informationLabel.setObjectName(u'InformationLabel') + self.informationLabel.setWordWrap(True) self.formLayout.addRow(self.informationLabel) self.leftLayout.addWidget(self.bgColorGroupBox) self.leftLayout.addStretch() @@ -69,8 +70,8 @@ class ImageTab(SettingsTab): self.backgroundColorLabel.setText( translate('ImagesPlugin.ImageTab', 'Default Color:')) self.informationLabel.setText( - translate('ImagesPlugin.ImageTab', 'Provides border where image ' - 'is not the correct dimensions for the screen when resized.')) + translate('ImagesPlugin.ImageTab', 'Visible background for images ' + 'with aspect ratio different to screen.')) def onbackgroundColorButtonClicked(self): new_color = QtGui.QColorDialog.getColor( diff --git a/openlp/plugins/songs/lib/songstab.py b/openlp/plugins/songs/lib/songstab.py index 5da2a2a3c..92cf99704 100644 --- a/openlp/plugins/songs/lib/songstab.py +++ b/openlp/plugins/songs/lib/songstab.py @@ -82,9 +82,8 @@ class SongsTab(SettingsTab): 'Display verses on live tool bar')) self.updateOnEditCheckBox.setText( translate('SongsPlugin.SongsTab', 'Update service from song edit')) - self.addFromServiceCheckBox.setText( - translate('SongsPlugin.SongsTab', - 'Add missing songs when opening service')) + self.addFromServiceCheckBox.setText(translate('SongsPlugin.SongsTab', + 'Import songs from service files')) def onSearchAsTypeCheckBoxChanged(self, check_state): self.song_search = False