bzr-revno: 1098
This commit is contained in:
Jon Tibble 2010-10-21 21:58:14 +01:00
commit e10ecdf3c2
10 changed files with 17 additions and 24 deletions

View File

@ -25,7 +25,6 @@
###############################################################################
import re
import sys
try:
import enchant
from enchant import DictNotFoundError
@ -37,7 +36,7 @@ except ImportError:
# http://john.nachtimwald.com/2009/08/22/qplaintextedit-with-in-line-spell-check/
from PyQt4 import QtCore, QtGui
from openlp.core.lib import html_expands, translate, context_menu_action
from openlp.core.lib import html_expands, translate
class SpellTextEdit(QtGui.QPlainTextEdit):
def __init__(self, *args):

View File

@ -87,11 +87,11 @@ class ThemeLevel(object):
Service = 2
Song = 3
boolean_list = [u'italics', u'override', u'outline', u'shadow', \
boolean_list = [u'italics', u'override', u'outline', u'shadow',
u'slide_transition']
integer_list =[u'proportion', u'line_adjustment', u'x', u'height', u'y', \
u'width', u'shadow_size', u'outline_size', u'horizontal_align', \
integer_list = [u'proportion', u'line_adjustment', u'x', u'height', u'y',
u'width', u'shadow_size', u'outline_size', u'horizontal_align',
u'vertical_align', u'wrap_style']
class ThemeXML(object):

View File

@ -24,7 +24,7 @@
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
from PyQt4 import QtCore, QtGui
from PyQt4 import QtGui
from exceptiondialog import Ui_ExceptionDialog

View File

@ -27,7 +27,6 @@
from PyQt4 import QtCore, QtGui
from filerenamedialog import Ui_FileRenameDialog
from openlp.core.lib import translate
class FileRenameForm(QtGui.QDialog, Ui_FileRenameDialog):
"""

View File

@ -34,9 +34,8 @@ from PyQt4 import QtCore, QtGui
from openlp.core.ui import AmendThemeForm, FileRenameForm
from openlp.core.theme import Theme
from openlp.core.lib import OpenLPToolbar, context_menu_action, \
ThemeXML, str_to_bool, get_text_file_string, build_icon, Receiver, \
context_menu_separator, SettingsManager, translate, check_item_selected
from openlp.core.lib import OpenLPToolbar, ThemeXML, get_text_file_string, \
build_icon, Receiver, SettingsManager, translate, check_item_selected
from openlp.core.utils import AppLocation, get_filesystem_encoding
log = logging.getLogger(__name__)
@ -267,7 +266,7 @@ class ThemeManager(QtGui.QWidget):
filename = \
os.path.split(unicode(oldThemeData.background_filename))[1]
new_theme.add_background_image(filename)
save_to = os.path.join(self.path, theme_name, filename)
save_to = os.path.join(self.path, newThemeName, filename)
save_from = oldThemeData.background_filename
new_theme.add_font(unicode(oldThemeData.font_main_name),
unicode(oldThemeData.font_main_color),

View File

@ -28,7 +28,6 @@ The :mod:`languagemanager` module provides all the translation settings and
language file loading for OpenLP.
"""
import logging
import os
from PyQt4 import QtCore, QtGui

View File

@ -32,7 +32,6 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import MediaManagerItem, Receiver, BaseListWithDnD, \
ItemCapabilities, translate
from openlp.plugins.bibles.forms import BibleImportForm
from openlp.plugins.bibles.lib.db import BibleDB
log = logging.getLogger(__name__)

View File

@ -28,7 +28,6 @@ import logging
from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, translate
from editcustomslidedialog import Ui_CustomSlideEditDialog
log = logging.getLogger(__name__)

View File

@ -28,7 +28,6 @@ The :mod:`ewimport` module provides the functionality for importing
EasyWorship song databases into the current installation database.
"""
import sys
import os
import struct
@ -193,7 +192,8 @@ class EasyWorshipSongImport(SongImport):
field_names.pop()
field_descs = []
for i, field_name in enumerate(field_names):
field_type, field_size = struct.unpack_from('BB', field_info, i * 2)
field_type, field_size = struct.unpack_from('BB',
field_info, i * 2)
field_descs.append(FieldDescEntry(field_name, field_type,
field_size))
self.set_record_struct(field_descs)
@ -331,7 +331,7 @@ class EasyWorshipSongImport(SongImport):
# Memo or Blob
block_start, blob_size = \
struct.unpack_from('<II', field, len(field)-10)
sub_block = block_start & 0xff;
sub_block = block_start & 0xff
block_start &= ~0xff
self.memo_file.seek(block_start)
memo_block_type, = struct.unpack('b', self.memo_file.read(1))
@ -339,12 +339,12 @@ class EasyWorshipSongImport(SongImport):
self.memo_file.seek(8, os.SEEK_CUR)
elif memo_block_type == 3:
if sub_block > 63:
return u'';
return u''
self.memo_file.seek(11 + (5 * sub_block), os.SEEK_CUR)
sub_block_start, = struct.unpack('B', self.memo_file.read(1))
self.memo_file.seek(block_start + (sub_block_start * 16))
else:
return u'';
return u''
return self.memo_file.read(blob_size)
else:
return 0

View File

@ -29,7 +29,6 @@ The :mod:`songbeamerimport` module provides the functionality for importing
"""
import logging
import os
import re
import chardet
import codecs