From 043665d154f6da3bf2c6a9dc2ef532ef51d1c535 Mon Sep 17 00:00:00 2001 From: Jon Tibble Date: Sun, 13 Feb 2011 16:39:03 +0000 Subject: [PATCH] Fixes --- openlp/plugins/custom/lib/mediaitem.py | 2 +- openlp/plugins/songs/lib/opensongimport.py | 3 +-- openlp/plugins/songs/lib/songshowplusimport.py | 12 ++++++------ openlp/plugins/songs/lib/xml.py | 1 - 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/openlp/plugins/custom/lib/mediaitem.py b/openlp/plugins/custom/lib/mediaitem.py index 522d36e5c..b0834f170 100644 --- a/openlp/plugins/custom/lib/mediaitem.py +++ b/openlp/plugins/custom/lib/mediaitem.py @@ -29,7 +29,7 @@ import logging from PyQt4 import QtCore, QtGui from openlp.core.lib import MediaManagerItem, Receiver, ItemCapabilities, \ - translate, check_item_selected + check_item_selected from openlp.core.lib.ui import UiStrings from openlp.plugins.custom.lib import CustomXMLParser from openlp.plugins.custom.lib.db import CustomSlide diff --git a/openlp/plugins/songs/lib/opensongimport.py b/openlp/plugins/songs/lib/opensongimport.py index 24043d6f0..b2d82c081 100644 --- a/openlp/plugins/songs/lib/opensongimport.py +++ b/openlp/plugins/songs/lib/opensongimport.py @@ -147,8 +147,7 @@ class OpenSongImport(SongImport): continue log.info(u'Zip importing %s', parts[-1]) self.import_wizard.incrementProgressBar( - unicode(translate('SongsPlugin.ImportWizardForm', - 'Importing %s...')) % parts[-1]) + WizardStrings.ImportingType % parts[-1]) songfile = z.open(song) self.do_import_file(songfile) if self.commit: diff --git a/openlp/plugins/songs/lib/songshowplusimport.py b/openlp/plugins/songs/lib/songshowplusimport.py index 78c2e838d..924f7eeaf 100644 --- a/openlp/plugins/songs/lib/songshowplusimport.py +++ b/openlp/plugins/songs/lib/songshowplusimport.py @@ -116,27 +116,27 @@ class SongShowPlusImport(SongImport): u'Importing %s' % (file_name), 0) songData = open(file, 'rb') while (1): - blockKey, = struct.unpack("I",songData.read(4)) + blockKey, = struct.unpack("I", songData.read(4)) # The file ends with 4 NUL's if blockKey == 0: break - nextBlockStarts, = struct.unpack("I",songData.read(4)) + nextBlockStarts, = struct.unpack("I", songData.read(4)) if blockKey == VERSE or blockKey == CHORUS: - null, verseNo, = struct.unpack("BB",songData.read(2)) + null, verseNo, = struct.unpack("BB", songData.read(2)) elif blockKey == CUSTOM_VERSE: null, verseNameLength, = struct.unpack("BB", songData.read(2)) verseName = songData.read(verseNameLength) - lengthDescriptorSize, = struct.unpack("B",songData.read(1)) + lengthDescriptorSize, = struct.unpack("B", songData.read(1)) # Detect if/how long the length descriptor is if lengthDescriptorSize == 12: - lengthDescriptor, = struct.unpack("I",songData.read(4)) + lengthDescriptor, = struct.unpack("I", songData.read(4)) elif lengthDescriptorSize == 2: lengthDescriptor = 1 elif lengthDescriptorSize == 9: lengthDescriptor = 0 else: - lengthDescriptor, = struct.unpack("B",songData.read(1)) + lengthDescriptor, = struct.unpack("B", songData.read(1)) data = songData.read(lengthDescriptor) if blockKey == TITLE: diff --git a/openlp/plugins/songs/lib/xml.py b/openlp/plugins/songs/lib/xml.py index 64fefdad2..6d015701f 100644 --- a/openlp/plugins/songs/lib/xml.py +++ b/openlp/plugins/songs/lib/xml.py @@ -66,7 +66,6 @@ import re from lxml import etree, objectify -from openlp.core.lib import translate from openlp.plugins.songs.lib import VerseType from openlp.plugins.songs.lib.db import Author, Book, Song, Topic from openlp.plugins.songs.lib.ui import SongStrings