forked from openlp/openlp
More cleanups
This commit is contained in:
parent
5fe753c833
commit
1968803619
@ -120,7 +120,7 @@ class MainDisplay(DisplayWidget):
|
||||
self.setScene(self.scene)
|
||||
self.webView = QtWebKit.QGraphicsWebView()
|
||||
self.scene.addItem(self.webView)
|
||||
self.webView.resize(self.screen[u'size'].width(), \
|
||||
self.webView.resize(self.screen[u'size'].width(),
|
||||
self.screen[u'size'].height())
|
||||
self.page = self.webView.page()
|
||||
self.frame = self.page.mainFrame()
|
||||
|
@ -113,7 +113,7 @@ class AppLocation(object):
|
||||
"""
|
||||
if dir_type == AppLocation.AppDir:
|
||||
if hasattr(sys, u'frozen') and sys.frozen == 1:
|
||||
app_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
||||
app_path = os.path.abspath(os.path.split(sys.argv[0])[0])
|
||||
else:
|
||||
app_path = os.path.split(openlp.__file__)[0]
|
||||
return app_path
|
||||
|
@ -89,7 +89,7 @@ class OpenSongBible(BibleDB):
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
self.wizard.incrementProgressBar(
|
||||
QtCore.QString('%s %s %s' % (
|
||||
translate('BiblesPlugin.Opensong', 'Importing'), \
|
||||
translate('BiblesPlugin.Opensong', 'Importing'),
|
||||
db_book.name, chapter.attrib[u'n'])))
|
||||
self.session.commit()
|
||||
except IOError:
|
||||
|
@ -57,7 +57,7 @@ class CCLIFileImport(SongImport):
|
||||
self.filenames = kwargs[u'filenames']
|
||||
log.debug(self.filenames)
|
||||
else:
|
||||
raise KeyError(u'Keyword argument "filenames" not supplied.')
|
||||
raise KeyError(u'Keyword argument "filenames" not supplied.')
|
||||
|
||||
def do_import(self):
|
||||
"""
|
||||
|
@ -31,7 +31,7 @@ import logging
|
||||
import chardet
|
||||
try:
|
||||
import sqlite
|
||||
except:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
from openlp.core.lib import translate
|
||||
@ -93,9 +93,9 @@ class OpenLP1SongImport(SongImport):
|
||||
cursor.execute(u'SELECT authorid, authorname FROM authors')
|
||||
authors = cursor.fetchall()
|
||||
if new_db:
|
||||
# "cache" our list of tracks
|
||||
cursor.execute(u'SELECT trackid, fulltrackname FROM tracks')
|
||||
tracks = cursor.fetchall()
|
||||
# "cache" our list of tracks
|
||||
cursor.execute(u'SELECT trackid, fulltrackname FROM tracks')
|
||||
tracks = cursor.fetchall()
|
||||
# Import the songs
|
||||
cursor.execute(u'SELECT songid, songtitle, lyrics || \'\' AS lyrics, '
|
||||
u'copyrightinfo FROM songs')
|
||||
|
Loading…
Reference in New Issue
Block a user