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

View File

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

View File

@ -87,8 +87,7 @@ class BGExtract(BibleCommon):
versePos = -1 versePos = -1
else: else:
i = xml_string[:i].rfind(u'<span') + 1 i = xml_string[:i].rfind(u'<span') + 1
# Loose the </span> verseText = xml_string[versePos + 7 : i - 1] # Loose </span>
verseText = xml_string[versePos + 7 : i - 1 ]
# Chop off verse 1 # Chop off verse 1
xml_string = xml_string[i - 1 :len(xml_string)] xml_string = xml_string[i - 1 :len(xml_string)]
versePos = xml_string.find(VerseSearch) #look for the next verse 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() sxml.add_lyrics_to_song()
count = 1 count = 1
for i in range (0, self.VerseListView.count()): 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())) unicode(self.VerseListView.item(i).text()))
count += 1 count += 1
self.customSlide.title = unicode(self.TitleEdit.displayText()) self.customSlide.title = unicode(self.TitleEdit.displayText())
@ -207,7 +208,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
#number of lines has change #number of lines has change
if len(self.beforeText.split(u'\n')) != \ if len(self.beforeText.split(u'\n')) != \
len(self.VerseTextEdit.toPlainText().split(u'\n')): len(self.VerseTextEdit.toPlainText().split(u'\n')):
tempList = {} tempList = {}
for row in range(0, self.VerseListView.count()): for row in range(0, self.VerseListView.count()):
tempList[row] = self.VerseListView.item(row).text() tempList[row] = self.VerseListView.item(row).text()
self.VerseListView.clear() self.VerseListView.clear()

View File

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

View File

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