Cleanup unneeded trailing backslashes

This commit is contained in:
Jon Tibble 2010-06-19 19:29:18 +01:00
parent a34957297c
commit 1005a3c1b1
6 changed files with 21 additions and 22 deletions

View File

@ -208,40 +208,40 @@ class MediaManagerItem(QtGui.QWidget):
## Import Button ##
if self.hasImportIcon:
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Import %s')) % \
unicode(translate('MediaManagerItem', 'Import %s')) %
self.PluginNameShort,
unicode(translate('MediaManagerItem', 'Import a %s')) % \
unicode(translate('MediaManagerItem', 'Import a %s')) %
self.PluginNameVisible,
u':/general/general_import.png', self.onImportClick)
## File Button ##
if self.hasFileIcon:
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Load %s')) % \
unicode(translate('MediaManagerItem', 'Load %s')) %
self.PluginNameShort,
unicode(translate('MediaManagerItem', 'Load a new %s')) % \
unicode(translate('MediaManagerItem', 'Load a new %s')) %
self.PluginNameVisible,
u':/general/general_open.png', self.onFileClick)
## New Button ##
if self.hasNewIcon:
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'New %s')) % \
unicode(translate('MediaManagerItem', 'New %s')) %
self.PluginNameShort,
unicode(translate('MediaManagerItem', 'Add a new %s')) % \
unicode(translate('MediaManagerItem', 'Add a new %s')) %
self.PluginNameVisible,
u':/general/general_new.png', self.onNewClick)
## Edit Button ##
if self.hasEditIcon:
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Edit %s')) % \
unicode(translate('MediaManagerItem', 'Edit %s')) %
self.PluginNameShort,
unicode(translate(
'MediaManagerItem', 'Edit the selected %s')) % \
'MediaManagerItem', 'Edit the selected %s')) %
self.PluginNameVisible,
u':/general/general_edit.png', self.onEditClick)
## Delete Button ##
if self.hasDeleteIcon:
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Delete %s')) % \
unicode(translate('MediaManagerItem', 'Delete %s')) %
self.PluginNameShort,
translate('MediaManagerItem', 'Delete the selected item'),
u':/general/general_delete.png', self.onDeleteClick)
@ -249,7 +249,7 @@ class MediaManagerItem(QtGui.QWidget):
self.addToolbarSeparator()
## Preview ##
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Preview %s')) % \
unicode(translate('MediaManagerItem', 'Preview %s')) %
self.PluginNameShort,
translate('MediaManagerItem', 'Preview the selected item'),
u':/general/general_preview.png', self.onPreviewClick)
@ -260,7 +260,7 @@ class MediaManagerItem(QtGui.QWidget):
u':/general/general_live.png', self.onLiveClick)
## Add to service Button ##
self.addToolbarButton(
unicode(translate('MediaManagerItem', 'Add %s to Service')) % \
unicode(translate('MediaManagerItem', 'Add %s to Service')) %
self.PluginNameShort,
translate('MediaManagerItem',
'Add the selected item(s) to the service'),
@ -285,7 +285,7 @@ class MediaManagerItem(QtGui.QWidget):
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_edit.png',
unicode(translate('MediaManagerItem', '&Edit %s')) % \
unicode(translate('MediaManagerItem', '&Edit %s')) %
self.PluginNameVisible,
self.onEditClick))
self.ListView.addAction(context_menu_separator(self.ListView))
@ -293,14 +293,14 @@ class MediaManagerItem(QtGui.QWidget):
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_delete.png',
unicode(translate('MediaManagerItem', '&Delete %s')) % \
unicode(translate('MediaManagerItem', '&Delete %s')) %
self.PluginNameVisible,
self.onDeleteClick))
self.ListView.addAction(context_menu_separator(self.ListView))
self.ListView.addAction(
context_menu_action(
self.ListView, u':/general/general_preview.png',
unicode(translate('MediaManagerItem', '&Preview %s')) % \
unicode(translate('MediaManagerItem', '&Preview %s')) %
self.PluginNameVisible,
self.onPreviewClick))
self.ListView.addAction(

View File

@ -677,7 +677,7 @@ class ServiceManager(QtGui.QWidget):
translate('ServiceManager',
'File is not a valid service.\n'
'The content encoding is not UTF-8.'))
log.exception(u'Filename "%s" is not valid UTF-8' % \
log.exception(u'Filename "%s" is not valid UTF-8' %
file.decode(u'utf-8', u'replace'))
continue
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))

View File

@ -398,7 +398,7 @@ class ThemeManager(QtGui.QWidget):
self, translate('ThemeManager', 'Error'),
translate('ThemeManager', 'File is not a valid theme.\n'
'The content encoding is not UTF-8.'))
log.exception(u'Filename "%s" is not valid UTF-8' % \
log.exception(u'Filename "%s" is not valid UTF-8' %
file.decode(u'utf-8', u'replace'))
continue
osfile = unicode(QtCore.QDir.toNativeSeparators(ucsfile))

View File

@ -294,5 +294,5 @@ class AlertsTab(SettingsTab):
font.setBold(True)
font.setPointSize(self.font_size)
self.FontPreview.setFont(font)
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' % \
self.FontPreview.setStyleSheet(u'background-color: %s; color: %s' %
(self.bg_color, self.font_color))

View File

@ -71,12 +71,11 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
def accept(self):
log.debug(u'Detailed report generated')
filename = u'usage_detail_%s_%s.txt' % \
filename = u'usage_detail_%s_%s.txt' %
(self.FromDate.selectedDate().toString(u'ddMMyyyy'),
self.ToDate.selectedDate().toString(u'ddMMyyyy'))
usage = self.parent.songusagemanager.get_all_songusage(\
self.FromDate.selectedDate(), \
self.ToDate.selectedDate())
usage = self.parent.songusagemanager.get_all_songusage(
self.FromDate.selectedDate(), self.ToDate.selectedDate())
outname = os.path.join(unicode(self.FileLineEdit.text()), filename)
file = None
try:

View File

@ -53,7 +53,7 @@ class SongUsageManager(object):
db_type = unicode(
settings.value(u'db type', QtCore.QVariant(u'sqlite')).toString())
if db_type == u'sqlite':
self.db_url = u'sqlite:///%s/songusage.sqlite' % \
self.db_url = u'sqlite:///%s/songusage.sqlite' %
AppLocation.get_section_data_path(u'songusage')
else:
self.db_url = u'%s://%s:%s@%s/%s' % (db_type,