Improve readability for white space patch

This commit is contained in:
Jon Tibble 2009-09-21 20:26:10 +01:00
parent 9c6ddbf109
commit a224d6a895
6 changed files with 22 additions and 16 deletions

View File

@ -205,14 +205,16 @@ class MediaManagerItem(QtGui.QWidget):
self.addToolbarButton(
translate(
self.TranslationContext, u'New ' + self.PluginTextShort),
translate(self.TranslationContext,
translate(
self.TranslationContext,
u'Add a new ' + self.PluginTextShort),
u':' + self.IconPath + u'_new.png', self.onNewClick,
self.PluginTextShort + u'NewItem')
## Edit Button ##
if self.hasEditIcon:
self.addToolbarButton(translate(
self.TranslationContext, u'Edit ' + self.PluginTextShort),
self.addToolbarButton(
translate(
self.TranslationContext, u'Edit ' + self.PluginTextShort),
translate(
self.TranslationContext,
u'Edit the selected ' + self.PluginTextShort),
@ -240,10 +242,12 @@ class MediaManagerItem(QtGui.QWidget):
u':/system/system_live.png', self.onLiveClick, u'LiveItem')
## Add to service Button ##
self.addToolbarButton(
translate(self.TranslationContext,
u'Add ' + self.PluginTextShort + u' To Service'),
translate(self.TranslationContext,
u'Add the selected item(s) to the service'),
translate(
self.TranslationContext,
u'Add ' + self.PluginTextShort + u' To Service'),
translate(
self.TranslationContext,
u'Add the selected item(s) to the service'),
u':/system/system_add.png', self.onAddClick,
self.PluginTextShort + u'AddItem')

View File

@ -141,8 +141,9 @@ class MainDisplay(QtGui.QWidget):
painter = QtGui.QPainter(alertframe)
top = alertframe.rect().height() * 0.9
painter.fillRect(
QtCore.QRect(0, top,
alertframe.rect().width(), alertframe.rect().height() - top),
QtCore.QRect(
0, top, alertframe.rect().width(),
alertframe.rect().height() - top),
QtGui.QColor(alertTab.bg_color))
font = QtGui.QFont()
font.setFamily(alertTab.font_face)

View File

@ -87,8 +87,7 @@ class BGExtract(BibleCommon):
versePos = -1
else:
i = xml_string[:i].rfind(u'<span') + 1
# Loose the </span>
verseText = xml_string[versePos + 7 : i - 1 ]
verseText = xml_string[versePos + 7 : i - 1] # Loose </span>
# Chop off verse 1
xml_string = xml_string[i - 1 :len(xml_string)]
versePos = xml_string.find(VerseSearch) #look for the next verse

View File

@ -126,7 +126,8 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
sxml.add_lyrics_to_song()
count = 1
for i in range (0, self.VerseListView.count()):
sxml.add_verse_to_lyrics(u'custom', unicode(count),
sxml.add_verse_to_lyrics(
u'custom', unicode(count),
unicode(self.VerseListView.item(i).text()))
count += 1
self.customSlide.title = unicode(self.TitleEdit.displayText())
@ -207,7 +208,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
#number of lines has change
if len(self.beforeText.split(u'\n')) != \
len(self.VerseTextEdit.toPlainText().split(u'\n')):
tempList = {}
tempList = {}
for row in range(0, self.VerseListView.count()):
tempList[row] = self.VerseListView.item(row).text()
self.VerseListView.clear()

View File

@ -115,7 +115,8 @@ class PresentationTab(SettingsTab):
def save(self):
self.config.set_config(
u'Powerpoint', unicode(self.PowerpointCheckBox.checkState()))
self.config.set_config(u'Powerpoint Viewer',
self.config.set_config(
u'Powerpoint Viewer',
unicode(self.PowerpointViewerCheckBox.checkState()))
self.config.set_config(
u'Impress', unicode(self.ImpressCheckBox.checkState()))

View File

@ -63,8 +63,8 @@ class RemoteTab(SettingsTab):
def load(self):
self.RemotePortSpinBox.setValue(
int(self.config.get_config(u'remote port', 4316)))
self.RemoteActive.setChecked(int(
self.config.get_config(u'startup', 0)))
self.RemoteActive.setChecked(
int(self.config.get_config(u'startup', 0)))
def save(self):
self.config.set_config(